User guide
120
The parameter editor is resolved automatically in cases where the user is allowed to change properties. The UI4 and
VpCore packages are imported within this scope, because this function is only called in interactive mode (these
packages are not allowed in batch mode).
In the init file, __init__.py, we import the camera asset, append it to the plug-in registry as an Importomatic module,
and pass in the registration function. Alternatively, pass an additional GUI registration function ( if needed) in the
form of a tuple.
PluginRegistry=[ ]
import CameraAsset
PluginRegistry.append(
( "ImportomaticModule", "0.0.1", "CameraAsset", CameraAsset.Register),
)
Custom Hierarchy Structures and Extensions
Enhancing the functionality of a module requires following a specific design pattern, where the core ideas are:
• No global variables are allowed. Instead any persistent data must be written as parameters on the primary node.
This parameter metadata is used to generate the underlying Node Graph, and corresponding hierarchy structure
in the Importomatic interface.
• The module class returns an object of type AssetTreeChild, which corresponds to the root item of the tree.
• The remaining nodes in the tree are implemented using a class, which extends a base handler where each derived
class either inherits or overrides the functions that interact with the UI.
• A separate GUI registration is defined in the init file, to avoid errors while running Katana in batch mode.
16 CREATING NEW IMPORTOMATIC MODULES | CUSTOM HIERARCHY STRUCTURES AND EXTENSIONS