Auto-reload nodegraphhooks.py?

   1150   1   0
User Avatar
Member
96 posts
Joined: Feb. 2020
Offline
I'm adding some custom network functionality in C:\Program Files\Side Effects Software\Houdini 19.5.303\houdini\python3.9libs\nodegraphhook.py.

However, it seems like any time I want to test changes I've made, I need to restart Houdini. Is there some way to tell houdini to reload the module?
User Avatar
Member
55 posts
Joined: Oct. 2021
Offline
Try this code

import importlib
import nodegraphhooks as hook

importlib.reload(hook)

Also, I think it's better that you don't modify the "nodegraphhooks" Python file from the installation directory for safety reasons. You'd better make another Python library directory in the documents folder, so something like "C:\Users\alexa\OneDrive\Documents\houdini21.0\python3.11libs" and copy the "nodegraphhooks" from the installation directory to the documents folder.
Edited by martinalex - Jan. 25, 2026 08:05:16
  • Quick Links