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 'intern/cycles/blender/addon')
-rw-r--r--intern/cycles/blender/addon/properties.py27
-rw-r--r--intern/cycles/blender/addon/ui.py29
2 files changed, 55 insertions, 1 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 24cc5735c96..51b3b3d2bcb 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -1012,6 +1012,12 @@ class CyclesLightSettings(bpy.types.PropertyGroup):
"note that this will make the light invisible",
default=False,
)
+ is_caustics_light: BoolProperty(
+ name="Shadow Caustics",
+ description="Generate approximate caustics in shadows of refractive surfaces. "
+ "Lights, caster and receiver objects must have shadow caustics options set to enable this",
+ default=False,
+ )
@classmethod
def register(cls):
@@ -1028,6 +1034,12 @@ class CyclesLightSettings(bpy.types.PropertyGroup):
class CyclesWorldSettings(bpy.types.PropertyGroup):
+ is_caustics_light: BoolProperty(
+ name="Shadow Caustics",
+ description="Generate approximate caustics in shadows of refractive surfaces. "
+ "Lights, caster and receiver objects must have shadow caustics options set to enable this",
+ default=False,
+ )
sampling_method: EnumProperty(
name="Sampling Method",
description="How to sample the background light",
@@ -1226,6 +1238,21 @@ class CyclesObjectSettings(bpy.types.PropertyGroup):
subtype='DISTANCE',
)
+ is_caustics_caster: BoolProperty(
+ name="Cast Shadow Caustics",
+ description="With refractive materials, generate approximate caustics in shadows of this object. "
+ "Up to 10 bounces inside this object are taken into account. Lights, caster and receiver objects "
+ "must have shadow caustics options set to enable this",
+ default=False,
+ )
+
+ is_caustics_receiver: BoolProperty(
+ name="Receive Shadow Caustics",
+ description="Receive approximate caustics from refractive materials in shadows on this object. "
+ "Lights, caster and receiver objects must have shadow caustics options set to enable this",
+ default=False,
+ )
+
@classmethod
def register(cls):
bpy.types.Object.cycles = PointerProperty(
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 1f50f3da7ae..c86452e0a18 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1082,7 +1082,7 @@ class CYCLES_OBJECT_PT_shading(CyclesButtonsPanel, Panel):
return False
ob = context.object
- return ob and has_geometry_visibility(ob)
+ return ob and has_geometry_visibility(ob) and ob.type != 'LIGHT'
def draw(self, context):
pass
@@ -1125,6 +1125,28 @@ class CYCLES_OBJECT_PT_shading_gi_approximation(CyclesButtonsPanel, Panel):
col.prop(cob, "ao_distance")
+class CYCLES_OBJECT_PT_shading_caustics(CyclesButtonsPanel, Panel):
+ bl_label = "Caustics"
+ bl_parent_id = "CYCLES_OBJECT_PT_shading"
+ bl_context = "object"
+
+ @classmethod
+ def poll(cls, context):
+ return CyclesButtonsPanel.poll(context) and not use_metal(context)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ col = layout.column()
+
+ ob = context.object
+ cob = ob.cycles
+ col.prop(cob, "is_caustics_caster")
+ col.prop(cob, "is_caustics_receiver")
+
+
class CYCLES_OBJECT_PT_visibility(CyclesButtonsPanel, Panel):
bl_label = "Visibility"
bl_context = "object"
@@ -1300,6 +1322,8 @@ class CYCLES_LIGHT_PT_light(CyclesButtonsPanel, Panel):
sub.active = not (light.type == 'AREA' and clamp.is_portal)
sub.prop(clamp, "cast_shadow")
sub.prop(clamp, "use_multiple_importance_sampling", text="Multiple Importance")
+ if not use_metal(context):
+ sub.prop(clamp, "is_caustics_light", text="Shadow Caustics")
if light.type == 'AREA':
col.prop(clamp, "is_portal", text="Portal")
@@ -1496,6 +1520,8 @@ class CYCLES_WORLD_PT_settings_surface(CyclesButtonsPanel, Panel):
subsub.active = cworld.sampling_method == 'MANUAL'
subsub.prop(cworld, "sample_map_resolution")
sub.prop(cworld, "max_bounces")
+ sub.prop(cworld, "is_caustics_light", text="Shadow Caustics")
+
class CYCLES_WORLD_PT_settings_volume(CyclesButtonsPanel, Panel):
@@ -2193,6 +2219,7 @@ classes = (
CYCLES_OBJECT_PT_shading,
CYCLES_OBJECT_PT_shading_shadow_terminator,
CYCLES_OBJECT_PT_shading_gi_approximation,
+ CYCLES_OBJECT_PT_shading_caustics,
CYCLES_OBJECT_PT_visibility,
CYCLES_OBJECT_PT_visibility_ray_visibility,
CYCLES_OBJECT_PT_visibility_culling,