- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Context:
I've got a C++/CLI plugin which is used to create a new material plugin deriving from the Mtl class. The UI is built in C#.
Question:
How can I pass a Autodesk.Max.IMtl to my managed UI class from the native pointer?
I tried instanciating a Autodesk::Max::Wrappers::Mtl like so:
Autodesk::Max::Wrappers::Mtl^ mtlWrapper = gcnew Autodesk::Max::Wrappers::Mtl(static_cast<Mtl*>(this->pMaterial), false);
but I keep getting this compile error:
error C3767: 'Autodesk::Max::Wrappers::Mtl::Mtl': candidate function(s) not accessible
I tried making the Mtl class public in the same .cpp file
#pragma make_public(Mtl)
without success. Is there a way I can retrieve a managed object from a native pointer?
Solved! Go to Solution.
