Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Basic scripting question..

Basic scripting question..

2005-04-15       - By kim aldis

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  




 __ __  

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


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT>&nbsp;</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]&nbsp;</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&nbsp;response, that
 the second arg to GetPrim() is&nbsp;what&nbsp;you use to name the&nbsp;null
 and the 3rd is&nbsp;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>&nbsp;</DIV>
 <DIV><SPAN class=093283106-15042005><FONT face=Arial color=#0000ff size=2>The
 other thing&nbsp;I'd done&nbsp;was to use the&nbsp;</FONT>&nbsp;<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>&nbsp;</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>&nbsp;</DIV>
 <DIV><SPAN class=093283106-15042005><!--StartFragment -->&nbsp;<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>&nbsp;&nbsp;&nbsp;
set oNullRoot.AddNull( "Money" )</PRE><PRE class=pPreformatted>next</PRE></SPAN
></DIV></BLOCKQUOTE></BODY></HTML>