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.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py
index 1fa0d15a90b..bb5758ff902 100644
--- a/release/scripts/ui/properties_world.py
+++ b/release/scripts/ui/properties_world.py
@@ -29,8 +29,7 @@ class WorldButtonsPanel():
@classmethod
def poll(cls, context):
- rd = context.scene.render
- return (rd.engine in cls.COMPAT_ENGINES)
+ return (context.world and context.scene.render.engine in cls.COMPAT_ENGINES)
class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
@@ -70,12 +69,6 @@ class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
self.layout.template_preview(context.world)
-
-
-
-
-
-
class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = "World"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -141,8 +134,8 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
@classmethod
def poll(cls, context):
- light = context.world.lighting
- return light.gather_method == 'APPROXIMATE'
+ light = getattr(context.world, "lighting", None)
+ return light and light.gather_method == 'APPROXIMATE'
def draw_header(self, context):
light = context.world.lighting