Hi guys! 

I am working on a little tool to optimize the speed of importing and 
exporting weights of many deformers on a large number of geometries. I got 
it to work for the skincluster using the MFnSkinCluster, and I was looking 
into the MFnWeightGeometryFilter  for the other type of deformers but I 
soon realized it doesn't work for every deformer.

In particular, with a simple cluster, this works:
*from maya import cmds*
*import maya.OpenMaya as om*
*import maya.OpenMayaAnim as oma*

*deformer = "DEFORMER_NAME"*
*mSel = om.MSelectionList()*
*mSel.add(deformer)*
*deformerObj = om.MObject()*
*mSel.getDependNode(0, deformerObj)*
*deformerFn = oma.MFnWeightGeometryFilter(deformerObj)*

*deformerFn.setWeight(.............)*


However if I try this with a lattice I get a* kInvalidParameter *error*. *

I tried to look into *MFnLatticeDeformer *but it seems like it does not 
have *setWeight *methods. 

Do you have any idea? I guess it is a trivial problem with an obvious 
solution and hopefully I just need fresh eyes to look at the problem...

Thanks in advance guys!
Cheers,
Daniele

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/962a1d9d-d58c-4278-b0a9-97d0b779896cn%40googlegroups.com.

Reply via email to