Search - User list
Full Version: ? returning a float value in a string
Root » Technical Discussion » ? returning a float value in a string
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
zarti
hi ,

if i understood you correctly , this is a way ..

( check attribstringedit1 node > editor tab )
Erik_JE
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
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
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
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
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
Well that explains that ! time for a rethink

Rob
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB