  | | | java scripting question | java scripting question 2005-02-25 - By Bradley R. Gabe
Back <HEAD><TITLE></TITLE> <META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD> <BODY> <DIV>Depends on the op in question. I just put a buldge op on a sphere and selected it to do the following:</DIV> <DIV> </DIV> <DIV><FONT face="courier, monospace" color=blue size=2>var op = selection(0);< /FONT></DIV> <DIV><FONT face="courier, monospace" color=blue size=2>var obj = op.owners(0) .parent;<BR>LogMessage(obj);</FONT></DIV> <DIV> </DIV> <DIV>Often the first member of an owners collection returns a pointer to the hosting X3D object. In this case, it's returning a pointer to the activeprimitive whose parent is the X3D object.</DIV> <DIV><BR>There are hopefully better, more consistent ways to do this for all ops, but sometimes you can get there by testing and hacking for the op in question.</DIV> <DIV> </DIV> <DIV>-Brad</DIV> <DIV>CG Soup</DIV> <DIV><BR>-- --Original Message-- -- <BR></DIV><ZZZHTML><ZZZHEAD><ZZZMETA content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1" http-equiv="Content-Type"><ZZZMETA name ="GENERATOR" content="MSHTML 6.00.2900.2604"> <STYLE></STYLE> </ZZZHEAD><ZZZBODY bgColor="#ffffff" text="#000000"> <DIV><FONT face=Arial size=2>I'm not a scriptin guru :-p but this one works :< /FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT size=2> <P>var oOp = Selection(0)</P> <P>SelectNeighborObj(oOp, 0, "NODE", false);</P> <P><FONT face=Arial>Cheers,</FONT></P> <P><FONT face=Arial></FONT> </P> <P><FONT face=Arial>Guillaume Laforge</FONT></P> <P><FONT face=Arial>CG artist</FONT></P> <P><FONT face=Arial><A href="http://www.vol2nuit.fr">www.vol2nuit.fr</A></FONT> </P> <P> </P></FONT></DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">-- -- Original Message -- -- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:< /B> <A title=carl@(protected) href="mailto:carl@(protected)">Carl Callewaert </A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=XSI@(protected) href= "mailto:XSI@(protected)">XSI@(protected)</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, February 25, 2005 7:23 PM< /DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> java scripting question</DIV> <DIV><BR></DIV> <DIV><FONT face=Arial size=2>scripting:</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>if you have an operated selected from an object how can you select the object in javascripting? </FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>carl </FONT></DIV></BLOCKQUOTE></ZZZBODY></ZZZHTML ></BODY> --- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|
 |