Hey there,
I am getting started with my 1st C++ script ever, and it is a maya plugin.
I have hit a wall Google couldn’t answer EXACTLY the way I want.
Ok so I have my plugin working and all BUT when I create my node, Maya put it under a generic transform named “transform1”.
if i do:
“createNode mynode”
result:
“|transform1|mynode”
To avoid this, you can do
“createNode mynode -n mynodeShape”
result:
“|mynode|mynodeShape”
Well I am been picky and don’t want to do that.
if I do
“createNode locator”
the result is
“|locator1|locator1Shape”
I would like my node to have the same behavior.
"createNode mynode:
result:
“|mynode|mynodeShape”
#########################################
From google I found this:
http://ewertb.soundlinker.com/api/api.016.php
Quote
"
void myMPxLocatorNode::postConstructor()
{
MFnDependencyNode nodeFn(thisMObject());
nodeFn.setName(“myNodeTypeShape#”);
}
"
Been REALLY picky, I am am wondering if this is the only solution available, because that method rename my node AFTER creation, not AT CREATION.
Is that how Maya function internally when creating a standard Maya Node?