Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2022-10-18 19:26:50 +0300
committerJulian Eisel <julian@blender.org>2022-10-18 19:26:50 +0300
commit7234c363dbf874dc8b20d88d5bc02187871e10aa (patch)
tree8bb10f9594c553b985c2e3ae6e461aeeb0f58f60 /source
parentc47520137867b67a936dc78053742dc1ae759d3e (diff)
Hide UI behind experimental option
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/blendfile.c3
-rw-r--r--source/blender/blenloader/intern/writefile.cc4
-rw-r--r--source/blender/editors/project/project_ops.cc10
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_screen.c4
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c6
6 files changed, 28 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index d8e3183447e..e39c8756d96 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -448,6 +448,9 @@ static void setup_app_blend_file_data(bContext *C,
static void setup_app_project_data(BlendFileData *bfd, const struct BlendFileReadParams *params)
{
+ if (!U.experimental.use_blender_projects) {
+ return;
+ }
if ((params->skip_flags & BLO_READ_SKIP_DATA) == 0) {
BKE_project_active_load_from_path(bfd->main->filepath);
}
diff --git a/source/blender/blenloader/intern/writefile.cc b/source/blender/blenloader/intern/writefile.cc
index 6b049278f8b..01a729732a1 100644
--- a/source/blender/blenloader/intern/writefile.cc
+++ b/source/blender/blenloader/intern/writefile.cc
@@ -1442,7 +1442,9 @@ bool BLO_write_file(Main *mainvar,
}
/* Update active project information based on the new file location. */
- BKE_project_active_load_from_path(filepath);
+ if (U.experimental.use_blender_projects) {
+ BKE_project_active_load_from_path(filepath);
+ }
/* actual file writing */
const bool err = write_file_handle(
diff --git a/source/blender/editors/project/project_ops.cc b/source/blender/editors/project/project_ops.cc
index 797b4fd3f56..b9398aa9e95 100644
--- a/source/blender/editors/project/project_ops.cc
+++ b/source/blender/editors/project/project_ops.cc
@@ -39,6 +39,15 @@ static bool has_active_project_poll(bContext *C)
/** \name New project operator
* \{ */
+static bool new_project_poll(bContext *C)
+{
+ if (!U.experimental.use_blender_projects) {
+ CTX_wm_operator_poll_msg_set(C, "Experimental project support is not enabled");
+ return false;
+ }
+ return true;
+}
+
static int new_project_exec(bContext *C, wmOperator *op)
{
const Main *bmain = CTX_data_main(C);
@@ -89,6 +98,7 @@ static void PROJECT_OT_new(wmOperatorType *ot)
ot->invoke = new_project_invoke;
ot->exec = new_project_exec;
/* omit window poll so this can work in background mode */
+ ot->poll = new_project_poll;
WM_operator_properties_filesel(ot,
FILE_TYPE_FOLDER,
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 44a5bf5a20d..5a6c7992a3e 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -647,7 +647,8 @@ typedef struct UserDef_Experimental {
char use_sculpt_texture_paint;
char use_draw_manager_acquire_lock;
char use_realtime_compositor;
- char _pad[7];
+ char use_blender_projects;
+ char _pad[6];
/** `makesdna` does not allow empty structs. */
} UserDef_Experimental;
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index a65bd613ecf..2051045cd73 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -186,6 +186,10 @@ static const EnumPropertyItem *rna_Area_ui_type_itemf(bContext *C,
continue;
}
+ if (!U.experimental.use_blender_projects && (item_from->value == SPACE_PROJECT_SETTINGS)) {
+ continue;
+ }
+
SpaceType *st = item_from->identifier[0] ? BKE_spacetype_from_id(item_from->value) : NULL;
int totitem_prev = totitem;
if (st && st->space_subtype_item_extend != NULL) {
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 0c873ef1997..2fed4e3f4a3 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -6369,6 +6369,12 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "Override Templates", "Enable library override template in the python API");
+ prop = RNA_def_property(srna, "use_blender_projects", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_ui_text(prop,
+ "Blender Projects",
+ "Enable support for Blender project directories, consisting out of "
+ "multiple .blend files and dedicated project settings");
+
prop = RNA_def_property(srna, "enable_eevee_next", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "enable_eevee_next", 1);
RNA_def_property_ui_text(prop, "EEVEE Next", "Enable the new EEVEE codebase, requires restart");