Workfiles new file hook

For one of our maya tasks we need to import a different file automatically when someone presses the new file button…

When I log out all the operations in the scene_operation hook I see a prepare_new stage. Should I put that logic there or should I use the reset block.

Photoshop is the only default hook that I see to use that.
If I remember correctly from tk-workfiles1 reset was also called before an open operation which I wouldn’t want to do.


I think off the top of my head, that prepare_new is the one you want to use, and that reset gets called sometimes as part of other actions, such as opening. Although in Photoshop it won’t reset the scene, has it handles multiple files being open at the same time.


Thanks. It might be helpful to have that operation stubbed out in the default hooks so it’s more obvious that is a stage you can use.