diff options
author | Bastien Montagne <bastien@blender.org> | 2022-03-28 18:34:36 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-11 01:31:50 +0300 |
commit | a46de41db595de4c2564af25a091a420723a222f (patch) | |
tree | 4a90a688d8ff02c4d180aa7f16757f16b9236502 /source/blender/editors/space_text | |
parent | 59975875f892f004330e4df85ed8dec4a8036778 (diff) |
LibOverride: Massive edits to 'editable' IDs checks in editors code.
Add new `BKE_id_is_editable` helper in `BKE_lib_id.h`, that supercedes
previous check (simple `ID_IS_LINKED()` macro) for many editing cases.
This allows to also take into account 'system override' (aka
non-editable override) case.
Ref: {T95707}.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index f5656e13c0e..49c0236866d 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -185,7 +185,7 @@ static bool text_edit_poll(bContext *C) return false; } - if (ID_IS_LINKED(text)) { + if (!BKE_id_is_editable(CTX_data_main(C), &text->id)) { // BKE_report(op->reports, RPT_ERROR, "Cannot edit external library data"); return false; } @@ -202,7 +202,7 @@ bool text_space_edit_poll(bContext *C) return false; } - if (ID_IS_LINKED(text)) { + if (!BKE_id_is_editable(CTX_data_main(C), &text->id)) { // BKE_report(op->reports, RPT_ERROR, "Cannot edit external library data"); return false; } @@ -224,7 +224,7 @@ static bool text_region_edit_poll(bContext *C) return false; } - if (ID_IS_LINKED(text)) { + if (!BKE_id_is_editable(CTX_data_main(C), &text->id)) { // BKE_report(op->reports, RPT_ERROR, "Cannot edit external library data"); return false; } |