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.
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?