Thursday, February 26, 2009

Including Scripts Within MacroScripts

A typical MacroScript will usually start like this:

macroScript scriptName category:"CategoryName"

The MacroScript could hold more then one macros in the same *.MCR file.

macroScript Free_Camera category:"Cameras"
tooltip:"Free Camera" Icon:#("Cameras",2)
   StartObjectCreation FreeCamera

macroScript Target_Camera category:"Cameras"
tooltip:"Targeted Camera" Icon:#("Cameras",1)
   StartObjectCreation TargetCamera

But there is one more cool extras - fileIn to refer to external *.MS file:

macroScript MaxToFBX
tooltip: "Export to FBX"
   fileIn (GetDir #Scripts + "\\")

At this time there is no way to encrypt MacroScripts (.mcr).
So this method is suitable for encrypted MaxScripts (.mse).
And for other purposes too.

No comments:

Post a Comment

Thanks for your comment