forked from blender/blender-addons
BLEN-335: Export environment light #1
@ -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,
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user