toggle Flat shaded


#1

Hi

knows anyone a toggle script between “Flatshadet All” and “SmoothShaded All”?

thx for any Help !! :slight_smile:


#2

Here you go:

string $currentPanel = `getPanel -wf`;
string $panelType = `getPanel -to $currentPanel`;
if ($panelType == "modelPanel")
{
	string $currentShading = `modelEditor -q -displayAppearance $currentPanel`;
	if ($currentShading == "flatShaded")
		modelEditor -e -displayAppearance smoothShaded $currentPanel;
	else
		modelEditor -e -displayAppearance flatShaded $currentPanel;
}

#3

thank you DezFX!

bssss, i love the talk. Do a question, go to bed, stand up, and the
answer is there :slight_smile:

thx!!


#4

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.