PDA

View Full Version : Calling expressions in another expression?



geothefaust
03-15-2009, 04:53 PM
Hey all,


Tried the search function, alas... Could not find the answer.


Question: Can I call an expression inside of another expression in the graph editor?

Thanks. :)

SplineGod
03-15-2009, 07:27 PM
Yes but only one deep. Relativity has no such limitations.

geothefaust
03-15-2009, 08:38 PM
Ach! That's no good. :(

Thanks Larry, appreciate it!


Since that wont work, I have another question...

What I have if are 6 sliders each controlling an master channel envelope. I want each envelope to control the previous one (or latter, doesn't matter). I want slider 1, to control all of them. 2 to control 2-6. 3 to control 3-6, and so on.

How would I set up that expression? I'm getting interesting results, needless to say. :)

SplineGod
03-15-2009, 09:57 PM
What kind of interesting results? What are you trying to do?
Also Relativity does have sliders too.

geothefaust
03-15-2009, 10:20 PM
Hey Larry,

I haven't used relativity much so I'm out of touch with it.

The results I'm getting so far with the setup that I thought would work (connecting master channel 6, to control 5, 5 to control 4, and so on to 1), did work at first. But then toward the last channel it stopped working except for a small number of the controllers.


What I have is, is a setup for dynamic parenting/pinning using Same as Item with 6 different nulls, each going to a different part of the body. Currently each location is controlled by one slider. So if I want to go say, down to the hip, I have to keyframe and then envelope 4 different master channels just to make sure the animation is fluid. It's a pain in the ***, but the results are great.

What I'm trying to achieve, is to keyframe only ONE single curve instead of a bunch of them for each one.

If I could get it down to dealing with a couple of keyframes instead of a bunch, that would make this method worthwhile.

geothefaust
03-15-2009, 10:40 PM
Ach! Yet again...

Nevermind my last question. I figured it out. It was a simple matter of using expressions. A LOT simpler then what I was thinking. :)

Value + ( ( [Slider A] + [Slider B] + [Slider C] + [Slider D] + [Slider E] ) /5 )

/5 = Number of sliders.

Simple!

EDIT: Oops, that was wrong. Quick test was close but I should have tested on all sliders, lol.

Nevermind, if anyone has an idea, I'm open. :)

evenflcw
03-15-2009, 11:26 PM
If you are setting up something that requires expressions or motion modifiers or the like to be evaluated in a certain order you might try creating/loading the objects in the order you want them evaluated. LW is that simple when it comes to evaluation order between items.

I don't think you'll be able to setup one envelope to control pining between more than 2 nulls. Because once you add a third one in there the interpolation cannot flow smoothly from a to c without passing b. So you'll have to add either dimensions or channels.

geothefaust
03-16-2009, 12:42 AM
Yeah, I'm not too concerned with the interpolation. The end result is what matters to me, an extra keyframe will fix that problem. Actually if we could have just a switch for some stuff (0 or 1) that would be cool. There are a few ways we could do that now I suppose...


Anyway, I got it figured out a few minutes ago. Interesting stuff. Annoying at that, lol.



What you said evenflcw, was key. Thanks. :)


If you are setting up something that requires expressions or motion modifiers or the like to be evaluated in a certain order you might try creating/loading the objects in the order you want them evaluated. LW is that simple when it comes to evaluation order between items.

geothefaust
03-16-2009, 01:10 AM
Well, I'm having some strangeness... Of course.

In my tests all worked fine. Numerically that is. But when I applied the expressions to their respective channels, the slider of course changes value that is controlling their envelopes, but nothing happens. Ach...