PDA

View Full Version : how to control more atributes with one control?


StefanStavrev
09-18-2006, 12:11 PM
how to control more atributes with one control?

For example one float slider to control the translate t and x values of a sphere?

Mikademius
09-18-2006, 12:23 PM
Maybe you could do it with an expression?

pSphere1.tx = floatSlider.value (or something similar?)
pSphere1.tz = floatSlider.value

Don't remember if you can use the connection editor with UI elements.

Or you could try the connectAttr command.
connectAttr "floatSlider.value" "pSphere.tx";

I can't remember the syntax here and I have no time to check it out. ( just waiting for a playblast :) ), but look up the connectAttr command and other Attr commands.

goleafsgo
09-18-2006, 01:52 PM
Or you could use a dragAttrContext and attach to the attributes you want to edit. Here is one connected to trans X and Y of a sphere.


dragAttrContext myDragAttrContext;
dragAttrContext -edit -connectTo pSphere1.translateX -connectTo pSphere1.translateY myDragAttrContext;
setToolTo myDragAttrContext;

CGTalk Moderation
09-18-2006, 01:52 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.