java scripting 2005-01-28 - By Carl Callewaert
Back Hello: In Javascript I would to make when I select an object and run the script, it creates a bones and the root is constraint to the object that was selected.
My problem is this, what do I need to fill in the X? How can I get the name of the root of the skeleton that is created now?
var a = selection (0);
var startx = GetValue(a + ".kine.local.posx");
var starty = GetValue(a + ".kine.local.posy");
var startz = GetValue(a + ".kine.local.posz");
Create2DSkeleton( startx, starty, startz, 9, 9, 9,1, 0, 0, 2, null, null);
ApplyCns("Position", " X ", a , null);
regards,
carl
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE></TITLE> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2900.2523" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV> Hello: </DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial"> <DIV><FONT face=Arial size=2><FONT size=2> <P>In Javascript I would to make when I select an object and run the script, it creates a bones and the root is constraint to the object that was selected.</P> <P>My problem is this, what do I need to fill in the X? How can I get the name of the root of the skeleton that is created now? </P> <P>var a = selection (0);</P><FONT size=2> <P>var startx = GetValue(a + ".kine.local.posx");</P> <P>var starty = GetValue(a + ".kine.local.posy");</P> <P>var startz = GetValue(a + ".kine.local.posz");</P></FONT> <P>Create2DSkeleton( startx, starty, startz, 9, 9, 9,1, 0, 0, 2, null, null);</P><FONT size=2> <P>ApplyCns("Position", " X ", a , null);</P> <P>regards,</P> <P>carl </P></FONT></FONT></FONT></DIV></DIV></BLOCKQUOTE></BODY></HTML>
|
|