Hi
I have been trying to update the label of a parameter using a button and python
Update Parameter label with python
3962 4 2- sheep
- Member
- 16 posts
- Joined: Jan. 2013
- Offline
- Enivob
- Member
- 2633 posts
- Joined: June 2008
- Offline
Maybe you can use setLabel() after fetching the parameter template for that label?
https://www.sidefx.com/docs/houdini/hom/hou/FloatParmTemplate.html [www.sidefx.com]
For the button, you can try something like this...
If you're inside an HDA, try relative pathing instead.
https://www.sidefx.com/docs/houdini/hom/hou/FloatParmTemplate.html [www.sidefx.com]
For the button, you can try something like this...
exec(hou.node("/obj/geo1/pythonscript1").parm('python').eval());test_callback("passing some data")
Edited by Enivob - July 3, 2021 09:03:26
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- sheep
- Member
- 16 posts
- Joined: Jan. 2013
- Offline
- sheep
- Member
- 16 posts
- Joined: Jan. 2013
- Offline
Im trying this I found in other post but not seem to work for me when calling with the buttom
in the buttom callback im using this
def increment(): node = hou.pwd() targetParm = node.parm("targetParm") group = node.parmTemplateGroup() oldParm = targetParm.parmTemplate() newParm = targetParm.parmTemplate() newParm.setLabel("my new label") group.replace(oldParm, newParm) node.setParmTemplateGroup(group)
in the buttom callback im using this
hou.phm().increment()
Edited by sheep - July 3, 2021 22:00:26
- sebd3dvfx
- Member
- 16 posts
- Joined: March 2024
- Offline
Hello,
i am trying to also achieve this, to edit Parm Label through Python and i cannot succeed.
@sheep, did you get there ?
on my side the setLabel is not working as expected or am i missing something ?
I get a None returned after using
```
newParm = pparm.parmTemplate().setLabel("New Label")
```
Help would be appreciated, thanks !
i am trying to also achieve this, to edit Parm Label through Python and i cannot succeed.
@sheep, did you get there ?
on my side the setLabel is not working as expected or am i missing something ?
I get a None returned after using
```
newParm = pparm.parmTemplate().setLabel("New Label")
```
Help would be appreciated, thanks !
-
- Quick Links