SimpleMod2 vs. SimpleMod

 
 
 
Posted by:MrSparkle
Data created:27 May 2010

Hi,

I want to write a modifier plugin. In the SDK article "How to write a simple modifier" I read that you need to inherit from the SimpleMod2 class, but I couldn't find this class. Is there a reason, why it's not implemented in the .NET wrapper or can I just use the SimpleMod class instead?

Thanks,
Christian

Hi Christian,

Not sure why you can't find it but it is there, this is from the Autodesk.Max.dll source code, located under Autodesk.Max.Plugins namespace:

public abstract class SimpleMod2 : Autodesk.Max.Plugins.SimpleMod, Autodesk.Max.ISimpleMod2
...

Which Max version are you using?

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Hi Marsel,

thank you very much for your quick reply! I'm using 3ds Max 2009 and it works with the ISimpleMod2. I was just a little bit confused because SimpleMod was a class, and I haven't looked for an interface...^^

Christian

No problem Christian.

If you are writing a plugin (not just using another plugin) you should derive it from Autodesk.Max.Plugins.SimpleMod2 (not ISimpleMod2). This will make it pluggable.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

I don't know why but the class Autodesk.Max.Plugins.SimpleMod2 can't be found. Only Autodesk.Max.Plugins.SimpleMod is available. Do I need to upgrade the Max.Net classes or 3ds Max?

Christian

Yes, you're right. It seems Max.NET for 3dsmax 9 and 2009 doesn't have SimpleMod2 exposed, however 2010 and 2011 has it. I will look into why this happens and try to fix for next build.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Thank you. However, it is not urgent because I just figured out that I have to inherit from the Modifier class anyways.

Christian