C# access? Build C++ plug-in with /clr switch? (use C++/CLI)

C# access? Build C++ plug-in with /clr switch? (use C++/CLI)

Anonymous
Not applicable
554 Views
1 Reply
Message 1 of 2

C# access? Build C++ plug-in with /clr switch? (use C++/CLI)

Anonymous
Not applicable
I would like to program Maya plug-ins in .Net managed code (C#/VB).

Similar to 3ds Max .Net SDK.
Or a more limited solution, where I have to write wrapper code myself.

Then once it works, if necessary for performance, would rewrite some or all in C++.

Is there any solution?

-- Steve
0 Likes
555 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
I'm not a .NET expert, but I think your main problem would be that there are no headers/bindings for C# or VB.

A Maya plugin is simply a .DLL file that exports two functions:
MStatus initializePlugin( MObject obj )

and
MStatus uninitializePlugin( MObject obj )


If you can create that in .NET then you might be able use it, but you still don't have C# / VB bindings to use Maya functions in your code.

I might be wrong though.
Maya usually has no problems using external frameworks, as long as it can be loaded through a DLL.
0 Likes