Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
yongbin

FORVALUE in foreach sop

How can I access my FORVALUE in foreach sop, if I choose "for each group"?

Share this post


Link to post
Share on other sites

You use the stamp() function.

stamp("..", "FORVALUE", 0)

or in the case of the group, since it is a string you need stamps()

stamps("..", "FORVALUE", "")

Share this post


Link to post
Share on other sites

Very wierd. I tested it several times before, but it didn't work.

and after you said to me that I tested it again, and it works.

Anyway, very appreciate. Thanks. :rolleyes:

Share this post


Link to post
Share on other sites

If you're trying to access the foreach values within a python node this worked for me:

 

index = int(hou.hscriptExpression('stamp("..", "FORIDXVALUE", 0)'))

Share this post


Link to post
Share on other sites

I am watching that vimeo tutorial right now, but the resolution is not high enough for me to see the text.  I googled and found this thread, which is leading back to the video I'm watching!  Haha!  Anyway, I will try again... I'm just trying to do the first stamp that he does at about 10:22, on the xform in the for-each loop.

 

Is there anything glaringly wrong with this?:

 

sin(stamp("../","FORVALUE",0) * ch("../myfreq")) * ch("../myamp")

 

Ha!  It was working.  Somehow I had pinned to the wrong view or something.  Anyway, it just started working.  Yes!

Edited by johnLIC

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0