Posted by Christopher Diggins, 30 November 2009 6:56 pm
If you have a plug-in which you don’t want exposed to the 3ds Max user interface you can return “FALSE” (or 0) from the “IsPublic()” exported DLL function. This has the sometimes undesirable side-effect that MAXScript can’t create the object.
To explicitly expose the hidden class to MAXScript you can use the MAXClass macro. For example adding the following line to a modifier plug-in project named DeleteSplineModifier would expose it to MAXScript even if it IsPublic() returns FALSE:
MAXClass delete_spline (
_T("DeleteSplineModifier"),
Class_ID(SDELETE_CLASS_ID, 0),
OSM_CLASS_ID,
&modifier,
md_auto_parms,
end
);
Please only report comments that are spam or abusive.
1 Comment
Chris Johnson
Posted 3 April 2010 7:57 am
this class... MAXClass is not a macro, but a class definition found in:
\maxsdk\include\maxscript\maxwrapper\mxsobjects.h
(using the new file name... sorry but I'm not looking up the old file name in pre Max 2012 SDK's)
And that class takes a variable arguments constructor... *Hideous*. So you better know what you are doing when using it, cause those things are notoriously difficult to debug.
Add Your Comment
You must be logged in to post a comment. Login or Register here