|
Behavior Edit
The Behavior Editor is an "immediate" effect in Model->Effect. The
Behavior Editor window lets you select objects within the current scene, create or edit a
TCL script, and then attach that script to the selected elements. The editor can also set
various attributes of the script such as: ordering, enabling and fcurve generation. The
ordering of a script is a real number between 0 and 1. The code with the least order will
execute first. One uses order cause one behavior (tcl code) to occur before another
behavior. the behavior whose order is less occurs first. Enabling is a way of turning
behaviors on and off withour removing code from objects. If you disable some attached
code, then it is not evaluated and the behavior the code causes does not occur. Fcurves
let you plot fcurves for ANY animatable attribute of the object being editted. Fcurve
plotting can be useful even if no there is no behavior (since it lets you plot fcurves
which Soft doesn't plot) but in conjuction with Enable it lets you use attached code to
get close to the behavior you want and then disable the code and use fcurves to tweak
things to perfection.
- Models,Lights,Camera,Materials,etc.
- Clicking one of these buttons will let you select from the elements of this type in the
scene.
- Edit Behaviors
- Brings up a new window with which you can attach code and set the codes order.
- Generate Fcurves
- Brings up a new window which you select Fcurves to plot.
- Quit
- Exits behaviorEdit.
- Element's Name
- Shows the name of the element that the user is currently editing.
- Executing Order
- A real number from 0 to 1 which defines the order of execution of the attached tcl
scripts. For example, 0.23 would execute before 0.37
- Enable Tcl Script
- Allows you to enable or disable the attached tcl script. For example, if the check box
is not checked, then the Behavior Evaluator will not execute the attached TCL script.
- Open File
- Allows you to insert the contents of a selected TCL (.tcl) file.
- Load Editor
- Always disabled (greyed out). It is currently not supported and is reserved for future
versions of SoftWish.
- Source File
- Allows you to select a TCL (.tcl) file. This filename will then be automatically
inserted into the text string "source selected_filename", which
will then appear in the edit window.
- Previous and Next
- Let you switch back and forth between selected elements.
- Attach
- Attaches data to the current element (the one named in the "Element's Name"
field.)
- Enable Selected Fcurves
- Plot the selected fcurves. A keypoint will be generated each frame. Keypoints are
generated after ALL code has been evealuated.
- Add
- Add to the fcurves which will be plotted.
- Delete
- Remove from the fcurves which will be plotted.
See Also
- Behavior Evaluate
Example
If you attach the following tcl script to an element by using the Behavior Editor, then
during execution by either of the Behavior Evaluators, behaviorSingle or behaviorEval, the
current frame number and the current element's name will be printed to the Softimage
Command Prompt window.
- puts "current frame is [SWB_getCurrentFrame]"
- puts "current element is [SWB_getCurrentElementName]"
|