Can you create a DG node in MPxDeformerNode.accessoryNodeSetup()?

Can you create a DG node in MPxDeformerNode.accessoryNodeSetup()?

jmreinhart
Advisor Advisor
547 Views
1 Reply
Message 1 of 2

Can you create a DG node in MPxDeformerNode.accessoryNodeSetup()?

jmreinhart
Advisor
Advisor

I am doing some testing so see if something like MODO's gradient graph (https://vimeo.com/361945999) is possible in Maya. To do this I have given my deformer several weightList attributes (like a skinCluster) and I want to create an empty weightHolder deformer (which will share the same deformer set as the one with the weightList but would perform no deformation) and a DG node that will split the weights using animCurves (or some re-implementation of the same sort of interface).

 

It seemed like this should be done through the accessoryNodeSetup() method. But every example I have seen only creates DAG nodes in that method. Is it possible to create DG nodes using the MDagModifier class?

0 Likes
Accepted solutions (1)
548 Views
1 Reply
Reply (1)
Message 2 of 2

jmreinhart
Advisor
Advisor
Accepted solution
MStatus translateUVN::accessoryNodeSetup(MDagModifier& 	cmd)
{
	// hook up the weightHolder node
	MStatus result;
	MDGModifier& cmd_dg = cmd;
	cmd_dg.createNode(MString("blendColors"));

	return MS::kSuccess;
}

The first part of my question turned out to be quite simple once I understood the syntax a bit more (https://www.youtube.com/watch?v=oIV2KchSyGQ).

 

I'm still curious about whether I'm working towards it in the wrong way though, so any help would be appreciated.

0 Likes