I’m pretty noob to Maya and working with the Maya API.
I created a simple custom plugin locator for use as a hard-point node in our new Maya pipeline. (I override the draw() function and draw some custom geometry for the representation in the Maya viewport.)
The plugin works but I have a problem in that after a “createNode HardPointNode” command is issued, I cannot select the custom node in the viewport until I go to the parent transform of the newly created hard-point node and in the attribute editor under ‘Display’, enable “Display Handle” - at which point a little ‘+’ appears at the origin allowing me to select the node in the viewport.
I would like to do this automatically in the HardPointNode::postConstructor() but am having problems googling/figuring out how to do so. I think I need to get the parent of the new node’s DAGpath which would be the transform (?) but creating a DAG function set in the postConstructor() with “MFnDagPath nodeDpath(this);” doesn’t work/compile :?:
Any suggestions?
Marc