You can use logic in a SPDL file to define event handlers for custom properties and provide the implementation of a scripted operator.
The Logic section uses the same scripting engine as the Autodesk Softimage Script Editor and gives access to all the native Softimage commands and the object model. You can also access a global variable called the PPG, which represents the property page and provides access to all its parameters. For more information, see the PPG and PPGLayout.
Logic can be specified anywhere in the SPDL file, delimited by the following block:
BeginScript
...script
EndScriptThis block does not use curly braces, so it can be used with any scripting language supported by Softimage and is the recommended way of specifying logic.
You can also use the following properties, which are specified outside of the logic block:
• Language—allows you to specify a scripting language other than VBScript for the Logic in your SPDL file.
• LogicFile—allows you to specify external script file that contains your code.
• LogicPrefix—like namespaces for external script files that implement handlers for more than one property.
![]()
|
In older SPDL files, the logic block was contained between the word Logic, followed by curly braces: Logic
{
... script
}
However, this style cannot be used for languages like JScript, which use curly braces as part of their internal syntax. |
![]()
|
You cannot use SPDL comments inside the code of the Logic section. You must use only the comment style of the Language specified for the SPDL file. |
SPDL files use the same event handlers as custom properties. For more information, see Property Callbacks.
Autodesk Softimage v7.5