Houdini Python - 03 Python Node
- Ravi Motwani
- Feb 21, 2024
- 1 min read
Updated: May 8, 2024
In this we will be making a Custom Python Node for writing scripts which can be useful for making of scripts , HDA and may more. This is very much dependent on previous video from playlist . Hope will make sense, do comments for betterment or any confusion.
Tried to explain as follows topics :
1. Current Node / Self Node Check
2. Creating custom parameter ( string , button ) in a node
3. How to get value of parameter for a node.
4. execute command through button
5. difference between HDA and basic node.
Understanding the need and having this node is very useful when one is trying to execute set of commands at personal level, later we will see it implements in HDA and scripts.
code snippet for null node to work as python node in callback script:
exec(hou.pwd().parm('parameter_name').eval())
code snippet for subnet node to work as python node HDA:
callback script:
hou.pwd().hm().custom_function(kwargs)
script tab in HDA:
def custom_function(kwargs):
node = hou.pwd() # alternate is hou.node('.')
exec(node.parm('paramter_name').eval())
Thanks and Support.
Comments