Q100142: How to execute Hiero Python code in NukeStudio on startup

Follow

SUMMARY

This article explains where to place a script containing Hiero specific Python commands to ensure they will be executed correctly in NukeStudio on startup.

 

MORE INFORMATION

To run Hiero custom Python code in NukeStudio at startup you need to add your code to the following location:

~/.nuke/Python/Startup

This is the Hiero file structure for Python customisations. 

 

Please note that the above folders do not exist by default and will need to be created manually on first use inside your .nuke directory. More details on accessing your .nuke directory can be found in this article: Q100048: Nuke Directory Locations

NEXT

  1. Create a new text file and add your custom Hiero Python code do it.
  2. Rename the file to init.py and make sure file extensions are shown in your file browser when you do this, to verify that the file extension is .py and not .txt or different.
  3. At this point you might see a warning message telling you that you are about to change the file type which might make the file unusable. Ignore this as the extension .py is expected and will be recognised by NukeStudio.

 

Placing custom Python code that is specific to Hiero in the init.py or menu.py files in your .nuke directory leads to the following error when launching NukeStudio 9.0v1 and later:

ImportError: No module named _fnpython

 

Was this article helpful?
0 out of 0 found this helpful