[Bf-blender-cvs] [034cea15470] temp-viewport-compositor-merge: Realtime Compositor: Add as an experimental option
Omar Emara
noreply at git.blender.org
Wed Jun 15 11:51:35 CEST 2022
Commit: 034cea15470ac161f9f5d047c07bb7fb22980e3d
Author: Omar Emara
Date: Wed Jun 15 11:50:41 2022 +0200
Branches: temp-viewport-compositor-merge
https://developer.blender.org/rB034cea15470ac161f9f5d047c07bb7fb22980e3d
Realtime Compositor: Add as an experimental option
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
M release/scripts/startup/bl_ui/space_view3d.py
M source/blender/draw/intern/draw_manager.c
M source/blender/makesdna/DNA_userdef_types.h
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 191066df89f..4364a11ec22 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2260,6 +2260,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
({"property": "use_sculpt_tools_tilt"}, "T82877"),
({"property": "use_extended_asset_browser"}, ("project/view/130/", "Project Page")),
({"property": "use_override_templates"}, ("T73318", "Milestone 4")),
+ ({"property": "use_realtime_compositor"}, "T91293"),
),
)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 8830421383f..0fb592cc26b 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -6112,7 +6112,8 @@ class VIEW3D_PT_shading_compositor(Panel):
@classmethod
def poll(cls, context):
- return context.space_data.shading.type in ('MATERIAL', 'RENDERED')
+ return (context.space_data.shading.type in ('MATERIAL', 'RENDERED') and
+ context.preferences.experimental.use_realtime_compositor)
def draw(self, context):
shading = context.space_data.shading
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index bc8a39c8b1c..dd36a9c6719 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -43,6 +43,7 @@
#include "DNA_camera_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_userdef_types.h"
#include "DNA_world_types.h"
#include "ED_gpencil.h"
@@ -1228,6 +1229,10 @@ static void drw_engines_enable_editors(void)
static bool is_compositor_enabled(void)
{
+ if (!U.experimental.use_realtime_compositor) {
+ return false;
+ }
+
if (!(DST.draw_ctx.v3d->shading.flag & V3D_SHADING_COMPOSITOR)) {
return false;
}
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index e449605ed81..63594d55183 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -653,6 +653,8 @@ typedef struct UserDef_Experimental {
char enable_eevee_next;
char use_sculpt_texture_paint;
char use_draw_manager_acquire_lock;
+ char use_realtime_compositor;
+ char _pad[7];
/** `makesdna` does not allow empty structs. */
} UserDef_Experimental;
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 43e8879fc17..95dfcedbc03 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -6420,6 +6420,10 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "Sculpt Mode Tilt Support", "Support for pen tablet tilt events in Sculpt Mode");
+ prop = RNA_def_property(srna, "use_realtime_compositor", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "use_realtime_compositor", 1);
+ RNA_def_property_ui_text(prop, "Realtime Compositor", "Enable the new realtime compositor");
+
prop = RNA_def_property(srna, "use_sculpt_texture_paint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_sculpt_texture_paint", 1);
RNA_def_property_ui_text(prop, "Sculpt Texture Paint", "Use texture painting in Sculpt Mode");
More information about the Bf-blender-cvs
mailing list