Search - User list
Full Version: Switch "Takes" with wedge
Root » PDG/TOPs » Switch "Takes" with wedge
Anthony Morrelle
I have a bunch of Takes I made for some variations for animations. My TOP network is laid out with the rop nodes I need to go from cache to render. Is there a way to switch “Takes” in TOPs maybe using the Wedge node or something like that.
The wedge allows me to run through strings but is there a more automated way? I have about 15 takes and the list may grow so entering them in by hand isn't ideal and I'm not sure that would work.

I know there is access to Takes via python but I'm still a relative TOP newbie so I need a nudge on how that would work.
Any ideas?

Thanks!

Update: Just wanted to add the update that I ended up adding the takes by hand into the wedges as strings. Then I successfully added the attribute to all my rops. Kind of messy but it works as intended.
tpetrick
You can use a Python Script TOP to create an attribute that contains the list of take names. You'll want to set the “Evaluate Script During” parm to “Generate” on the Python Script, so that the attribute is available when the graph is generating work items. Something like the following will copy the takes from HOM and into a work item attribute:

import hou

takes = hou.takes.takes()
for index, take in enumerate(takes):
    work_item.setStringAttrib("takenames", take.name(), index)

You can also access the same data from a parameter set to use Python instead of HScript as the expression language.

I've attached an example file that uses both approaches along with a wedge node create a wedge variation per take in the scene file. Note that you'll need to be using H18.0.513 or newer, since the file makes use of the pdgattribsize(..) expr function, which was added in that version.
Anthony Morrelle
Fantastic! I knew there was a way to do it with python but still learning how to use it in tops. Thanks!!
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