Python Tip : Toggling mesh's double sidedness

I posted this on a social network in response to a question

"is there a python script to turn all objects mesh, "double sided" to false?"

Let me explain the above code snippet

is a shortcut for bpy.context.scene.objects. In Blender, bpy.context keeps track of the global/current application context, which in this case is teh list of objects in the currently set scene in Blender.

[ for obj in C.scene.objects if obj.type in ['MESH']] 
returns a list of mesh objects in the current scene. This syntax here is that of a Python list comprehension

mesh.show_double_sided = False
This performs the actual magic. Its self explanatory.

Popular posts from this blog

Blender 2.64 - Tutorial - Intro to Masking (Rotoscoping)

Hello OSL

Intro to Animation for Kids using Blender