Display > Wireframe color > Custom

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2013   #1
Display > Wireframe color > Custom

I want to do in mel what is done by going to Display > Wireframe Color > Yellow

Is there a way through mel to set the wireframe color to Yellow on the selected object?

Hope someone can help. I'm rather new to mel, originally from mxs.

thank you.
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
Old 02 February 2013   #2
colorIndex 6 1 0 0;

color -ud 2

2 means the second color swatch you see in that panel which is somewhat yellow.

You can set custom color using
colorIndex 7 1 1 1;
color -ud 7;


Where 7 is the id, 1 1 1 are RGB values.
 
Old 02 February 2013   #3
Don't I need to do something along the lines of setting the attribute override to be true and then set the color to be yellow?

I'm not entirely sure how to write in Mel what I have written below.

For object in selection do
Set object override wireframe display color true
Set object wirecolor to be yellow (custom color)
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
Old 02 February 2013   #4
for i in sel :
mc.setAttr (i + ".overrideEnabled", 1)
mc.setAttr (i + ".overrideColor", 2)
__________________
Nothing last forever
 
Old 02 February 2013   #5
error

This errors out?
Also how do I control the color to be a specific color.


for i in sel :
mc.setAttr (i + ".overrideEnabled", 1)
mc.setAttr (i + ".overrideColor", 2)
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
Old 02 February 2013   #6
Originally Posted by JokerMartini: This errors out?
Also how do I control the color to be a specific color.


for i in sel :
mc.setAttr (i + ".overrideEnabled", 1)
mc.setAttr (i + ".overrideColor", 2)


I (badly) wrote a tiny mel tool that does exactly this: http://berniebernie.fr/wiki/index.p...ange_wire_color it's mel not python but it still works; you can stick it in a shelf button.
__________________
maya@reddit r/maya
 
Old 02 February 2013   #7
Does it have a selection callback so it happens automatically upon selection change?
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
Old 02 February 2013   #8
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:14 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.