Jump to content

how change a parameter from an other parameter?


supermac

Recommended Posts

hello all,

I learn again python on Houdini.. my knowledge in python are enough limited..

i search how i can change a parameter value if i'm in a other parameter..

i explain me:

if i'm into "ty" parameter of my object and i say:

if ch("tx") >= 10:

ch("tx").set(11)

or:

f ch("tx") >= 10:

ch("tx") = 11

there is no change..

i tried all i can imagine... but i can't find The solution..

i think that i must learn "logic" of python into Houdini..

First::

Please, someone can say me how i must write my code for change my parameter from an other parameter

and, there is a tutorial other that HOM docs from Houdini?

HOM docs is not for begginer like me!

Sorry for my english..

Thank you for your help

Best regard

Link to comment
Share on other sites

The hou.ch() is a HOM alias to hou.Parm.evalParm() and is equivalent to the regular hscript expression function ch(). It returns a value. Your conditional statement is okay but your attempts to set the channel are wrong. To change a parameter you need to do something like this:

parm("tx").set(11)

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