>> On-Created Python Script
Houdini's Eventing Handling Type Operator tab allows scripts to be implemented based upon actions taken within the project scene.
On-Created refers to running a specific script when the HDA is dropped to scene. This event is utilized by using an empty HDA.
Instead of baking SOP and SHOP networks to the HDA, an On-Created Python script runs once the empty HDA is dropped to scene.
This script constructs and configures the SOP and SHOP networks that make up the geometry and surface shader elements of the Rubiks Cube.
By generating the asset with a Python script, all respective elements of the asset have defined namespace variables. This allows name-association with other modules to remain transferable and consistent. Also, by generating the asset through script, flawless implementation to scene is guaranteed.
The script creates 27 cubes, parents a null to and names them, binds a 6 group surface shader to them, extrudes them for additional poly detail, and promotes their translation values to global parameters. The shader is also created and colorized via Python script. |