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
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-10-19 17:42:42 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-10-19 19:38:19 +0300
commitfbf4c11960db62a27876e1d791d3293071e26c76 (patch)
tree8b51aa88f16ba18884b3d9120636f66052474a8e /source/creator/creator_args.c
parente6fe207a52b1d3f46f02c3d01973ae501c97ba49 (diff)
Make Static Override optional/hidden by default.
That feature will not be ready (or at least, not tested enough) to be officially part of 2.80 beta. So we disable it by default, hidding it behind a startup option (`--enable-static-override`), and a python app var (`bpy.app.use_static_override`). That way, people who really want to play with it can do it easily, while not exposing/enabling non-production-ready feature by default. Note that underlying override code remains active, i.e. files we do have overridden data-blocks will be loaded correctly according to static override.
Diffstat (limited to 'source/creator/creator_args.c')
-rw-r--r--source/creator/creator_args.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index b276a1d884a..86eafc1de09 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -54,6 +54,7 @@
#include "BKE_global.h"
#include "BKE_library.h"
+#include "BKE_library_override.h"
#include "BKE_main.h"
#include "BKE_scene.h"
#include "BKE_report.h"
@@ -568,6 +569,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
printf("Misc Options:\n");
BLI_argsPrintArgDoc(ba, "--app-template");
BLI_argsPrintArgDoc(ba, "--factory-startup");
+ BLI_argsPrintArgDoc(ba, "--enable-static-override");
printf("\n");
BLI_argsPrintArgDoc(ba, "--env-system-datafiles");
BLI_argsPrintArgDoc(ba, "--env-system-scripts");
@@ -1001,6 +1003,15 @@ static int arg_handle_factory_startup_set(int UNUSED(argc), const char **UNUSED(
return 0;
}
+static const char arg_handle_enable_static_override_doc[] =
+"\n\tEnable Static Override features in the UI."
+;
+static int arg_handle_enable_static_override(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
+{
+ BKE_override_static_enable(true);
+ return 0;
+}
+
static const char arg_handle_env_system_set_doc_datafiles[] =
"\n\tSet the "STRINGIFY_ARG (BLENDER_SYSTEM_DATAFILES)" environment variable.";
static const char arg_handle_env_system_set_doc_scripts[] =
@@ -1927,6 +1938,7 @@ void main_args_setup(bContext *C, bArgs *ba)
BLI_argsAdd(ba, 1, NULL, "--app-template", CB(arg_handle_app_template), NULL);
BLI_argsAdd(ba, 1, NULL, "--factory-startup", CB(arg_handle_factory_startup_set), NULL);
+ BLI_argsAdd(ba, 1, NULL, "--enable-static-override", CB(arg_handle_enable_static_override), NULL);
/* TODO, add user env vars? */
BLI_argsAdd(ba, 1, NULL, "--env-system-datafiles", CB_EX(arg_handle_env_system_set, datafiles), NULL);