Jump to content

python parm type


ivan

Recommended Posts

is there any way to determine if a three dimansional tuple is a point or a color?

i.e:

>>>mytuple = hou.node("shop/mythingy").parmTuples()[10]

>>>mytuple.name()

'foo'

>>>len(mytuple)

3

great. now, is the UI for mytuple a "point" or is it a "color"? is it possible to determine this?

Link to comment
Share on other sites

hou.ParmTemplate[1] will lead you the way.

The look of tge parmTemplate tells you if it's a color or a float[3] widget.

The type of the parmTemplate tells you if it's a toggle or an integer.

>>> hou.parm('/obj/null1/parm1').parmTemplate().type()
parmLook.ColorSquare
>>> hou.parm('/obj/null1/parm2').parmTemplate().type()
parmLook.Regular
>>> hou.parm('/obj/null1/parm3').parmTemplate().type()
parmTemplateType.Int
>>> hou.parm('/obj/null1/parm4').parmTemplate().type()
parmTemplateType.Int
>>> hou.parm('/obj/null1/parm4').parmTemplate().type() == hou.parmTemplateType.Int
True

[1] http://www.sidefx.com/docs/houdini11.1/hom/hou/ParmTemplate

Edited by rdg
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...