I have a custom node that takes multiple meshes stored in one array attribute.
Meshes are added trough the for loop in python.
The problem is that compute() function is called each time when new mesh is added, which is absolutely redundant operation. I am interesting in computation only when all meshes have been added. Is there a way to call compute() only when for loop ends ?
for x in range(10):
cmds.connectAttr("pSphereShape1.outMesh", ("testNode1.inMeshe[%i]" % (x)))
MStatus testNode::initialize()
{
MStatus stat;
MFnTypedAttribute typedAttr;
mInputMeshe = typedAttr.create("inMeshe", "inM", MFnMeshData::kMesh, &stat);
typedAttr.setArray(true);
typedAttr.setWritable(true);
typedAttr.setHidden(true);
addAttribute(mInputMeshe);
MCHECKERROR(stat, "mInputMeshe error");
return(MS::kSuccess);
}