BLEN-335: Export environment light #1

Merged
Bogdan Nagirniak merged 5 commits from BLEN-335 into storm-hydra-addon 2023-02-17 13:46:19 +01:00
Showing only changes of commit 9eacb326e6 - Show all commits

View File

@ -5,6 +5,8 @@
import bpy import bpy
from cycles.ui import panel_node_draw
from .engine import StormHydraRenderEngine from .engine import StormHydraRenderEngine
@ -88,10 +90,45 @@ class STORM_HYDRA_LIGHT_PT_light(Panel):
main_col.prop(light, 'size') 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(( register_classes, unregister_classes = bpy.utils.register_classes_factory((
STORM_HYDRA_RENDER_PT_render_settings, STORM_HYDRA_RENDER_PT_render_settings,
STORM_HYDRA_LIGHT_PT_light, STORM_HYDRA_LIGHT_PT_light,
STORM_HYDRA_WORLD_PT_preview,
STORM_HYDRA_WORLD_PT_surface,
)) ))