MaxScript Release 0.31 Source for max 4 (07/05/2001)
Copyright (c) 2001 by Borislav Petrov, Bobo's
Rendert**ls.
SHORT DESCRIPTION
SpookyHide will let you define
sets of Triggers and Reactors. When a Trigger is selected or deselected,
the display of the Reactors will be changed.
Possible display options include Hide,
Freeze, SeeThru, BoxMode and BackfaceCulling.
Using SpookyHide, you can for example
hide all bones whenever the Skin Mesh is selected, or change the Skin to
SeeThru whenever a Bone is selected...
INSTALLATION
SpookyHide is a R3-style MacroScript
with a Floating Rollout.
Download and Unzip the distribution
file to your \Scripts directory.
Start max 4, select MAXScript > Run
Script and select the file (Alternatively open Windows Explorer and drag&drop
the file to your Max Viewports)
Right-click a toolbar, select Customize...,
find Category "Bobo_s Tools" and drag&drop SpookyHide to
the toolbar.
(Alternatively you can place it in a QuadMenu
or assign to a Keyboard Shortcut)
Press the button / select the QuadMenu Item
/ press the Shortcut to launch the script.
FEATURES AND USAGE
Version 0.31 (07/05/2001)
.Fixed a bug preventing objects containing
spaces and other special characters from working with the script.
Version 0.3 (03/23/2001)
Added a new SELECT Reaction. When a Trigger
gets selected, all Reactors will become selected INSTEAD. To be used as
"Selection Handler" a la Maya.
Version 0.2 (02/12/2001)
When started, SpookyHide will
create a default empty set of Triggers/Reactors called "New Set".
You can add more sets to the scene by pressing
the [New] button in the "Manage Sets" group of controls.
The current content of the text field will be used as the name.
You can rename the current set by entering
a new name in the text field and using the [Rename] button.
The [Delete] button will be disabled
unless there is more than one set in the scene. Press the button to delete
the current set - you will be prompted for confirmation.
SpookyHide stores its data in
a persistent global variable inside the MAX scene. This means that all
sets are scene-specific.
To enable the SpookyHide sets in the current
scene, you have to open the floater. (If you load a scene with existing
SpookyHide data, the reactors will not do anything until you launch the
script)
Each set can be Enabled or Disabled. The state
of the current set is shown by the [On] checkbutton.
The state of ALL sets are displayed as "+"
and "--" in front of the sets' names.
To toggle a single set on or off, press the
[On] checkbutton.
To enable all sets in the scene, press the
[All
On] button. This will also generate callbacks for all defined sets
and will thus activate them.
To disable all sets in the scene, press the
[All
Off] button. This will also deactivate all callbacks in the scene and
basically disable SpookyHide reactions.
To enable all disabled sets and vice-versa,
press the [Invert] button.
A SpookyHide set requires two
group of objects: Triggers and Reactors. Triggers are objects whose selected/deselected
state controls the display of the Reactors.
To define one or more Triggers, select them
in the scene and press [Get Triggers]. If the selection is empty,
you will be prompted about rsetting the list.
To ADD Triggers to the list, press [Select
Triggers] first - all currently defined Triggers will be selected in the
scene. Using Ctrl+Click select more objects and press [Get Triggers]
again
to update the list.
To UPDATE the list after deleting some Triggers
from the scene, press [Select Triggers] and then [Get Triggers]
again
to update the list. Only existing objects will be included.
To select a single Trigger in the scene, double-click
it in the list.
Reactors management works exactly the same
way.
Each set has a REACTION defined by the "If
Trigger Selected/Deselected" dropdown list. It defines the changes
to be applied to all Reactors when a Trigger is being selected or deselected.
The first word defines the Action on Trigger Selection, the second on Deselection.
For example, Hide/Unhide Reactors will Hide the Reactors when a Trigger
is selected and will Unhide them when the Trigger is deselected.
Changing the Reaction will update the set
immediately in the scene as long as it is not disabled.