making it a child of the root by scripting 2004-04-01 - By Jabbar Raisani
Back Carl, If I understand correctly you want the duplicated object to be the child of the scene root. If so I think you need to change your Duplicate function to be the following:
Duplicate myObj.model & ".Curve" , 2, 0, 1, 0, 0, 1, 0, 1 instead of: Duplicate myObj.model & ".Curve" , 2, 1, 1, 0, 0, 1, 0, 1
This will change the hierarchy setting the 1 to zero forces the parent to be the scene root.
Following are the descriptions from the documentation.
Hope this helps, Jabbar
Duplicate ([InputObjs], [NbItems], [History], [Hierarchy], [Grouping], [Properties], [Animation], [Constraints], [Selection], [Xfrom], [Sx], [Sy], [Sz], [Rx], [Ry], [Rz], [Tx], [Ty], [Tz], [TrackXForm], [TextureSupports])
Constant Value Description siNoParent 0 parent the copied object under the scene root siSharedParent 1 share the parent of the source object siNewNullParent 2 create a null to act as the parent of this object
-- -- Original Message -- -- From: "Carl Callewaert" <carl@(protected)> To: <XSI@(protected)> Sent: Thursday, April 01, 2004 10:55 AM Subject: making it a child of the root by scripting
> in this script I try to achieve to duplicate a curve which > is a element under a model which works. How can I make that > the duplicate curve because an child just under the root > and not under the model? > > sub model(in_obj) > > dim sel > Set sel = GetValue("SelectionList") > set oRoot = Application.ActiveProject.ActiveScene.Root > set myObj = oRoot.FindChild(in_obj) > SelectObj myObj.model & ".Curve", "BRANCH" > Duplicate myObj.model & ".Curve" , 2, 1, 1, 0, 0, 1, 0, 1 > FreezeObj > SelectObj myObj.model & ".Curve", "BRANCH" > end sub > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|