Tutorial for creating a MaxScript function?

 
 
 
Posted by:MiloDC
Data created:13 November 2009

Extending IMAXScriptFunction in C#, I've implemented the interface and have been promptly presented with a ton of methods and properties.  :)

        public IValue Body { get; set; }

        public GlobalDelegates.Delegate21 CCallableFn { get; set; }

        public short Flags_ { get; set; }

        public short KeyparmCount { get; set; }

        etc.

 

I could sit here and figure out all this stuff, but why do that when I can just modify a sample project?

P.S. I'm well versed in MaxScript, and experienced in writing C# projects and Max SDK C++ plug-ins, so a basic C# sample project is all I really need.

 

Hi Milo,

I will try to make a sample for creating MXS function. Actually it has to be done by creating a Primitive class instance with a c# delegate. It was possible before but in current build it won't work. I'll try to add it back in in the next build.

Marsel

Marsel Khadiyev (Software Developer, EPHERE Inc.)

"I will try to make a sample for creating MXS function. Actually it has to be done by creating a Primitive class instance with a c# delegate. It was possible before but in current build it won't work. I'll try to add it back in in the next build."

 

Thanks, this would help me a lot!

 

Is there any update on this? I'm trying to use Max.NET to expose a function to MXS.


Thanks!!

Hi Stephen,

I'll try to push this for the next build. I have some progress on this but I didn't manage to put it into the current one.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Hi,

Please have a look here. This isn't a direct way of creating MXS function but it should do what you're looking for.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Hi,

Your link is pointing on this same thread...

I'm trying also to publish a method to MaxScript and i'de love a sample/tutorial.

Meanwhile, i've tried a different approach by accessing directly a method like in the example: http://www.ephere.com/autodesk/max/docs/987.html but got an error "-- Runtime error: Cannot resolve type: MaxUtils.MeshUtils".

Thanks.