  | | | Duplicate and siDuplicate | Duplicate and siDuplicate 2004-07-04 - By Michele
Back 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=us-ascii"> <TITLE>Messaggio</TITLE>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD> <BODY> <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 size=2><SPAN class=970572321-04072004></SPAN></FONT> </DIV></SPAN></FONT></DIV></BODY>< /HTML>
|
|
 |