I am using the setWeights method from the MFnSkinCluster class and
there are 2 types:

Single weight to a list of components (single influence object)
setWeights(MDagPath const &,MObject const &,unsigned
int,double,bool,MDoubleArray *)
setWeights(MDagPath const &,MObject const &,unsigned
int,float,bool,MFloatArray *)

Multiple weights to a list of components at once (multiple influence
objects)
setWeights(MDagPath const &,MObject const &,MIntArray &,MDoubleArray
&,bool,MDoubleArray *)
setWeights(MDagPath const &,MObject const &,MIntArray &,MFloatArray
&,bool,MFloatArray *)

I am trying to call the multiple weights my arguments as:
MDagPath: The shape Node
MObject: Derived from currentItem() from the MItGeometry class
MIntArray: Tried both a python list and  MIntArray. The same size as
the influence objects
MDoubleArray/MFloatArray: A tuple of the new values. The same size as
the influence objects
bool: Tried both True and 1
MDoubleArray/MFloatArray: A list of the old values. The same size as
the influence objects

I am getting the following error:
# TypeError: in method 'MFnSkinCluster_setWeights', argument 4 of type
'unsigned int' #  ('self' from the class is the first argument)

Which means its trying to execute the single weight method. I am
trying to avoid having to use the single weight method since it will
increase the loop dramatically or having to use skinPercent MEL
command.

Not sure if this is something I am doing wrong or if the Python API is
incapable of the multiple weight method.

Thanks for the help,
-brian
 www.meljunky.com


--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to