Build Scripting

class BaseBuildScript

Bases: Plugin

Build scripting allows a user to run custom python code during each build stage. These build scripts will also be saved into the rigs configuration so when the rig loaded at a later time this scripts will be loaded once more.

Each build script is setup as a plugin which will be discovered by hive when the hives configuration is loaded.

id = ''
static properties()

Build script properties which will be passed to each method and provided to the buildScript UI Widget.

Each property is described as a dict containing the necessary information for the UI to generate.

Note

Only the following types are supported: #. filePath #. string #. boolean

Example filePath property

[{"name": "path", # the name for the property.
"displayName": "", # The display name for the property.
 "value": "", # The python object which makes the type.
 "type": "filePath", # The type for the UI generation. currently only supports filePath.
 "layout": [0, 0], # The UI grid layout column,row.
 "toolTip": ""

 }
]

When accessing the properties in pre/post methods it’s simply properties[propertyName] which will return the value. When you need to set the properties you set it on the rig meta node like so

rig.configuration.setBuildScriptConfig({"myBuildId": {"propertyName": "myValue"}})
Returns:

A list of property dict

Return type:

list

classmethod propertiesAsKeyValue()

Returns the properties as a key value pair

Returns:

A dict of properties

Return type:

dict

property rig

The current rig instance for the build

Return type:

zoo.libs.hive.base.rig.Rig

preGuideBuild(properties)

Executed Before Any guide has been build on the rig

postGuideBuild(properties)

Executed once all guides on all components have been built into the scene.

preDeformBuild(properties)

Executed before the deformation layer has been built or updated for all components.

This is the ideal point in the process to export skin weights if the skeleton already exists.

postDeformBuild(properties)

Executed after the deformation and I/O layers has been built for all components including all joints.

This is ideal point in the process to reimport skin weights if necessary.

preRigBuild(properties)

Executed before the rig Layer has been built for all components.

postRigBuild(properties)

Executed after the rig Layer has been built for all components.

postPolishBuild(properties)

Executed after the polish stage.

Useful for building space switching, optimizing the rig, binding asset metadata and preparing for the animator.

preDeleteGuideLayer(properties)

Executed before the guides of the rig gets deleted.

preDeleteDeformLayer(properties)

Executed before the deform layer of the rig gets deleted.

Note

This is pretty rare unless done directly through the API as we don’t provide deletion currently to the end user.

preDeleteRigLayer(properties)

Executed before the rig layer of the rig gets deleted.

preDeleteComponents(properties)

Executed before all components gets deleted on the rig.

Note

This method does get run when rig.deleteComponent get run use preDeleteComponent()

preDeleteComponent(component, properties)

Executed before a single component gets deleted.

Note

This method does get run when rig.deleteComponents get run use preDeleteComponents()

preDeleteRig(properties)

Executed when the entire hive rig gets deleted.

Note

preDeleteComponents() gets run before this method.