code-google-com / blur-dev

Automatically exported from code.google.com/p/blur-dev
1 stars 0 forks source link

Not work "rotate in XForm gizmo" #49

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I need rotate in XForm gizmo. But I can not do that, tell me what the problem 
is and how to rotate it? Thank you for your attention.

Code:
from Py3dsMax import mxs

for obj in mxs.objects:
     XForm = mxs.pyhelper.namify('XForm') #  set flag
     obj.modifiers[XForm].gizmo.rotation += mxs.quat(0.707107, 0, 0, 0.707107) #  rotate 90"

BlurOffline_2012-02-14 (64-bit), Python 2.6.6 (64-bit)

Original issue reported on code.google.com by AlexeyGu...@gmail.com on 5 Apr 2012 at 7:48

GoogleCodeExporter commented 9 years ago
I solved the problem though not completely in Python. I would like to make it 
completely in Python.

mxs.addModifier(obj, mxs.XForm())
XForm = mxs.pyhelper.namify('XForm') #  set flag
mxs.execute('max modify mode')
mxs.modPanel.setCurrentObject(obj.modifiers[XForm])
mxs.execute('mod_obj = modPanel.getCurrentObject();gizmo_rotation = 
mod_obj.gizmo.rotation;mod_obj.gizmo.rotation += quat 0.707107 0 0 0.707107') # 
 rotate 90"

Original comment by AlexeyGu...@gmail.com on 5 Apr 2012 at 2:22