Hello there!
My goal is to write logic so when with File open (tk-multi-workfiles2) a New file is created in a Shading step.
I figured out I need the SceneOperation Hook class.
For maya, I added it to the env/includes/settings/tk-multi-workfiles2
hook_scene_operation: "{config}/tk-multi-workfiles2/maya/scene_operation_tk-maya.py"
I also made it so my implementation of this class will only catch the proper cases:
if operation == "new_file" and context.step['name'] == 'Shading':
In any other cases, the parent class will process the call.
But Iāve got two problems:
- On first run, the SceneOperation Hookās execute function is not even called at all.
- On any other run, it is called twice, which is also unfortunate.
What am I missing here?
Thanks in advance!