Hello everyone, I am trying to change the deform blendshape. I will be starting from zero with the example of Chad Vernon to a single input.
http://www.chadvernon.com/blog/resources/maya-api-programming/deformers/ Everything works as I want. The calculation is made good and distort what I want. I still have a few added options to achieve what I want but the bottom focntionne. But I am now looking to do the same with an input multi entry. And I block ... The node works but applies only in terms of my first mesh. for this I added a compound attribute. ------------------- MFnCompoundAttribute targetGeoCompoundAttr; aTargetGeoCompound = targetGeoCompoundAttr.create ("inputTargetGroup", "itg", & status); CHECK_MSTATUS_AND_RETURN_IT (status); CHECK_MSTATUS (targetGeoCompoundAttr.setReadable (true)); CHECK_MSTATUS (targetGeoCompoundAttr.setWritable (true)); CHECK_MSTATUS (targetGeoCompoundAttr.setKeyable (true)); CHECK_MSTATUS (targetGeoCompoundAttr.setStorable (true)); CHECK_MSTATUS (targetGeoCompoundAttr.setConnectable (true)); targetGeoCompoundAttr.setArray (true); targetGeoCompoundAttr.setIndexMatters (true); ------------------- and the deform I read like this ------------------- MArrayDataHandle targetArray = data.inputArrayValue (aTargetGeoCompound); targetArrayCount targetArray.elementCount int = (); for (int idx = 0; idx <targetArrayCount; idx ++) { targetArray.jumpToElement (idx); MDataHandle targetElement targetArray.inputValue = (); // Get Weight targetWeight targetElement.child = float (atargetWeight) .asFloat (); * = approx targetWeight; .... for (;! itGeo.isDone (); itGeo.next ()) { ...... } ------------------- I can not comprence is why it does not work ... someone an idea? -- 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/a4547125-c182-47cf-9238-7e87a0a5e7c7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
