In the example, you can run some code every time a new scene file is loaded after adding event callback. Can add the script in a separate file in HOUDINIPATH/scripts so it runs everything you start Houdini? I tried that but it doesn't seem to be working.
I am trying to write a script to save and load flipbook setting. I want it to load the settings when the file loads and save the settings to a node when file closes/saves
place your event script in this file, so that it is added when Houdini session is run: $HOUDINI_USER_PREF_DIR/python2.7libs/pythonrc.py
or if you are just looking for functionality to run stuff after you load any existing scene as you mentioned then as explained on the same page you can as well just include the code in: $HOUDINI_USER_PREF_DIR/scripts/456.py without adding any event
place your event script in this file, so that it is added when Houdini session is run: $HOUDINI_USER_PREF_DIR/python2.7libs/pythonrc.py
or if you are just looking for functionality to run stuff after you load any existing scene as you mentioned then as explained on the same page you can as well just include the code in: $HOUDINI_USER_PREF_DIR/scripts/456.py without adding any event
Ah I see, if I want to install the script to other computers you need to append the code to their own pythonrc.py/456.py? So the main procedure is in another script file in “scripts” and I can have a callback function in pythonrc.py to call the main procedure after the scene is loaded?