]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/material.py
Refactor face cull settings in Blender
[libs/gl.git] / blender / io_mspgl / material.py
index 633f030f2ede62bc82c487ec8eb454e2e85b98b4..e92aee2f3e55303c0ddc25461316221e865c7df1 100644 (file)
@@ -219,9 +219,11 @@ class Material:
                self.technique = material.technique
                self.render_methods = material.render_methods[:]
                self.uniforms = material.uniforms[:]
+               self.face_cull = 'BACK' if material.use_backface_culling else 'NONE'
                self.receive_shadows = material.receive_shadows
                self.cast_shadows = (material.shadow_method!='NONE')
                self.blend_type = 'ALPHA' if material.blend_method=='BLEND' else 'NONE'
+               self.alpha_cutoff = material.alpha_threshold if material.blend_method=='CLIP' else 0.0
                self.image_based_lighting = material.image_based_lighting
 
                if self.render_mode=='EXTERNAL' and not self.technique: