Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create an MPxTransform node in Maya outliner in cpp?

1 REPLY 1
Reply
Message 1 of 2
EarthHobbit
341 Views, 1 Reply

Create an MPxTransform node in Maya outliner in cpp?

In cpp, I am looking for the code to create an MPxTransform node in Maya with reference in the outliner. However my code does not add a transform node in the outliner. What am I missing from the code below ?

 

.h:

class myMPxTransformClass : public MPxTransform
{
public:
myMPxTransformClass();
virtual ~myMPxTransformClass() {};
};

 

.cpp:

myClass::myClass() // Entry point: This one is executed
{
myMPxTransformClass prox;
MPxTransformationMatrix *transformMtrx;
transformMtrx=prox.createTransformationMatrix();
// What is missing here to get the node registered in Maya ?
}

myMPxTransformClass::myMPxTransformClass() // This one is executed
{
MGlobal::displayInfo("MPx Initialized");
}

Thanks.

1 REPLY 1
Message 2 of 2
cheng_xi_li
in reply to: EarthHobbit

I can't find something fishy in your code, please make sure you have registered the plugin properly with registerTransform.

 

There is a sample(rockingTransform) in our devkit, you can reference it for more details.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report