sanostol Posted May 22, 2011 Share Posted May 22, 2011 (edited) inside a foreachloopSOP working on groups, is there a way to get the group name that is currently processed? Martin Edited May 22, 2011 by sanostol Quote Link to comment Share on other sites More sharing options...
anim Posted May 22, 2011 Share Posted May 22, 2011 assuming that your stamp varibles on foreach are set to default in H11 you can do just: `stamps("..", "FORVALUE", "")` it contains group name when working on groups in H10 you need to use (if I recall correctly that back then FORVALUE variable just contained index) `arg(primgroupmask(opinputpath("..",0), chs("../groupmask")),stamp("..", "FORVALUE", 0))` in H11 if you need just index there is variable named FORIDXVALUE by default Quote Link to comment Share on other sites More sharing options...
sanostol Posted May 22, 2011 Author Share Posted May 22, 2011 hey, that was fast i tried it but without success. `stamps("..", "FORVALUE", "")` returns nothing here, when set to for each group i'm using h11 Martin Quote Link to comment Share on other sites More sharing options...
anim Posted May 22, 2011 Share Posted May 22, 2011 (edited) where are you using it? here is a little scene using it in Font SOP inside foreach EDIT: of course you need to look at it when outside the foreach, the easiest method is to pin the viewport when outside, then dive inside for modifications and you can see the result in the pinned viewport foreach_groupname.hipnc Edited May 22, 2011 by anim Quote Link to comment Share on other sites More sharing options...
sanostol Posted May 22, 2011 Author Share Posted May 22, 2011 (edited) Thank You anim, that's very helpfull! Sometimes for each is quite mindbending Edited May 22, 2011 by sanostol Quote Link to comment Share on other sites More sharing options...
anim Posted May 22, 2011 Share Posted May 22, 2011 yes, it is at first, but it's very useful so it's worth bending your mind a little Quote Link to comment Share on other sites More sharing options...
asnowcappedromance Posted May 15, 2012 Share Posted May 15, 2012 just stumbled over this thread, actually another easy way to access the group name inside a foreach is `chs("../each1/group")` cheers, Manu Quote Link to comment Share on other sites More sharing options...
RogerW Posted February 18, 2013 Share Posted February 18, 2013 Thanks guys, This thread helped me out a lot. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.