1. Cedric Pinson
  2. osgexport

Commits

"Ced...@plopbyte.net>"  committed 02d565a

set GL_LIGHTING to false if shadeless is activated in Material

  • Participants
  • Parent commits 7918b3a
  • Branches default

Comments (0)

Files changed (1)

File blenderExporter/osg/osgdata.py

View file
                 m = Material()
                 s.setName(mat_source.getName())
 
+                mode = mat_source.getMode()
+                if mode & Blender.Material.Modes['SHADELESS']:
+                    s.modes["GL_LIGHTING"] = "OFF"
+
                 refl = mat_source.getRef()
                 m.diffuse = (mat_source.R * refl, mat_source.G * refl, mat_source.B * refl, mat_source.alpha)