select attribute

130 views
Skip to first unread message

miarmy

unread,
Dec 8, 2014, 4:13:29 PM12/8/14
to python_in...@googlegroups.com
hi!  How can I select  the Channel Box attributes(example:ty attribute)?

Justin Israel

unread,
Dec 9, 2014, 5:18:03 AM12/9/14
to python_in...@googlegroups.com
Do you mean to programmatically select a field in the channel box so that is it in "edit" mode? Or do you meant to get the values for the currently selected attribute(s)?

On Tue, 9 Dec 2014 10:13 AM miarmy <egol...@gmail.com> wrote:
hi!  How can I select  the Channel Box attributes(example:ty attribute)?

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7dcf6b49-afbb-4916-8a9b-7b32d9084dad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcus Ottosson

unread,
Dec 9, 2014, 10:24:15 AM12/9/14
to python_in...@googlegroups.com

Hi miarmy,

Sorry if this is obvious, but have you had a look at the channelBox command?
http://help.autodesk.com/cloudhelp/2015/ENU/Maya-Tech-Docs/CommandsPython/channelBox.html

If you’re looking to simulate changing the currently selected channel, I’m not familiar with any direct method, but you could try using the takeFocus flag followed by simulating the up/down arrows.



For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

miarmy

unread,
Dec 10, 2014, 9:33:49 AM12/10/14
to python_in...@googlegroups.com
Marcus and Justin ...thank

ok!...example: i have a face control(example lip control)...now i want press the special shelf button until select a field in the (main)channel box...(when selected the a field in the channel box i can control on value of attribute with middle button...)
excuse me,...my english is not good( ....and channelBox  Command was inconclusive)

Carlos Rico

unread,
Dec 10, 2014, 10:44:00 AM12/10/14
to python_in...@googlegroups.com
You can have a look at dragAttrContext command:
http://help.autodesk.com/cloudhelp/2015/ENU/Maya-Tech-Docs/CommandsPython/dragAttrContext.html
and draggerContext command:
http://help.autodesk.com/cloudhelp/2015/ENU/Maya-Tech-Docs/CommandsPython/draggerContext.html

Maybe that's what you are looking after.

Also check Hamish McKenzie's zooToolbox, which includes zooAttrScroller.mel and
you can grab a modified version of this script by David Johnson:
http://www.djx.com.au/mel/zooAttrScroller.rar

This following link delves into this a bit more:
http://www.djx.com.au/blog/2009/08/11/zooattrscrollermel-virtual-sliders/

These scripts create a draggerContext and a marking menu for choosing which attribute of the current selected object to modify by mouse-dragging, a bit like selecting an attribute in the channelBox and middle-button dragging

Hope it helps.

Carlos Rico Adega
-------------------------------------
LinkedIn
carlos....@gmail.com

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Marcus Ottosson

unread,
Dec 10, 2014, 11:03:01 AM12/10/14
to python_in...@googlegroups.com
It seems to me that what miarmy is looking for is to visualise attributes by highlighting items in the channel box, and it doesn't look like the channelBox command provides the means to do this.

It might be possible via some PySide/PyQt trickery, e.g. by grabbing onto the widget and either modify the stylesheet/paintEvent directly (worst case) or find what data drives the "current selection" and modify it (best case). I'll try and have a look when I get some time on my hands.


For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Paul Molodowitch

unread,
Dec 10, 2014, 12:34:55 PM12/10/14
to python_inside_maya
Huh - I would have sworn that I've done this, but apparently I was mistaken - be curious if someone does find a way...

Nicolas Combecave

unread,
Dec 13, 2014, 3:58:39 AM12/13/14
to python_in...@googlegroups.com
Yeah,
We've also hit the same wall!
For our characters/props rigs anim gui, we tried many things to achieve a virtualslider functionality programmatically (without selecting a node and clicking an attr in the channelBox), but ended with a solution close to described, via a draggerContext...


Reply all
Reply to author
Forward
0 new messages