Message 1 of 2
Create an MPxTransform node in Maya outliner in cpp?
Not applicable
05-29-2015
12:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.