diff options
Diffstat (limited to 'intern/cycles/blender/addon')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 4 | ||||
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 0a3cffd5071..46a49f52de0 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -155,6 +155,10 @@ class CyclesWorldSettings(bpy.types.PropertyGroup): @classmethod def register(cls): bpy.types.World.cycles = PointerProperty(type=cls, name="Cycles World Settings", description="Cycles world settings") + cls.sample_as_light = BoolProperty(name="Sample as Lamp", description="Use direct light sampling for the environment, enabling for non-solid colors is recommended", + default=False) + cls.sample_map_resolution = IntProperty(name="Map Resolution", description="Importance map size is resolution x resolution; higher values potentially produce less noise, at the cost of memory and speed", + default=256, min=4, max=8096) @classmethod def unregister(cls): diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 70f38fa7e8c..67ff79a2037 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -453,10 +453,38 @@ class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel): layout = self.layout world = context.world + if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'): layout.prop(world, "horizon_color", text="Color") +class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel): + bl_label = "Settings" + bl_context = "world" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + return context.world and CyclesButtonsPanel.poll(context) + + def draw(self, context): + layout = self.layout + + world = context.world + cworld = world.cycles + + split = layout.split() + col = split.column() + + col.prop(cworld, "sample_as_light") + row = col.row() + row.active = cworld.sample_as_light + row.prop(cworld, "sample_map_resolution") + + col = split.column() + col.label() + + class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel): bl_label = "Volume" bl_context = "world" |