Narann
03-30-2009, 11:30 AM
Hi all, I have a prob and I con't solve it... :shrug:
I need help...
Here is my code:
if obj.hasFn(OpenMaya.MFn.kTransform):
fn = OpenMaya.MFnTransform(obj)
S = (0.0, 0.0, 0.0)
print fn.getScale(S)
And the error is:
// Error: line 1: in method 'MFnTransform_getScale', argument 2 of type 'double [3]'
# Traceback (most recent call last):
# File "C:/Plugins/04_fonctionSetCmd.py", line 23, in doIt
# self.outputTransform(obj)
# File "C:/04_fonctionSetCmd.py", line 40, in outputTransform
# print fn.getScale(S)
# File "C:\engserv\rbuild\195\build\wrk\optim\runTime\Python\Lib\site-packages\maya\OpenMaya.py", line 3217, in getScale
# TypeError: in method 'MFnTransform_getScale', argument 2 of type 'double [3]' //
It's a question of type... I know there is a MScriptUtil class and I've try it but it doesn't help me... I'm a "codeur du dimanche" (as we said in France) so if you have a sugestion, don't hesitate... ;)
Thanks in advance and have a good day!
I need help...
Here is my code:
if obj.hasFn(OpenMaya.MFn.kTransform):
fn = OpenMaya.MFnTransform(obj)
S = (0.0, 0.0, 0.0)
print fn.getScale(S)
And the error is:
// Error: line 1: in method 'MFnTransform_getScale', argument 2 of type 'double [3]'
# Traceback (most recent call last):
# File "C:/Plugins/04_fonctionSetCmd.py", line 23, in doIt
# self.outputTransform(obj)
# File "C:/04_fonctionSetCmd.py", line 40, in outputTransform
# print fn.getScale(S)
# File "C:\engserv\rbuild\195\build\wrk\optim\runTime\Python\Lib\site-packages\maya\OpenMaya.py", line 3217, in getScale
# TypeError: in method 'MFnTransform_getScale', argument 2 of type 'double [3]' //
It's a question of type... I know there is a MScriptUtil class and I've try it but it doesn't help me... I'm a "codeur du dimanche" (as we said in France) so if you have a sugestion, don't hesitate... ;)
Thanks in advance and have a good day!
