Support more AOVs #23

Merged
Bogdan Nagirniak merged 4 commits from DagerD/blender-addons:BLEN-461 into storm-hydra-addon 2023-07-29 14:58:37 +02:00
2 changed files with 30 additions and 0 deletions
Showing only changes of commit b67c54f8f0 - Show all commits

View File

@ -28,6 +28,10 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine):
'maxLights': settings.max_lights, 'maxLights': settings.max_lights,
} }
def update_render_passes(self, scene, render_layer):
if render_layer.use_pass_z:
self.register_pass(scene, render_layer, 'Depth', 1, 'Z', 'VALUE')
register, unregister = bpy.utils.register_classes_factory(( register, unregister = bpy.utils.register_classes_factory((
StormHydraRenderEngine, StormHydraRenderEngine,

View File

@ -163,6 +163,30 @@ class STORM_HYDRA_RENDER_PT_film(bpy.types.Panel):
layout.prop(context.scene.render, "film_transparent", text="Transparent Background") layout.prop(context.scene.render, "film_transparent", text="Transparent Background")
class STORM_HYDRA_RENDER_PT_passes(Panel):
bl_label = "Passes"
bl_context = "view_layer"
def draw(self, context):
pass
class STORM_HYDRA_RENDER_PT_passes_data(Panel):
bl_label = "Data"
bl_context = "view_layer"
bl_parent_id = "STORM_HYDRA_RENDER_PT_passes"
def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
view_layer = context.view_layer
col = layout.column(heading="Include", align=True)
col.prop(view_layer, "use_pass_z")
register_classes, unregister_classes = bpy.utils.register_classes_factory(( register_classes, unregister_classes = bpy.utils.register_classes_factory((
STORM_HYDRA_RENDER_PT_final, STORM_HYDRA_RENDER_PT_final,
STORM_HYDRA_RENDER_PT_volume_final, STORM_HYDRA_RENDER_PT_volume_final,
@ -170,6 +194,8 @@ register_classes, unregister_classes = bpy.utils.register_classes_factory((
STORM_HYDRA_RENDER_PT_volume_viewport, STORM_HYDRA_RENDER_PT_volume_viewport,
STORM_HYDRA_RENDER_PT_film, STORM_HYDRA_RENDER_PT_film,
STORM_HYDRA_LIGHT_PT_light, STORM_HYDRA_LIGHT_PT_light,
STORM_HYDRA_RENDER_PT_passes,
STORM_HYDRA_RENDER_PT_passes_data,
)) ))