diff options
author | Bastien Montagne <bastien@blender.org> | 2022-02-22 19:20:18 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-03-29 18:58:40 +0300 |
commit | 5adcf6c85e4c28fcfda0048a9ec7cceae105046d (patch) | |
tree | ebc6b23cb3ede2cd3581371aaf6fae3f057eb511 /source/blender/makesdna/DNA_scene_types.h | |
parent | 101308403833aedbfef1d105424867a8f787d7b6 (diff) |
LibOverride: Add initial System Override flag.
This merely adds the flag, exposes it in RMA, and uses it in some of the
most common 'is editable' checks (RNA, `BASE_EDITABLE` macro...).
Next step: do_version and defining systemoverrides at creation.
Ref: {T95707}.
Diffstat (limited to 'source/blender/makesdna/DNA_scene_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index d0c23f5d452..28c2d8427a8 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -2017,7 +2017,10 @@ extern const char *RE_engine_id_CYCLES; ((v3d == NULL) || (((1 << (base)->object->type) & (v3d)->object_type_exclude_select) == 0)) && \ (((base)->flag & BASE_SELECTABLE) != 0)) #define BASE_SELECTED(v3d, base) (BASE_VISIBLE(v3d, base) && (((base)->flag & BASE_SELECTED) != 0)) -#define BASE_EDITABLE(v3d, base) (BASE_VISIBLE(v3d, base) && !ID_IS_LINKED((base)->object)) +#define BASE_EDITABLE(v3d, base) \ + (BASE_VISIBLE(v3d, base) && !ID_IS_LINKED((base)->object) && \ + (!ID_IS_OVERRIDE_LIBRARY_REAL((base)->object) || \ + ((base)->object->id.override_library->flag & IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED) == 0)) #define BASE_SELECTED_EDITABLE(v3d, base) \ (BASE_EDITABLE(v3d, base) && (((base)->flag & BASE_SELECTED) != 0)) |