Jump to content

How To Replace A String Expression With Hscript


pushpathadam

Recommended Posts

Hi,

I'm tryiing to edit an expression string in houdini 7 ex:

ch("../sphere1/radx")*10 with ch("../sphere1/rady")*20

Some failed attempts .

chkey -f 1001 -F "ch("../sphere1/rady")*20" /obj/geo1/xform1/ty

does nothing...

opparm -C /obj/geo1/xform1 ty "ch("../sphere1/rady")*20"

gives ...Warning: Invalid channel "ch(../sphere1/rady)*20" specified in parameter

Tried some other variants with single quotes .without success. Does anyone know how to go about doing this.

thanks

Tom

Link to comment
Share on other sites

I also like using single quotes:

chkey -f 1001 -F 'ch("../sphere1/rady")*20' /obj/geo1/xform1/ty

It may be simpler to read. The idea with single quotes is that they don't evaluate their contents, so if you have a variable that you don't want to dereference right away, you'd have to use this method. Quote mangling is no fun :(

George.

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