Filter functions for context-sensitive menus.
Use this for .IsEnabled or .IsVisible handlers in macroScripts. isEnabled and isChecked handlers have been added to many of the existing macroScripts. All of the modifier, creation, and polygon toolbox macroScripts have these two handlers.
These handlers allow object creation CUI buttons to turn green while creating objects, and modifier buttons are only enabled if they apply to the current selection. Moreover, the polygon toolbox buttons only enable when applicable, and the selection level buttons stay pressed while in the sub-object level.
This structure is defined in .\stdplugs\stdscripts\ FilterFunctions.ms.
An example of filter functions is available in the Selection and Display Callbacks Script File, .\stdplugs\stdscripts\ Selection_Display_Filters.ms
#Struct:Filters( Is_EditMesh:<fn>, Is_NURBS:<fn>, Is_EditPoly:<fn>, Is_EditPatch:<fn>, Is_EditSpline:<fn>, Is_MeshSelect:<fn>, Is_PolySelect:<fn>, Is_SplineSelect:<fn>, Is_PatchSelect:<fn>, Is_PosXYZ:<fn>, Is_RotationXYZ:<fn>, Is_ScaleXYZ:<fn>, is_Child:<fn>,
This is used for the new IK assignments.
This is used for the new IK assignments.
CanSwitchTo_XXXX for SubObject levels:
CanSwitchTo_Vertex:<fn>, CanSwitchTo_Edge:<fn>, CanSwitchTo_Face:<fn>, CanSwitchTo_Polygon:<fn>, CanSwitchTo_Element:<fn>, CanSwitchTo_Border:<fn>, CanSwitchTo_Patch:<fn>, CanSwitchTo_Segment:<fn>, CanSwitchTo_Spline:<fn>,
These can be used to check if MeshSelect, PatchSelect, SplineSelect, Edit(able) Patch, Edit(able)Mesh, and Edit(able) Spline can go into these subobject levels.
The following requires a node to be passed into the function:
These return true if the selected object’s function name condition is met.
Returns true if the node is a target of a LookAt controller, false otherwise.
Returns true if the node's base object has the specified property, or if the base object is a scripted plugin, and the delegate has the specified property. Is either a string or name value.
Returns the value for the node's base object property, or the delegate's property if the base object is a scripted plugin. If the specified property is not found, a name value of '#error' will be returned. Is either a string or name value.
Sets the value for the node's base object property, or the delegate's property if the base object is a scripted plugin. If the specified property is not found, or does not accept the type of value specified, a name value of '#error' will be returned. Is either a string or name value.
Toggles the value for the node's base object property, or the delegate's property if the base object is a scripted plugin. If the specified property is not found, or is not a boolean, a name value of '#error' will be returned. Otherwise the property's new value will be returned. Is either a string or name value.