PDA

View Full Version : Xpresso: Matching a string output to an object name name triggers an action


govinda
05-04-2007, 11:41 PM
Let's say you have a node outputting a string. Is there a way to look through a hierarchy for an object whose name matches that string, and then have it trigger that object's visibility.

When it gets to hierarchies, looping and iteration, it all goes blurry. The first part (finding and matching a string) would surely plug into the left side of this Xpresso setup that Darter posted:

http://forums.cgsociety.org/showpost.php?p=4368642&postcount=11

sandidolsak
05-05-2007, 09:24 AM
Here is a quick example...

govinda
05-05-2007, 02:35 PM
That worked perfectly. Together with what Lennart and Al posted yesterday, this is a useful setup for a subset of the people who live by doing camera animation. So at top left of my screen I have a Text object saying 'Path 3' for example (what Lennart and Al helped me with), and next to it a display of that path's shape (provided with AngeluSiu's Xpresso above). Only thing that needed changing is to put a 'D' in the Start Path of the Hierarchy node and swap in the right objects. I remember this from two years ago when I almost understood hierarchies and iteration.

With a little adaptation, it could also work like this: You could have a multiple path camera layout with branching decision points. This happens with game jobs. Then you could do a mini-map of all paths, child it to the camera, and with this Xpresso call out not only the name of the path you're on but also show it on the map by thickening its sweep nurb cross section relative to the other paths, or making it glow, or whatever. Clients looove that kind of stuff during approval stages.

Very cool.

Rantin Al
05-05-2007, 02:48 PM
I guess you would say it has been a successful and productive week. :thumbsup:

Congrats on Mission Accomplished. Beers are on you.

Cheers, Alan.

govinda
05-05-2007, 08:57 PM
I see that tongue planted in cheek. ;) Well, yes, and it's really a case of rationing the questions so as not to trouble too many people. As to whether the karma is balanced, from 2003-2004 I answered probably a thousand beginner questions and fixed files at the Cow, talked up c4d on various boards and kinda accidentally made mograph.net the onofficial c4d central for people in motion graphics. And yet I'm still in debt because, in truth, there are people here with about 50 times my energy level. Cheers, RJP

Rantin Al
05-05-2007, 10:54 PM
No, I'm deadly serious... about the beers.:)

I didn't intend any sarcasm above. I am happy that with a few pertinent questions and a couple of plausible solutions you have a practical tool at the end of the day.

I'm just as content that I was able to contribute a little towards it.
I learn things that I wouldn't have even thought of by dipping into problems.

Cheers, Alan.

CGTalk Moderation
05-05-2007, 10:54 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.