? returning a float value in a string

   6477   7   1
User Avatar
Member
2624 posts
Joined: 8月 2006
オフライン
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
Gone fishing
User Avatar
Member
330 posts
Joined: 7月 2007
オフライン
hi ,

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

( check attribstringedit1 node > editor tab )

Attachments:
float_to_ztring_in_the_name.hip (41.0 KB)

except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
300 posts
Joined: 1月 2010
オフライン
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.
Drive, monkey, drive!
User Avatar
Member
2624 posts
Joined: 8月 2006
オフライン
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
Gone fishing
User Avatar
Member
2624 posts
Joined: 8月 2006
オフライン
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

Attachments:
simpleexample.hip (79.3 KB)

Gone fishing
User Avatar
Member
1390 posts
Joined: 7月 2005
オフライン
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)
User Avatar
Member
330 posts
Joined: 7月 2007
オフライン
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 ..
except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
2624 posts
Joined: 8月 2006
オフライン
Well that explains that ! time for a rethink

Rob
Gone fishing
  • Quick Links