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