Re: object vs command weirdness

Date : Thu, 07 Jun 2007 13:49:33 -0400
To : XSI(at)Softimage.COM
From : Nicolas Langlois <nicolasl(at)buzzimage.com>
Subject : Re: object vs command weirdness
Found my error. AddPrimitive should have been AddGeometry

Dooooh!!!!!



Nicolas Langlois wrote:
Hey list,

I'm tidying up scripts and came across something that really seems weird. The object and commande equivalent don't do the same thing when a Freeze All Transforms is done applied afterwards. Can anyone explain to me why it doesn't do the same results?? I'm obviously trying to keep my code the lcleanest and meanest possible when keeping it object model based.



# PYTHONCODE A - Object Model as much as possible

oRoot = Application.ActiveSceneRoot
globalSRT = oRoot.AddPrimitive("Circle", "GlobalSRT")
globalSRT.Kinematics.Local.Parameters("rotx").Value = 90
Application.ResetTransform([globalSRT], "siCtr", "siSRT", "siXYZ") # This is the Freeze All Transforms





# PYTHON CODE B - Commands all the way

Application.CreatePrim("Circle", "NurbsCurve", "GlobalSRT", "")
Application.Rotate("", 90, 0, 0, "siRelative", "siAdd", "siObj", "siXYZ", "", "", "", "", "", "", "", 0, "")
Application.ResetTransform("", "siCtr", "siSRT", "siXYZ") # This is the Freeze All Transforms




--


Nicolas Langlois Senior Rigger / TD Buzz Image

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.