  | | | Basic scripting question.. | Basic scripting question.. 2005-04-15 - By Lee Hallett
Back Cheers Brad and Kim - I knew I could count on the resident gurus for guidance through these troubled times.. I promise one day soon to get my head back in the world of coding. You'd never believe I once wrote a (really quite crap) game in assembler, mind you, that was back in the days of coal fired 6080 processors and steam driven monitors... Thanks again guys.
Lee|3d animation and design..
Pixel pusher & 'telly colouring in' bloke
There are only 10 sorts of people in the World - those that understand binary, and those that don't.
* BBC Wales | C4 graphics area | Broadcasting House| Llandaff, Cardiff. CF5 2QY. * +44 (0)29 203 23370 e-* lee.hallett@(protected)
-- --Original Message-- -- From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On Behalf Of kim aldis Sent: 15 April 2005 07:48 To: XSI@(protected) Subject: RE: Basic scripting question..
__ ____ ____ ____ ____ ____ ____
From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On Behalf Of Bradley R. Gabe Sent: 14 April 2005 22:47 To: XSI@(protected); XSI@(protected) Subject: Re: Basic scripting question.. Also, check out the AddNull() method. It creates a new null as the child of the object that calls it [kim aldis] that was the point I probably didn't make clear in my earlier response, that the second arg to GetPrim() is what you use to name the null and the 3rd is an object you want to parent the new null to, if you do go down this root. The other thing I'd done was to use the return value to GetPrim( "Null" ) to get the newly created object which would be faster and shorter code than using the selection object. As Brad points out, you can use the AddNull() method. This is way quicker partly because you have the added advantage that it doesn't register in the history because it's a method, not a command:- set oRoot = ActiveProject.ActiveScene.Root set oNullRoot = oRoot.AddNull( "TheRootOfAllEvil" ) for i = 0 to 20 set oNullRoot.AddNull( "Money" ) next
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>Message</TITLE> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=440124909-15042005><FONT face=Arial color=#0000ff size=2 >Cheers Brad and Kim - I knew I could count on the resident gurus for guidance through these troubled times.. I promise one day soon to get my head back in the world of coding. You'd never believe I once wrote a (really quite crap) game in assembler, mind you, that was back in the days of coal fired 6080 processors and steam driven monitors...</FONT></SPAN></DIV> <DIV><SPAN class=440124909-15042005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=440124909-15042005><FONT face=Arial color=#0000ff size=2 >Thanks again guys.</FONT></SPAN></DIV> <DIV> </DIV> <DIV> </DIV><!-- Converted from text/rtf format --><BR> <UL> <P align=center><SPAN lang=en-gb><FONT face=Arial size=2>Lee|3d animation and design..<U></U></FONT></SPAN></P> <P align=center><SPAN lang=en-gb><FONT face=Arial size=2>Pixel pusher & 'telly colouring in' bloke</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN></P></UL> <P align=center><SPAN lang=en-gb><FONT face=Arial size=1>There are only 10 sorts of people in the World - those that understand binary, and those that don't.</FONT></SPAN></P><BR> <UL> <P><SPAN lang=en-us><FONT face=Wingdings size=1><FONT face="Courier New"></FONT></FONT><FONT face="Courier New"> </FONT><FONT face=Wingdings size=2>*</FONT><FONT face=Tahoma> </FONT><FONT face =Tahoma size=1> BBC Wales | C4 graphics area | Broadcasting House| Llandaff, Cardiff. CF5 2QY.</FONT></SPAN><SPAN lang=en-gb><B></B></SPAN><SPAN lang=en-gb><B> </B></SPAN><BR><B><SPAN lang=en-us><FONT face=Wingdings size=1><FONT face="Courier New"></FONT></FONT><FONT face="Courier New"> </FONT><FONT face=Wingdings size=2>(</FONT></SPAN></B><SPAN lang=en-us> <FONT face=Tahoma size=1> +44 (0)29 203 23370</FONT><B></B></SPAN> <BR><SPAN lang=en-gb><FONT face=Arial size=2>e-</FONT><FONT face=Wingdings size=2>*</FONT><FONT face="Courier New"> </FONT> <FONT face=Arial size=1>lee.hallett@(protected)</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><B></B></SPAN><SPAN lang=en-us><B></B></SPAN> </P><BR></UL> <DIV></DIV> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma size=2>-- --Original Message-- --<BR><B>From:</B> owner-xsi@(protected) [mailto:owner-xsi@(protected)] <B>On Behalf Of </B>kim aldis<BR><B>Sent:</B> 15 April 2005 07:48<BR><B>To:</B> XSI@(protected)<BR><B>Subject:</B> RE: Basic scripting question..<BR><BR></FONT></DIV> <DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2></FONT> </DIV><BR> <BLOCKQUOTE dir=ltr style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left> <HR tabIndex=-1> <FONT face=Tahoma size=2><B>From:</B> owner-xsi@(protected) [mailto:owner-xsi@(protected)] <B>On Behalf Of </B>Bradley R. Gabe<BR><B>Sent:</B> 14 April 2005 22:47<BR><B>To:</B> XSI@(protected); XSI@(protected)<BR><B>Subject:</B> Re: Basic scripting question..<BR></FONT><BR></DIV> <DIV></DIV> <DIV>Also, check out the AddNull() method. It creates a new null as the child of the object that calls it<BR><SPAN class=093283106-15042005><FONT face =Arial color=#0000ff size=2>[kim aldis] </FONT></SPAN></DIV> <DIV><SPAN class=093283106-15042005><FONT face=Arial color=#0000ff size=2 >that was the point I probably didn't make clear in my earlier response, that the second arg to GetPrim() is what you use to name the null and the 3rd is an object you want to parent the new null to, if you do go down this root.</FONT></SPAN></DIV> <DIV><SPAN class=093283106-15042005></SPAN> </DIV> <DIV><SPAN class=093283106-15042005><FONT face=Arial color=#0000ff size=2>The other thing I'd done was to use the </FONT> <FONT face=Arial color=#0000ff size=2>return value to GetPrim( "Null" ) to get the newly created object which would be faster and shorter code than using the selection object.</FONT></SPAN></DIV> <DIV><SPAN class=093283106-15042005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=093283106-15042005><FONT face=Arial color=#0000ff size=2>As Brad points out, you can use the AddNull() method. This is way quicker partly because you have the added advantage that it doesn't register in the history because it's a method, not a command:-</FONT></SPAN></DIV> <DIV><SPAN class=093283106-15042005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=093283106-15042005><!--StartFragment --> <PRE class =pPreformatted>set oRoot = ActiveProject.ActiveScene.Root<A name=wp567256> </A> set oNullRoot = oRoot.AddNull( "TheRootOfAllEvil" )</PRE><PRE class =pPreformatted>for i = 0 to 20</PRE><PRE class=pPreformatted> set oNullRoot.AddNull( "Money" )</PRE><PRE class=pPreformatted>next</PRE></SPAN ></DIV></BLOCKQUOTE><br>http://www.bbc.co.uk/<br><br>This e-mail (and any attachments) is confidential and may contain<br>personal views which are not the views of the BBC unless specifically<br>stated.<br>If you have received it in error, please delete it from your system. <br>Do not use, copy or disclose the information in any way nor act in<br>reliance on it and notify the sender immediately. Please note that the<br>BBC monitors e-mails sent or received. <br >Further communication will signify your consent to this.</BODY></HTML>
|
|
|