|
If you needed to attached script code to objects, then use a text property and apply it to the relevent objects.
Most workflows don’t attach “scripts” to objects. Rather, you’d be creating custom properties with the parameters and values you desire, and apply that to the object(s) in question. When exported, the engine/parser on the other end would be able to interpret that data as needed.
I would advise reading the appropriate material in the SDK guides about creating your own custom properties (Help > SDK Guide > customizing with the SDK > Custom Properties).
The workflow is pretty simple:
1) write your script that defines the self-installing custom property and it’s parameters.
2) install (drag n’ drop) the custom property into the ‘plugins’ folder of your workgroup
3) Inside Softimage, apply custom property to scene object(s). Usually accomplished with a simple script that iterates through the selection list and applies the property using ProjectItem.AddProperty().
4) Open the PPG for the custom property and edit values as desired.
5) export scene to your game.
I would advise using ‘self-installing’ custom properties because they have some built-in properties that are really handy. The main advantage is all instances of the custom property have the same “type” so tools can find the properties easily and not have to rely on object names. You also have the ability to create custom UI for the property to arrange controls in the PPG as you like. If you need to modify the PPG layout, just make the changes in the custom property’s script and it’ll be reflected in all instances deployed in scenes next time they’re opened/refreshed.
Although customparamsets created through the “parameter” menu of the Animation toolbar could also be used, they’re localized to the scene in which they were created, don’t have UI customization capability, and cannot be uniquely identified by tools. Therefore, you’d have to regenerate the customparamset from scratch each time you need it.
|