Determining shading type from python console

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Envenge
Posts: 2
Joined: Fri Nov 02, 2012 3:47 am

Determining shading type from python console

Postby Envenge » Fri Nov 02, 2012 3:56 am

I'm fairly new to using the python console in blender. I'm wondering, is there any way to determine which shading method, meaning flat or smooth, is being used on a specific object from the console? Thanks.

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Fri Nov 02, 2012 8:48 am

smooth or flat shading is set per face, so you need to check a certain polygon.

bpy.context.object.data.polygons[0].use_smooth
I'm sitting, waiting, wishing, building Blender in superstition...

Envenge
Posts: 2
Joined: Fri Nov 02, 2012 3:47 am

Postby Envenge » Fri Nov 02, 2012 4:51 pm

Awesome, thank you!


Return to “Python”

Who is online

Users browsing this forum: No registered users and 3 guests