088 : python, variable calls

Ok,
Here comes the silly begginer Python implentation questions, maybe we need a new Forum topic?

Syntax-wise, if I have created a variable in a local, say its called SEQUENCE that is a string for a path, say “/top/sequence”. I want to select a CHOP in that comp called rythm. the tscript expression would just be $SEQUENCE/rythm. What’s my python version?

‘me.var(‘SEQUENCE’)/rythm’ doesn’t work, I imagine I’m just not putting evaluation marks in the right place to resolve to /top/sequence/rythm

Is there an even cleverer way of doing this with Python now?

Thanks

Peter

along the same lines, just not finding the right syntax reference for stringing strings and expressions together in parameter fields, feeling dumb here.

ok, so i want to pair object2 with material2 using the op digits

Tscript Material Parm : material$OD
Python Material Parm : ‘material[me.digits()]’ ?? doesn’t work, super simple i know, anyone?

-P

Do you need an “op” in front of that “material” call?
i.e op.material[me(digits)]

Not sure, just guessing here

You need to use the + operator to concatenate your strings.

me.var(‘SEQUENCE’) + ‘/rythm’

‘material’+ str(me.digits())

awesome thanks!