EEVEE-Next: UI: Light Panel
- Put non-usual settings into sub panels. - Rename shadow parameters to be shorter Pull Request: https://projects.blender.org/blender/blender/pulls/120732
This commit is contained in:
committed by
Clément Foucault
parent
0791d7c349
commit
0c50ec866f
@@ -91,13 +91,6 @@ class DATA_PT_EEVEE_light(DataButtonsPanel, Panel):
|
||||
|
||||
col.separator()
|
||||
|
||||
col.prop(light, "diffuse_factor", text="Diffuse")
|
||||
col.prop(light, "specular_factor", text="Specular")
|
||||
col.prop(light, "transmission_factor", text="Transmission")
|
||||
col.prop(light, "volume_factor", text="Volume", text_ctxt=i18n_contexts.id_id)
|
||||
|
||||
col.separator()
|
||||
|
||||
if light.type in {'POINT', 'SPOT'}:
|
||||
col.prop(light, "use_soft_falloff")
|
||||
col.prop(light, "shadow_soft_size", text="Radius")
|
||||
@@ -114,17 +107,6 @@ class DATA_PT_EEVEE_light(DataButtonsPanel, Panel):
|
||||
sub.prop(light, "size", text="Size X")
|
||||
sub.prop(light, "size_y", text="Y")
|
||||
|
||||
if context.engine == 'BLENDER_EEVEE_NEXT':
|
||||
col.separator()
|
||||
|
||||
col.prop(light, "use_shadow", text="Cast Shadow")
|
||||
col.prop(light, "shadow_softness_factor", text="Shadow Softness")
|
||||
col.prop(light, "shadow_filter_radius", text="Filtering Radius")
|
||||
col.prop(light, "shadow_resolution_scale", text="Resolution Scale")
|
||||
|
||||
if light.type == 'SUN':
|
||||
col.prop(light, "shadow_trace_distance", text="Trace Distance")
|
||||
|
||||
|
||||
class DATA_PT_EEVEE_light_distance(DataButtonsPanel, Panel):
|
||||
bl_label = "Custom Distance"
|
||||
@@ -154,6 +136,62 @@ class DATA_PT_EEVEE_light_distance(DataButtonsPanel, Panel):
|
||||
layout.prop(light, "cutoff_distance", text="Distance")
|
||||
|
||||
|
||||
class DATA_PT_EEVEE_light_shadow(DataButtonsPanel, Panel):
|
||||
bl_label = "Shadow"
|
||||
bl_parent_id = "DATA_PT_EEVEE_light"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_EEVEE_NEXT'}
|
||||
|
||||
def draw_header(self, context):
|
||||
light = context.light
|
||||
self.layout.prop(light, "use_shadow", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
light = context.light
|
||||
layout.use_property_split = True
|
||||
layout.active = context.scene.eevee.use_shadows and light.use_shadow
|
||||
|
||||
col = layout.column()
|
||||
col.prop(light, "shadow_softness_factor", text="Softness")
|
||||
if light.type == 'SUN':
|
||||
col.prop(light, "shadow_trace_distance", text="Distance")
|
||||
|
||||
col.separator()
|
||||
|
||||
col.prop(light, "shadow_filter_radius", text="Filter")
|
||||
col.prop(light, "shadow_resolution_scale", text="Resolution")
|
||||
|
||||
|
||||
class DATA_PT_EEVEE_light_influence(DataButtonsPanel, Panel):
|
||||
bl_label = "Influence"
|
||||
bl_parent_id = "DATA_PT_EEVEE_light"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_EEVEE_NEXT'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
ob = context.object
|
||||
light = context.light
|
||||
layout.use_property_split = True
|
||||
|
||||
col = layout.column()
|
||||
col.active = ob.visible_diffuse
|
||||
col.prop(light, "diffuse_factor", text="Diffuse")
|
||||
|
||||
col = layout.column()
|
||||
col.active = ob.visible_glossy
|
||||
col.prop(light, "specular_factor", text="Glossy")
|
||||
|
||||
col = layout.column()
|
||||
col.active = ob.visible_transmission
|
||||
col.prop(light, "transmission_factor", text="Transmission")
|
||||
|
||||
col = layout.column()
|
||||
col.active = ob.visible_volume_scatter
|
||||
col.prop(light, "volume_factor", text="Volume Scatter", text_ctxt=i18n_contexts.id_id)
|
||||
|
||||
|
||||
class DATA_PT_EEVEE_shadow(DataButtonsPanel, Panel):
|
||||
bl_label = "Shadow"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
@@ -250,7 +288,7 @@ class DATA_PT_EEVEE_shadow_contact(DataButtonsPanel, Panel):
|
||||
|
||||
|
||||
class DATA_PT_spot(DataButtonsPanel, Panel):
|
||||
bl_label = "Spot Shape"
|
||||
bl_label = "Beam Shape"
|
||||
bl_parent_id = "DATA_PT_EEVEE_light"
|
||||
COMPAT_ENGINES = {
|
||||
'BLENDER_RENDER',
|
||||
@@ -295,11 +333,13 @@ classes = (
|
||||
DATA_PT_preview,
|
||||
DATA_PT_light,
|
||||
DATA_PT_EEVEE_light,
|
||||
DATA_PT_spot,
|
||||
DATA_PT_EEVEE_light_shadow,
|
||||
DATA_PT_EEVEE_light_influence,
|
||||
DATA_PT_EEVEE_light_distance,
|
||||
DATA_PT_EEVEE_shadow,
|
||||
DATA_PT_EEVEE_shadow_cascaded_shadow_map,
|
||||
DATA_PT_EEVEE_shadow_contact,
|
||||
DATA_PT_spot,
|
||||
DATA_PT_custom_props_light,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user