circusmonkey
March 17, 2012 06:07:07
Hi all ,
I have a string parameter with the string of “grp_letter_1” I want to replace the 1 in the string with my own float attribute called $FOO which returns 1 2 3 4 5 6 7 over $NFRAMES etc etc. Currently this fails “grp_letter_$FOO” I seem to remember this is because a string cannot return the value of a float. Can anyone point me in the right direction ?
Rob
zarti
March 17, 2012 07:34:02
hi ,
if i understood you correctly , this is a way ..
( check attribstringedit1 node > editor tab )
Erik_JE
March 17, 2012 08:06:01
circusmonkey
Hi all ,
I have a string parameter with the string of “grp_letter_1” I want to replace the 1 in the string with my own float attribute called $FOO which returns 1 2 3 4 5 6 7 over $NFRAMES etc etc. Currently this fails “grp_letter_$FOO” I seem to remember this is because a string cannot return the value of a float. Can anyone point me in the right direction ?
Rob
grp_letter_`$FOO` should work fine.
circusmonkey
March 17, 2012 16:36:55
I thought back ticks would work but `$FOO` does not evaluate to anything in the parameter. Weird …Yet in the details view the attribute works as expected.
rob
circusmonkey
March 17, 2012 17:58:00
See attached for a simple example of what I mean the delete sop takes box_`$F` in the group parm but fails with box_`$COUNTER` ! any ideas why ?
Rob
symek
March 17, 2012 19:33:12
This is because Group parm doesn't accept local variables, since it cannot evaluate per prim/point. $F is a global variable, so it does work this way.
Anyway, this doesn't matter, because if you put $COUNTER into Filter Expression parm (Delete by Expression), you have pretty much the same setup working (though I'm not sure if this is what you wanted ultimately)
zarti
March 17, 2012 19:43:05
circusmonkey
See attached for a simple example of what I mean the delete sop takes box_`$F` in the group parm but fails with box_`$COUNTER` ! any ideas why ?
Rob
i believe
`$F` works because it is a Global Expression Variable .
`$COUNTER` doesnt work there because it is the same thing as writing `$PR` or `$PT` ( !? ) .
–
edit: SYmek was faster ..
circusmonkey
March 17, 2012 20:59:00
Well that explains that ! time for a rethink
Rob