Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/ui/properties_world.py')
-rw-r--r--release/scripts/ui/properties_world.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py
index fe1c085dc02..5179fc5f0d2 100644
--- a/release/scripts/ui/properties_world.py
+++ b/release/scripts/ui/properties_world.py
@@ -29,15 +29,16 @@ class WorldButtonsPanel():
bl_context = "world"
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
- def poll(self, context):
- rd = context.scene.render
- return (context.world) and (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
-
class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER'}
+ @staticmethod
+ def poll(context):
+ rd = context.scene.render
+ return (context.world) and (not rd.use_game_engine) and (rd.engine in __class__.COMPAT_ENGINES)
+
def draw(self, context):
self.layout.template_preview(context.world)
@@ -47,9 +48,10 @@ class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER'}
- def poll(self, context):
+ @staticmethod
+ def poll(context):
rd = context.scene.render
- return (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
+ return (not rd.use_game_engine) and (rd.engine in __class__.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -205,7 +207,8 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Indirect Lighting"
COMPAT_ENGINES = {'BLENDER_RENDER'}
- def poll(self, context):
+ @staticmethod
+ def poll(context):
light = context.world.lighting
return light.gather_method == 'APPROXIMATE'