I'm learning python hom and I tried to create a python otl node that can detect the inputRewired event.So I get the hou.Node.addEventCallback function and test it working fine in python shell.But here comes the problem,I have to manully run this code to make it work.Can I make the python otl node run the addEventCallback by itself when it's created just like some inital_script?
appreciate for your reply.
how the python otl node initial?how to add initial script?
1855 2 0- kingatsid
- Member
- 13 posts
- Joined: 10月 2012
- Offline
- graham
- Member
- 1922 posts
- Joined: 11月 2006
- Offline
You can add a node event callback from the OnCreated event handler section.
http://www.sidefx.com/docs/houdini12.1/hom/assetscripts [sidefx.com]
There is also an OnInputChanged event handler which you could also use.
http://www.sidefx.com/docs/houdini12.1/hom/assetscripts [sidefx.com]
There is also an OnInputChanged event handler which you could also use.
Graham Thompson, Technical Artist @ Rockstar Games
- kingatsid
- Member
- 13 posts
- Joined: 10月 2012
- Offline
thanks graham,sorry for my overdue reply.
the script tab looks great.but I still have some question.
the event list have an arrow ‘up’ button on the left side,does it means that the order of these event callbacks I've created had to been taken carefully?
I put a ‘get geo’s attribute' code on the OnInputChanged but it didn't get the attribute the python node just update,it return the previous one that it disconnected.why?
the script tab looks great.but I still have some question.
the event list have an arrow ‘up’ button on the left side,does it means that the order of these event callbacks I've created had to been taken carefully?
I put a ‘get geo’s attribute' code on the OnInputChanged but it didn't get the attribute the python node just update,it return the previous one that it disconnected.why?
-
- Quick Links