Saving and Loading Expressions

You can save the current contents of the expression editing pane as a file then load it back later on other parameters. Expressions are saved as plain text files with an extension of .expr2. By default, they are saved in the Expressions folder of the current project.

As well, you can save and load expression presets.

 

Expressions are not validated when saving—the contents of the editing pane are written as is to file. Similarly, expressions are not validated when opening—the contents of the editing pane are replaced with the contents of the .expr2 file.

To save the contents of the editing pane in an expression file

Choose one of these commands from the expression editor’s File menu:

Save—If you have already opened or saved an expression file, it is overwritten on disk with the current contents of the editing pane. Otherwise, you are prompted for a file name as with Save As.

or

Save As—A browser opens, prompting you for a file name and directory.

To open a saved expression file

Choose File > Open in the expression editor, then use the browser to select the desired .expr2 file.

 

You cannot open a binary .exp format expression file from SOFTIMAGE|3D directly. Instead, import a scene or model with the expression in it.

To save an expression preset

1. In the explorer, expand the parameter whose expression you want to save as a preset.

2. Click the Expression operator icon to open its property editor.

 

3. Click the Save button in the expression editor to open the browser.

 

4. Enter a name and location for the preset.

 

You can edit the Definition and save numerous versions of this expression as presets.

To load a preset

1. Select the parameter to which you want to apply a preset.

2. Click its Expression operator icon to open its property editor.

3. Click the Load button and select a preset from the browser.

Importing Expressions from SOFTIMAGE|3D

When importing scenes and models with expressions from SOFTIMAGE|3D, you should be aware of a slight difference that affects a small number of cases. With the distance functions ctr_dist, ctr_dist_cam, and ctr_dist_cam_int, SOFTIMAGE|3D does not evaluate past the object name. This means that in SOFTIMAGE|3D the following string is valid even if obj1 is not on a path:

ctr_dist(pref.obj1.trans, pref.obj2) 

However, when the expression is imported, the result is invalid because SOFTIMAGE|XSI tries to resolve the path reference. To avoid this and similar problems, change pref.obj1.trans to pref.obj1 before importing.

Other Differences from SOFTIMAGE|3D

 

The following are some other differences between expressions in SOFTIMAGE|3D and SOFTIMAGE|XSI:

• The SOFTIMAGE|3D function has_relation() is not supported in SOFTIMAGE|XSI.

• The modifiers .L and .G are not used to specify local and global transformations. SOFTIMAGE|XSI specifies these parameters with .local and .global in a context like this:

   sphere.kine.local.posx
   sphere.kine.global.posx

• You cannot combine expressions and function curves directly on the same parameter. To do this, you must use actions—see Storing Expressions [ Nonlinear Animation ].

• SOFTIMAGE|XSI does not support local variables. If you import a scene from SOFTIMAGE|3D containing local variables, they will be expanded. You can use custom parameters to mimic local variables, as described in Using Custom Parameters as Variables.



SOFTIMAGE|XSI v.7.0