stamp expression issue with foreach

   5477   2   1
User Avatar
Member
383 posts
Joined:
Offline
Hello,

I would like to use a scatter SOP inside a foreach and use stamp expression to use change the seed parameter for each iteration.
It works with simple “number based” iteration, but the same setup doesn't work with group based or attribute based iteration.
Is it a bug ?

Thanks for your help

Vincent

Attachments:
forEachTest.hip (98.0 KB)

http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Member
8595 posts
Joined: July 2007
Offline
that's because FORVALUE variable contains
in number mode: variation number value (therefore it works in seed)
in group mode: name of the group (as it is string it will not work correctly for your seed)
in attribute mode: value of the attribute (it may work if your attribute is float or int, but not if it's string)

so you'd need to use id of the iteration, which is FORIDXVALUE variable
so use
stamp(“../”,FORIDXVALUE,0)
in your seed parm
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
383 posts
Joined:
Offline
nice

thanks a lot Tomas.
http://vimeo.com/vbkstudio [vimeo.com]
  • Quick Links