Published Functions and MAXScript
 
 
 

MAXScript automatically provides access to all functions published by a plug-in via the FnPub system. The current scheme is experimental and may change somewhat. Each plug-in class appears in MAXScript as a 3ds Max class object, that can be used to construct instances of the plug-in, do class tests, etc. If a plug-in publishes interfaces, they are visible in MAXScript as properties on this class object. The internal name for the interface is used as the property name. All the functions in the interface are accessible as named properties on the interface. So, if the previous example interfaces were published by EditMesh, the following script frags would work:

EditMesh.faceOps.extrude $foo.mesh #{1,2,3} 10

calls the Extrude function in the FaceOps interface on $foo's mesh, faces 1, 2 and 3, amount 10 units.

EditMesh.actions

retrieves and displays the action functions. Each interface is stored as a struct definition in the class object.

EditMesh.actions.create ()

starts (or stops) the create mode. This would (should!) have the side-effect of highlighting/unhighlighting the Create button in the EditMesh rollups. Calls to Action functions in MAXScript return true if the function returns FPS_OK and false otherwise.

if EditMesh.actions.create.isChecked() then ...

The predicate functions for an Action Function are available as properties on the action function object itself, as shown. You can determine if a predicate is supplied by asking:

if EditMesh.actions.create.isChecked != undefined