From 8e5609665fefb004ce2e759a49e063479cf01b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 13 Jun 2017 15:56:04 +0200 Subject: Probe: Add grid probe parameters. --- .../startup/bl_ui/properties_data_lightprobe.py | 28 +++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_data_lightprobe.py b/release/scripts/startup/bl_ui/properties_data_lightprobe.py index 5c5f4c3365f..bb74bff2616 100644 --- a/release/scripts/startup/bl_ui/properties_data_lightprobe.py +++ b/release/scripts/startup/bl_ui/properties_data_lightprobe.py @@ -64,16 +64,23 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel): split = layout.split() - col = split.column(align=True) - col.label("Influence:") - col.prop(probe, "influence_type", text="") - - if probe.influence_type == 'ELIPSOID': - col.prop(probe, "influence_distance", "Radius") + if probe.type == 'GRID': + col = split.column(align=True) + col.label("Resolution:") + col.prop(probe, "grid_resolution_x", text="X") + col.prop(probe, "grid_resolution_y", text="Y") + col.prop(probe, "grid_resolution_z", text="Z") else: - col.prop(probe, "influence_distance", "Size") + col = split.column(align=True) + col.label("Influence:") + col.prop(probe, "influence_type", text="") - col.prop(probe, "falloff") + if probe.influence_type == 'ELIPSOID': + col.prop(probe, "influence_distance", "Radius") + else: + col.prop(probe, "influence_distance", "Size") + + col.prop(probe, "falloff") col = split.column(align=True) col.label("Clipping:") @@ -85,6 +92,11 @@ class DATA_PT_lightprobe_parallax(DataButtonsPanel, Panel): bl_label = "Parallax" COMPAT_ENGINES = {'BLENDER_CLAY', 'BLENDER_EEVEE'} + @classmethod + def poll(cls, context): + engine = context.scene.render.engine + return context.probe and context.probe.type == 'CUBEMAP' and (engine in cls.COMPAT_ENGINES) + def draw(self, context): layout = self.layout -- cgit v1.2.3