PDA

View Full Version : Two way connections...


Hugh
04-06-2003, 09:17 PM
Is there a way that I can create a two way connection between two attributes....

As a simple example, say I want to connect translateX on an object, to a custom attribute: objTransX on another object.

However, I want to be able to move either one (and the other one will move) - same with keying - if I key one, I want the other to be keyed...

In effect, I want one attribute to be directly referencing the other.

This is for a rigging script that I'm making - I want the face to be able to be animated either using sliders, or using control objects - or both, if the animator so wanted...

Any idea how to do this?

dwalden74
04-06-2003, 09:47 PM
I believe there are a couple of options here. The first that pops into my head is using an attrFieldSliderGrp on control objectsī attributes. This gives you the two-way control that you refer to, and will allow you to key both the slider group or the control object attr in the channel box. Also, check out the connectControl MEL command on building other 2-way connections between UI elements and objattrs.

If I think of other methods Iīll post them tomorrow morning.

:beer:
David

Hugh
04-06-2003, 10:41 PM
If I understand you correctly, this is a UI object...

I think I may have used the wrong word when I said 'slider' - I meant a custom attribute, controlled as normal from the Channel Box.

So for this facial rig, you can either animate the positions of control objects in front of the face, or you can animate attributes in a control object. So both items that I want to link in are attributes...

I may have misunderstood what you meant, though - I haven't gone into Maya and tested this out... (Will try that in the morning,...)

dwalden74
04-07-2003, 08:28 AM
If I understand you correctly, this is a UI object...

Yes, Iīm talking about UI objs (attrFieldSliderGrp, for example). I guess thatīs not what you meant though :D

Not sure Iīm getting you entirely here. Canīt you simply key move/key the cntrl objs in the viewport and/or modifiy/key them in the channel box? Or do you mean, for example, have 20 locators on the face that you can move around/key in the viewport, and then ONE big control obj with attrs that also modify these same locators? If this is the case, what you could do is key the locators in the viewport, then control their parent grps (or whatever) via control attrs. That may or may not be a good idea, depending on your needs.

:beer:
David

Hugh
04-07-2003, 08:53 AM
Originally posted by dwalden74
Or do you mean, for example, have 20 locators on the face that you can move around/key in the viewport, and then ONE big control obj with attrs that also modify these same locators? If this is the case, what you could do is key the locators in the viewport, then control their parent grps (or whatever) via control attrs. That may or may not be a good idea, depending on your needs.

This is exactly what I want - as I'm creating this rig to be used on a number of different charcters, being animated by a number of different people, I want the animators to be able to use control objects or sliders - whichever they prefer.

However, the idea of controlling their parent groups doesn't sound quite what I want, and it would have an additive effect...

dwalden74
04-07-2003, 09:53 AM
However, the idea of controlling their parent groups doesn't sound quite what I want, and it would have an additive effect...


yep. Thatīs why I would suggest UI grp controls and/or using connectControl with UI elements. Otherwise I donīt think itīs possible.


:beer:
David

dwalden74
04-07-2003, 10:06 AM
BTW, there would be other ways to do this, but everything that I can think of would always have an additive effect, which you say isnīt what you want. For example, it is possible to key on top of an existing trax character clip. Also, you could key an attr, then afterwards connect the animCurve to a new custom attr, and with expressions or additional attrs blend the existing animCurve with additional keyframes or whatever to your final goal attr. Again, I donīt think this is what you want though :hmm:

-David

Hugh
04-07-2003, 10:47 AM
Okay, well, I'll hav a think about how I'm going to do this - thanks for all the advice.

CGTalk Moderation
01-14-2006, 07:00 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.