Override Node State

   1115   6   0
User Avatar
Member
64 posts
Joined: April 2022
Offline
Can I bind a custom Python state to SOP node? I mean node like PolyExtrude, not HDA. In Python script, I can activate custom state for any node. But if I exit the state and press Enter, the node's state is activated. I would like to automatically start my own state. Is it possible? There is no such information in the documentation.
alexeyvanzhula.gumroad.com
User Avatar
Staff
412 posts
Joined: Feb. 2018
Offline
C++ node states can not be replaced with a different state.
User Avatar
Member
64 posts
Joined: April 2022
Offline
mabelzile
C++ node states can not be replaced with a different state.
Thanks
alexeyvanzhula.gumroad.com
User Avatar
Member
313 posts
Joined: Oct. 2016
Offline
I would like to automatically start my own state. Is it possible?

If remembering correctly I used a subnet and converted it to a rig pose. Then I think if you get the scene_viewer there is some merhod like enterDefaultState maybe. Can check later if you need it. So I got the rig handles activated like that. It is a bit hackish but works for me.
Edited by SWest - Oct. 12, 2023 13:59:44
Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
User Avatar
Member
64 posts
Joined: April 2022
Offline
SWest
I would like to automatically start my own state. Is it possible?

If remembering correctly I used a subnet and converted it to a rig pose. Then I think if you get the scene_viewer there is some merhod like enterDefaultState maybe. Can check later if you need it. So I got the rig handles activated like that. It is a bit hackish but works for me.
Thanks, but I don't need to activate the state with Python; the problem lies elsewhere. I was wondering if it's possible to attach a custom state, written in Python, to a node, which could then be activated by pressing Enter. I knew this was probably not possible, but I wanted to make sure by hearing an answer from the Houdini developers. I received a response
alexeyvanzhula.gumroad.com
User Avatar
Staff
412 posts
Joined: Feb. 2018
Offline
Alexey_Vanzhula
SWest
I would like to automatically start my own state. Is it possible?

If remembering correctly I used a subnet and converted it to a rig pose. Then I think if you get the scene_viewer there is some merhod like enterDefaultState maybe. Can check later if you need it. So I got the rig handles activated like that. It is a bit hackish but works for me.
Thanks, but I don't need to activate the state with Python; the problem lies elsewhere. I was wondering if it's possible to attach a custom state, written in Python, to a node, which could then be activated by pressing Enter. I knew this was probably not possible, but I wanted to make sure by hearing an answer from the Houdini developers. I received a response

You can only do that with an HDA node by setting the `Default State` input field with the state type name.
User Avatar
Member
64 posts
Joined: April 2022
Offline
mabelzile
Alexey_Vanzhula
SWest
I would like to automatically start my own state. Is it possible?

If remembering correctly I used a subnet and converted it to a rig pose. Then I think if you get the scene_viewer there is some merhod like enterDefaultState maybe. Can check later if you need it. So I got the rig handles activated like that. It is a bit hackish but works for me.
Thanks, but I don't need to activate the state with Python; the problem lies elsewhere. I was wondering if it's possible to attach a custom state, written in Python, to a node, which could then be activated by pressing Enter. I knew this was probably not possible, but I wanted to make sure by hearing an answer from the Houdini developers. I received a response

You can only do that with an HDA node by setting the `Default State` input field with the state type name.
Yes, I know and use this. Just having the ability to replace the state of a simple node with your own would be a fantastic opportunity
alexeyvanzhula.gumroad.com
  • Quick Links