From 9eacb326e6d6dd3f1d399cc7908a4cc6c45b04d2 Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Thu, 9 Feb 2023 16:09:49 +0300 Subject: [PATCH 1/3] added panels for world light --- hydra_storm/ui.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/hydra_storm/ui.py b/hydra_storm/ui.py index a7ca58b2f..6295f8572 100644 --- a/hydra_storm/ui.py +++ b/hydra_storm/ui.py @@ -5,6 +5,8 @@ import bpy +from cycles.ui import panel_node_draw + from .engine import StormHydraRenderEngine @@ -88,10 +90,45 @@ class STORM_HYDRA_LIGHT_PT_light(Panel): main_col.prop(light, 'size') +class STORM_HYDRA_WORLD_PT_preview(Panel): + bl_label = "Preview" + bl_context = "world" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + return context.world and super().poll(context) + + def draw(self, context): + self.layout.template_preview(context.world) + + +class STORM_HYDRA_WORLD_PT_surface(Panel): + bl_label = "Surface" + bl_context = "world" + + @classmethod + def poll(cls, context): + return context.world and super().poll(context) + + def draw(self, context): + layout = self.layout + + layout.use_property_split = True + + world = context.world + + if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'): + layout.prop(world, "color") + register_classes, unregister_classes = bpy.utils.register_classes_factory(( STORM_HYDRA_RENDER_PT_render_settings, + STORM_HYDRA_LIGHT_PT_light, + + STORM_HYDRA_WORLD_PT_preview, + STORM_HYDRA_WORLD_PT_surface, )) -- 2.30.2 From dbee5135b09f9fc8874fd008fde023b22b6e7923 Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Thu, 16 Feb 2023 12:18:13 +0300 Subject: [PATCH 2/3] replaced own world panels with eevee world panels --- hydra_storm/ui.py | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/hydra_storm/ui.py b/hydra_storm/ui.py index 6295f8572..fe51b84f2 100644 --- a/hydra_storm/ui.py +++ b/hydra_storm/ui.py @@ -90,45 +90,10 @@ class STORM_HYDRA_LIGHT_PT_light(Panel): main_col.prop(light, 'size') -class STORM_HYDRA_WORLD_PT_preview(Panel): - bl_label = "Preview" - bl_context = "world" - bl_options = {'DEFAULT_CLOSED'} - - @classmethod - def poll(cls, context): - return context.world and super().poll(context) - - def draw(self, context): - self.layout.template_preview(context.world) - - -class STORM_HYDRA_WORLD_PT_surface(Panel): - bl_label = "Surface" - bl_context = "world" - - @classmethod - def poll(cls, context): - return context.world and super().poll(context) - - def draw(self, context): - layout = self.layout - - layout.use_property_split = True - - world = context.world - - if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'): - layout.prop(world, "color") - - register_classes, unregister_classes = bpy.utils.register_classes_factory(( STORM_HYDRA_RENDER_PT_render_settings, STORM_HYDRA_LIGHT_PT_light, - - STORM_HYDRA_WORLD_PT_preview, - STORM_HYDRA_WORLD_PT_surface, )) @@ -188,6 +153,7 @@ def get_panels(): 'EEVEE_MATERIAL_PT_surface', 'EEVEE_MATERIAL_PT_volume', 'EEVEE_MATERIAL_PT_settings', + 'EEVEE_WORLD_PT_surface', } for panel_cls in bpy.types.Panel.__subclasses__(): -- 2.30.2 From f631323d9c2b60a3556075289aa440a4e1b6df2c Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Fri, 17 Feb 2023 12:04:03 +0300 Subject: [PATCH 3/3] removed unused import --- hydra_storm/ui.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/hydra_storm/ui.py b/hydra_storm/ui.py index fe51b84f2..7051079d3 100644 --- a/hydra_storm/ui.py +++ b/hydra_storm/ui.py @@ -5,8 +5,6 @@ import bpy -from cycles.ui import panel_node_draw - from .engine import StormHydraRenderEngine -- 2.30.2