diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-19 17:42:42 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-19 19:38:19 +0300 |
commit | fbf4c11960db62a27876e1d791d3293071e26c76 (patch) | |
tree | 8b51aa88f16ba18884b3d9120636f66052474a8e /source/blender/makesrna/intern | |
parent | e6fe207a52b1d3f46f02c3d01973ae501c97ba49 (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/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 921a7e3561a..463214fd4fd 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -355,7 +355,7 @@ static ID *rna_ID_copy(ID *id, Main *bmain) static ID *rna_ID_override_create(ID *id, Main *bmain) { - if (id->lib == NULL) { + if (!BKE_override_static_is_enabled() || id->lib == NULL) { return NULL; } diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index a105e205a2e..b05a6bd6c1d 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -7976,6 +7976,10 @@ eRNAOverrideStatus RNA_property_static_override_status(PointerRNA *ptr, Property { int override_status = 0; + if (!BKE_override_static_is_enabled()) { + return override_status; + } + if (!ptr || !prop || !ptr->id.data || !((ID *)ptr->id.data)->override_static) { return override_status; } |