creating a label parameter with Python - strange behavior

   3473   1   0
User Avatar
Member
194 posts
Joined:
オフライン
when i create a label parameter using

template = hou.LabelParmTemplate(name, label)
node.addSpareParmTuple(template, …)

for some reason the parameter comes with a second label (Label 1) set to 0.
afaik, the only way to get rid of it right now is to open the parameter interface and delete the 0 manually.

as an experiment, i created a second label with Edit Parameter Interface and set it to ‘xyz’.
then i ran node.asCode() but it didn't show any Python code setting Label2 to ‘xyz’ (or setting Label 1 to ‘0’ for that matter)

how do i disable Label1 or set it to an empty string?
User Avatar
Member
194 posts
Joined:
オフライン
actually, i figured out how to get rid of the ‘0’

node.parm(name).set('') did it

however, Edit Parameter Interface still shows 0 for Label 1.
so i think this is a bug.
  • Quick Links