Setting Flat Shading as Default

Setting Flat Shading as Default

fernaix
Observer Observer
782 Views
2 Replies
Message 1 of 3

Setting Flat Shading as Default

fernaix
Observer
Observer

Hello, I feel like this is a no-brainier question but I can't seem to find what I am looking for. I suspect it is due to not using the correct words when searching.

 

For my current project, I would like to have Flat Shading as default. My issue comes in while using the keybinds to swap between Wireframe(4) and Shaded(5). Every time I swap back to the Shaded mode, it reverts back to Smooth Shading despite being set to Flat Shade before. All I want is to not have to go and change it manually every time I swap between Wireframe and Shaded. I feel like I am just missing something obvious and figured should post here. Thank you.

0 Likes
783 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor

Hi!

 

The problem is, that the shortcut 5 doesn't stand for "Shaded", but for "Smooth Shade All" as you can see in the bottom left of your Maya window when you hover over it.

 

If you want your shaded mode to be Flat shaded when flipping back an forth between Wireframe and shaded, you would need to create a custom hotkey for that, as far as I know at least.

 

The script that this hotkey would need to run would be the following:

string $focusPanel = `getPanel -wf`;
string $modPanels[] = `getPanel -typ "modelPanel"`;
if (stringArrayContains($focusPanel, $modPanels) == 1){
    modelEditor -edit -displayAppearance flatShaded -activeOnly false $focusPanel;
}

 

When this script gets run, the current panel in focus, if it is a Viewport panel, will set its shading mode to "Flat Shaded All".

 

I hope it helps!

Message 3 of 3

fernaix
Observer
Observer

Thank you, that makes a lot of sense! I'll try to set it up when I get a chance.

0 Likes