how to create parameters for HDA from node by python
2548 6 1-
- SongHanyang
- Member
- 2 posts
- Joined: 11月 2020
- Offline
-
- Kimorizon
- Member
- 1 posts
- Joined: 2月 2018
- Offline
Hi, you might have already worked it out, but otherwise I've been looking into something similar and this might be of help:
found this post on gfxhacks [gfxhacks.com] with some very clear explanations and examples on how to create parameters through python in Houdini, and in combination with the Houdini documentation on parmTemplates [www.sidefx.com] it got me pretty far.
I've been running the creation of my parameters in the scripts section of the hda, where you can select some different event handlers on when to run the script, but I linked mine to a button parameter so it loads the script every time I press the button.
Not sure if this exactly what you're looking for but I hope it helps.
found this post on gfxhacks [gfxhacks.com] with some very clear explanations and examples on how to create parameters through python in Houdini, and in combination with the Houdini documentation on parmTemplates [www.sidefx.com] it got me pretty far.
I've been running the creation of my parameters in the scripts section of the hda, where you can select some different event handlers on when to run the script, but I linked mine to a button parameter so it loads the script every time I press the button.
Not sure if this exactly what you're looking for but I hope it helps.
-
- richard269090576
- Member
- 6 posts
- Joined: 7月 2022
- Offline
KimorizonThanks for the info, it's really helpful
Hi, you might have already worked it out, but otherwise I've been looking into something similar and this might be of help:
found this post on gfxhacks [gfxhacks.com] with some very clear explanations and examples on how to create parameters through python in Houdini, and in combination with the Houdini documentation on parmTemplates [www.sidefx.com] it got me pretty far.
I've been running the creation of my parameters in the scripts section of the hda, where you can select some different event handlers on when to run the script, but I linked mine to a button parameter so it loads the script every time I press the button.
Not sure if this exactly what you're looking for but I hope it helps.
-
- SWest
- Member
- 313 posts
- Joined: 10月 2016
- Offline
-
- mattomatic
- Member
- 2 posts
- Joined: 9月 2023
- Offline
Hi. Is it possible to add parameters to an HDA on creation without unlocking the HDA itself? Essentially I'm looking to have a dummy or placeholder HDA and populate it through python on creation so that the HDA doesn't have to be baked out and can be updated just by changing the version of a python module, but I don't want to have to unlock the HDA ideally. Maybe I'm missing an obvious way to do this.
Thanks,
Matt
Thanks,
Matt
-
- SWest
- Member
- 313 posts
- Joined: 10月 2016
- Offline
mattomatic
Hi. Is it possible to add parameters to an HDA on creation without unlocking the HDA itself? Essentially I'm looking to have a dummy or placeholder HDA and populate it through python on creation so that the HDA doesn't have to be baked out and can be updated just by changing the version of a python module, but I don't want to have to unlock the HDA ideally. Maybe I'm missing an obvious way to do this.
Thanks,
Matt
Can’t say I’ve got a solution for you but am interested in what you are after.
I’ve experimented both with multiple parms with Python as data and generating parms from Python. Usually I avoid making HDAs but use plain subnets.
Was just thinking that it might be possible to make an über HDA with a list of Python ”generators”. When a selected snippet is run it can generate new subnets without any lock.
Maybe this is not what you want buy I’m just thinking.
Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
-
- mattomatic
- Member
- 2 posts
- Joined: 9月 2023
- Offline
I'm probably going about this the wrong way, but I wanted the convenience of an HDA to add to the /obj menu but without having to bake the parms and/or contents in. It would act like a placeholder and get populated on creation based on the version of the python modules being loaded at the time. This way if the HDA itself doesn't change but the python modules do, a new "version" of the HDA gets installed alongside the versioned python without having to open Houdini and save it out (I've been using the built in versioning, myNode::1.0, but that requires importing/editing/saving to version up - just to keep the version in line with the python project).
As I say, I'm probably approaching this the wrong way so I'm open to alternatives!
As I say, I'm probably approaching this the wrong way so I'm open to alternatives!
-
- Quick Links