From 7aab508e3273ae1762ae815bbecc8842938f0926 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 9 Mar 2022 15:38:17 +0100 Subject: Color Management: support different settings for render and compositing output The Output Properties > Output panel now has a Color Management subpanel to override scene settings. When set to Override instead of Follow Scene, there are settings to: * For OpenEXR, choose a (linear) colorspace for RGBA passes * For other file formats, use different display/view/look/exposure/gamma These settings affect animation render output, image save of renders and the compositor file output node. Additionally, the image save operator and compositor file output nodes also support overriding color management. Includes some layout changes to the relevant panels to accomdate the new settings and to improve consistency. Ideally subpanels would be used to better organize these settings, however nodes and operators don't currently support creating subpanels. Differential Revision: https://developer.blender.org/D14402 --- release/scripts/startup/bl_ui/properties_output.py | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_output.py b/release/scripts/startup/bl_ui/properties_output.py index 34e86184097..312a580bf7d 100644 --- a/release/scripts/startup/bl_ui/properties_output.py +++ b/release/scripts/startup/bl_ui/properties_output.py @@ -296,6 +296,41 @@ class RENDER_PT_output_views(RenderOutputButtonsPanel, Panel): layout.template_image_views(rd.image_settings) +class RENDER_PT_output_color_management(RenderOutputButtonsPanel, Panel): + bl_label = "Color Management" + bl_options = {'DEFAULT_CLOSED'} + bl_parent_id = "RENDER_PT_output" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + scene = context.scene + image_settings = scene.render.image_settings + + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + + layout.row().prop(image_settings, "color_management", text=" ", expand=True) + + flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True) + + if image_settings.color_management == 'OVERRIDE': + owner = image_settings + else: + owner = scene + flow.enabled = False + + col = flow.column() + + if image_settings.has_linear_colorspace: + if hasattr(owner, 'linear_colorspace_settings'): + col.prop(owner.linear_colorspace_settings, "name", text="Color Space") + else: + col.prop(owner.display_settings, "display_device") + col.separator() + col.template_colormanaged_view_settings(owner, "view_settings") + + class RENDER_PT_encoding(RenderOutputButtonsPanel, Panel): bl_label = "Encoding" bl_parent_id = "RENDER_PT_output" @@ -484,6 +519,7 @@ classes = ( RENDER_PT_stereoscopy, RENDER_PT_output, RENDER_PT_output_views, + RENDER_PT_output_color_management, RENDER_PT_encoding, RENDER_PT_encoding_video, RENDER_PT_encoding_audio, -- cgit v1.2.3