I am trying to run some commands when opening a scne in houdini, and thought of using 456.py for this.
however whatever the command I write there, nothing happens, even when I try to print a couple of words :
print('scene loaded')
I have the same behavior in Houdini Core and Houdini FX.
I also use 123.py and houdinicore.py for other commands, and both are loading and behaving correctly. They are all located in $HSITE/houdini18.5/scripts and pythonrc.py (also working) is located in $HSITE/houdini18.5/python2.7libs
my only issue is with 456.py, also located in $HSITE/houdini18.5/scripts
I am trying to run some commands when opening a scne in houdini, and thought of using 456.py for this.
however whatever the command I write there, nothing happens, even when I try to print a couple of words :
print('scene loaded')
I have the same behavior in Houdini Core and Houdini FX.
I also use 123.py and houdinicore.py for other commands, and both are loading and behaving correctly. They are all located in $HSITE/houdini18.5/scripts and pythonrc.py (also working) is located in $HSITE/houdini18.5/python2.7libs
my only issue is with 456.py, also located in $HSITE/houdini18.5/scripts
any ideas ?
Is there another 456.py in the path somewhere? I think Houdini only sources one of them.
that was the issue. after some digging I saw that a couple of plugins we use have their own 456.py. Our own file gets ignored as soon as one of these is enabled. is there a way to load several 456.py? I started looking at scene file events to execute scripts when houdini opens/loads a scene but I did not get how/where to set eventcallback like the one example in the doc :
defscene_event_callback(event_type):hou.ui.displayMessage("An event of type {} occured".format(event_type))hou.hipFile.addEventCallback(scene_event_callback)
should I add it the the python2.7libs/pythonrc.py file to be executed by houdini for every scene event?