R: Duplicate and siDuplicate 2004-07-05 - By Michele
Back Thanks a lot Andrea, this solved exactly the problem. Ciao Michele
-- --Messaggio originale-- -- Da: owner-xsi@(protected) [mailto:owner-xsi@(protected)] Per conto di Andrea Padovan XSI Dev Inviato: lunedì 5 luglio 2004 14.45 A: XSI@(protected) Oggetto: Re: Duplicate and siDuplicate
Ciao Michele, if you take a look to default setting of Dup command, you will see that by default the Parameter "Grouping" is siNoGrouping Infact in your log this line after Dup: Duplicate "cube", , siDuplicateHistory, siNoParent, siNoGrouping, siDuplicateProperties, siDuplicateAnimation, siDuplicateConstraints, siSetSelection, siGlobalXForm, , , , , , , , , , , siDuplicateSelectedTextureSupports
The Dup Object doesn't share RigidBodies Group ( Explorer > Environments ) so for XSI it isn't an rigidbody.
Remenber that when you use Duplicate command with "CTRL+D" it reads settings in Edit -> Duplicate/Instantiate -> Duplicate/Instantiate Options... PPG
while Duplicate command in scripting way use default setting of native command if you don't specific.
Andrea
www.borderliner.it
---- Original Message -- --
From: Michele <mailto:motionblur@(protected)> To: xsi@(protected) Sent: Sunday, July 04, 2004 2:52 PM Subject: Duplicate and siDuplicate
Hi people, I'm trying to duplicate an object via scripting, then delete its rigid body properties and operators using RemoveRigidBody. Using the "Duplicate" command seem to work, but after Dup, RemoveRigidBody seems to be unable to remove any properties. Using the "siDuplicate" command works, and after siDup, RemoveRigidBody removes the rbd properties. Strange.
While I don't understand why it's working this way, and documentation didn't help (scripting reference contains the same description for both commands, "duplicate objects"), I simply could go on and use siDuplicate, but it happens that i need to remove Properties, Animation, Constraints, Hierarchy, History, and siDuplicate's parameters are mostly "Not Implemented". file://C:\Softimage\XSI_4.0\Doc\XSISDK\reference\SIDuplicate.html Now: - both commands return an XSICollection of duplicates, - they seem to differ only by the number of -implemented- parameters (Duplicate accepts some additional parameters for duplication offsets and placement tracking). You can test this by copypasting into v4 script editor the following: ' Repro Steps #1: - Duplicate Set oRoot = ActiveProject.ActiveScene.Root Set oCube = oRoot.AddGeometry( "Cube", "MeshSurface" ) CreateActiveRigidBody oCube Set oDup = Duplicate(oCube)(0) RemoveRigidBody oDup
' Repro Steps #2: - siDuplicate Set oRoot = ActiveProject.ActiveScene.Root Set oCube = oRoot.AddGeometry( "Cube", "MeshSurface" ) CreateActiveRigidBody oCube Set oDup = siDuplicate(oCube)(0) RemoveRigidBody oDup The 1st doesnt delete the duplicate's properties, the 2nd does. Is this happening only on my system? I can't understand, maybe I'm doing something wrong. Anyone has a solution/suggestion for this problem? Thanks a lot. Michele motionblur@(protected)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <TITLE>Messaggio</TITLE>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#aca899> <DIV><SPAN class=986320405-05072004><FONT face=Arial color=#0000ff size=2 >Thanks a lot Andrea, this solved exactly the problem.</FONT></SPAN></DIV> <DIV><SPAN class=986320405-05072004><FONT face=Arial color=#0000ff size=2>Ciao</FONT></SPAN></DIV> <DIV><SPAN class=986320405-05072004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=986320405-05072004><FONT face=Arial color=#0000ff size=2>Michele</FONT></SPAN></DIV> <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"> <DIV></DIV> <DIV class=OutlookMessageHeader lang=it dir=ltr align=left><FONT face=Tahoma size=2>-- --Messaggio originale-- --<BR><B>Da:</B> owner-xsi@(protected) [mailto:owner-xsi@(protected)] <B>Per conto di </B>Andrea Padovan XSI Dev<BR><B>Inviato:</B> lunedì 5 luglio 2004 14.45<BR><B>A:</B> XSI@(protected)<BR><B>Oggetto:</B> Re: Duplicate and siDuplicate<BR><BR></FONT></DIV> <DIV><FONT face=Arial size=2>Ciao Michele,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>if you take a look to default setting of Dup command, you will see that by default the Parameter "Grouping" is <FONT face="Times New Roman" size=3>siNoGrouping</FONT></FONT></DIV> <DIV>Infact in your log this line after Dup:</DIV> <DIV><FONT size=2> <P>Duplicate "cube", , siDuplicateHistory, siNoParent, siNoGrouping, siDuplicateProperties, siDuplicateAnimation, siDuplicateConstraints, siSetSelection, siGlobalXForm, , , , , , , , , , , siDuplicateSelectedTextureSupports</P> <P><FONT face=Arial>The Dup Object doesn't share RigidBodies Group ( Explorer > Environments ) so for XSI it isn't an rigidbody.</FONT></P> <P><FONT face=Arial>Remenber that when you use Duplicate command with "CTRL+D " it reads settings in Edit -> Duplicate/Instantiate -> Duplicate/Instantiate Options... PPG</FONT></P> <P><FONT face=Arial>while Duplicate command in scripting way use default setting of native command if you don't <SPAN>specific.</SPAN></FONT></P> <P><FONT face=Arial><SPAN>Andrea</SPAN></FONT></P> <P><FONT face=Arial><SPAN><A href="http://www.borderliner.it">www.borderliner.it</A></SPAN></FONT></FONT>< /P> <P>---- Original Message -- -- </P></DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:< /B> <A title=motionblur@(protected) href="mailto:motionblur@(protected)">Michele</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> Sunday, July 04, 2004 2:52 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Duplicate and siDuplicate</DIV> <DIV><BR></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Hi people, </SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>I'm trying to duplicate an object via scripting, then delete its rigid body properties and operators using RemoveRigidBody.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Using the "Duplicate" command seem to work, but after Dup, RemoveRigidBody seems to be unable to remove any properties.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Using the "siDuplicate" command works, and after siDup, RemoveRigidBody removes the rbd properties.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Strange.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>While I don't understand why it's working this way, and documentation didn't help (<FONT face=Arial size=2><SPAN class=970572321-04072004>scripting reference contains the same description for both commands, "duplicate objects")</SPAN></FONT>, I simply could go on and use siDuplicate, but it happens that i need to remove Properties, Animation, Constraints, Hierarchy , History, and <SPAN class=970572321-04072004>siDuplicate's parameters are mostly "Not Implemented". </SPAN></SPAN></FONT><FONT face=Arial size=2><SPAN class=970572321-04072004><SPAN class=970572321-04072004><A href="file://C:\Softimage\XSI_4.0\Doc\XSISDK\reference\SIDuplicate.html" >file://C:\Softimage\XSI_4.0\Doc\XSISDK\reference\SIDuplicate.html</A></SPAN>< /SPAN></FONT></DIV></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Now:</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>- both commands return an XSICollection of duplicates,</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>- they seem to differ only by the number of -implemented- parameters (Duplicate accepts some additional parameters for duplication offsets and placement tracking).</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>You can test this by copypasting into v4 script editor the following:</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004><SPAN class=970572321-04072004>' </SPAN>Repro Steps #1: - Duplicate</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Set oRoot = ActiveProject.ActiveScene.Root <BR>Set oCube = oRoot.AddGeometry( "Cube", "MeshSurface" )<BR>CreateActiveRigidBody oCube<BR>Set oDup = Duplicate(oCube)(0)<BR>RemoveRigidBody oDup</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004><SPAN class=970572321-04072004> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>' </SPAN></FONT>Repro Steps #2: - siDuplicate</SPAN></SPAN></FONT></DIV></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Set oRoot = ActiveProject.ActiveScene.Root <BR>Set oCube = oRoot.AddGeometry( "Cube", "MeshSurface" )<BR>CreateActiveRigidBody oCube<BR>Set oDup = siDuplicate(oCube)(0)<BR>RemoveRigidBody oDup</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>The 1st doesnt delete the duplicate's properties, the 2nd does.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Is this happening only on my system?</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004><FONT face =Arial size=2><SPAN class=970572321-04072004><SPAN class=970572321-04072004><FONT face=Arial size=2><SPAN class=970572321-04072004>I can't understand, maybe I'm doing something wrong.</SPAN></FONT></DIV> <DIV> <DIV> <DIV></SPAN>Anyone has a solution/suggestion for this problem?</SPAN></FONT></DIV></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Thanks a lot.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004>Michele</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=970572321-04072004><A href="mailto:motionblur@(protected)">motionblur@(protected)</A></SPAN>< /FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV></SPAN></FONT></DIV>< /BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
|
|