Merge branch 'master' into blender2.8
[blender.git] / release / scripts / startup / bl_ui / properties_game.py
index ed1253ea3bfc899c16e36925fea215efb25c885b..386ad2548926213ef7c5b459ff1a8067df027fdd 100644 (file)
@@ -404,6 +404,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel, Panel):
             col.prop(gs, "use_glsl_lights", text="Lights")
             col.prop(gs, "use_glsl_shaders", text="Shaders")
             col.prop(gs, "use_glsl_shadows", text="Shadows")
+            col.prop(gs, "use_glsl_environment_lighting", text="Environment Lighting")
 
             col = split.column()
             col.prop(gs, "use_glsl_ramps", text="Ramps")
@@ -510,7 +511,11 @@ class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel):
         col.label(text="Region:")
         row = col.row()
         row.prop(rd, "region_min_size")
-        row.prop(rd, "region_merge_size")
+        if rd.partitioning != 'LAYERS':
+            row.prop(rd, "region_merge_size")
+
+        col = layout.column()
+        col.prop(rd, "partitioning")
 
         col = layout.column()
         col.label(text="Polygonization:")
@@ -563,7 +568,7 @@ class WORLD_PT_game_context_world(WorldButtonsPanel, Panel):
     @classmethod
     def poll(cls, context):
         rd = context.scene.render
-        return (context.scene) and (rd.use_game_engine)
+        return (context.scene) and (rd.engine in cls.COMPAT_ENGINES)
 
     def draw(self, context):
         layout = self.layout
@@ -595,9 +600,35 @@ class WORLD_PT_game_world(WorldButtonsPanel, Panel):
 
         row = layout.row()
         row.column().prop(world, "horizon_color")
+        row.column().prop(world, "zenith_color")
         row.column().prop(world, "ambient_color")
 
 
+class WORLD_PT_game_environment_lighting(WorldButtonsPanel, Panel):
+    bl_label = "Environment Lighting"
+    COMPAT_ENGINES = {'BLENDER_GAME'}
+
+    @classmethod
+    def poll(cls, context):
+        scene = context.scene
+        return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
+
+    def draw_header(self, context):
+        light = context.world.light_settings
+        self.layout.prop(light, "use_environment_light", text="")
+
+    def draw(self, context):
+        layout = self.layout
+
+        light = context.world.light_settings
+
+        layout.active = light.use_environment_light
+
+        split = layout.split()
+        split.prop(light, "environment_energy", text="Energy")
+        split.prop(light, "environment_color", text="")
+
+
 class WORLD_PT_game_mist(WorldButtonsPanel, Panel):
     bl_label = "Mist"
     COMPAT_ENGINES = {'BLENDER_GAME'}