Jump to content

Reading values from a parameter


Symbolic

Recommended Posts

Hi,

I am trying to read a value from a parameter on an HDA. It should be somethin like.

self = hou.pwd()

number = self.node.parm("nodecount")

but it just does not work. I really find the Python help section in Houdini a bit confusing. :blink:

Like:

I know that I can list a value from a parameter of a node with:

opparm -d "node" "parameter"

In the help it says that:

Replaced by: hou.Node, hou.ParmTuple, hou.Parm

When I go in any of these sections I see lots of confusing things like:

hou.Parm class

The parm() function returns a parameter by its path. The Parm class represents a parameter on a node.

asCode(self, brief=False, function_name=None) → str

...

deleteAllKeyframes(self)

...

evalAsFloat(self) → float

and others... none of these make any sense and explain how to actually query a parameter field on a node or an HDA?

What does that mean?

:(

Link to comment
Share on other sites

hey man

is this what u looking for ?

hou.node('/obj/geo1').parm('tx').eval()

more info can be found

http://localhost:48627/hom/intro

:)

Yeah! Cool!

I used it as this:

self = hou.pwd()

number = self.parm('nodecount').eval()

hou.ui.displayMessage(str(number))

"nodecount" is just a parameter at the HDA level. So it works. And that link has actual examples of the usage. Thanks.

But what is all the stuff that comes when you go inside the help for hou.Parm

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...