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.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py
index b4507ccc73c..fd11f299f34 100644
--- a/release/scripts/ui/properties_world.py
+++ b/release/scripts/ui/properties_world.py
@@ -139,11 +139,6 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Indirect Lighting"
COMPAT_ENGINES = {'BLENDER_RENDER'}
- @classmethod
- def poll(cls, context):
- light = getattr(context.world, "light_settings", None)
- return light and light.gather_method == 'APPROXIMATE'
-
def draw_header(self, context):
light = context.world.light_settings
self.layout.prop(light, "use_indirect_light", text="")
@@ -152,12 +147,15 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
layout = self.layout
light = context.world.light_settings
- layout.active = light.use_indirect_light
+ layout.active = light.use_indirect_light and light.gather_method == 'APPROXIMATE'
split = layout.split()
split.prop(light, "indirect_factor", text="Factor")
split.prop(light, "indirect_bounces", text="Bounces")
+ if light.gather_method == 'RAYTRACE':
+ layout.label(text="Only works with Approximate gather method")
+
class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Gather"
@@ -266,14 +264,15 @@ class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "world"
+ _property_type = bpy.types.World
def register():
- pass
+ bpy.utils.register_module(__name__)
def unregister():
- pass
+ bpy.utils.unregister_module(__name__)
if __name__ == "__main__":
register()