first plugin (no doc?)

 
 
 
Posted by:xen
Data created:6 December 2009

Hello,

I was trying the free version available on the website (only 2 dll files).

My plugin inherits from IPlugin. However, it doesn't seem to be loaded (I have put it in plugins\MaxDotNet). Is there anything to do to get it loaded? Has plugin path changed maybe? Or it might need to be activated through remoting (in that case, what client should I use to connect to 9998?).

I have seen no documentation about how to use it (and .chm at http://www.ephere.com/autodesk/max/docs/ is leading to an error webpage).

Thanks in advance,
xen

Hi Xen,

My plugin inherits from IPlugin. However, it doesn't seem to be loaded (I have put it in plugins\MaxDotNet). Is there anything to do to get it loaded?

Max.Net will look only in the 3dsmax plugin directories, that is directories specified in 3dsmax/plugin.ini. If MaxDotNet subfolder isn't specified there it will not load. If placing your plugin in /plugins dir. doesn't work also make sure that "Load Plugins on Startup" option is enabled in MaxDotNet settings (in utilities list).

Cheers,

Marsel

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Thanks for your quick answer.

Actually I tried putting it in plugins directly before. The problem was that I was targetting .NET 4.0. Switching back to 3.5 fixed the issue (however I am surprised as using both .NET 3.5 and .NET 4.0 should be fine).

Just one last question, how can I make my plugin unload so I don't have to restart max?

Thanks again,
xen

Actually I found how to make everything reload, thanks again. Please keep up the great work, hope it gets integrated in 3ds Max Core sometime soon!

xen

            else if (objectState.Obj.CanConvertToType(ExporterPlugin.Global.TriObjectClassID) != 0)
            {
                ITriObject triObject = (ITriObject)objectState.Obj.ConvertToType(0, ExporterPlugin.Global.TriObjectClassID));
            }

How come the following piece of code doesn't work? CanConvertToType returns 1, but then the object resulting from ConvertToType is of type GeomObject, which is not castable to ITriObject.

I probably missed something, can you please tell me what I am doing wrong? Or maybe there is some more advanced tutorial/sample available somewhere to help me getting started?

Thanks
xen

Hi xen,

This is strange, ITriObject should be upcast properly from those methods. What is the ClassID of object being returned?

Marsel

Marsel Khadiyev (Software Developer, EPHERE Inc.)

ClassID is E44F10B3:0 and ClassName is Editable Mesh

.NET object is Autodesk.Max.Wrappers.GeomObject