diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-06-15 00:16:04 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-06-15 00:21:12 +0300 |
commit | 23254ce4ee6b21b202549b421cf1d98f6a03b33d (patch) | |
tree | 77ebd72c7f1cd2776e058f04b5e6e49f14a327ec /source/blender/editors/interface/interface_templates.c | |
parent | f64070185808f153d141b26e63942424a1b258b1 (diff) |
Cleanup: Rename: Static Override -> Library Override.
Better to make internal code naming match official/UI naming to some
extent, this will reduce confusion in the future.
This is 'breaking' scripts and files that would use that feature, but
since it is not yet officially supported nor exposed in 2.80, as far
as that release is concerned, it is effectively
a 'no functional changes' commit.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 4efa024ac77..58d352ac8d1 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -515,8 +515,8 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) case UI_ID_LOCAL: if (id) { Main *bmain = CTX_data_main(C); - if (BKE_override_static_is_enabled() && CTX_wm_window(C)->eventstate->shift) { - ID *override_id = BKE_override_static_create_from_id(bmain, id); + if (BKE_override_library_is_enabled() && CTX_wm_window(C)->eventstate->shift) { + ID *override_id = BKE_override_library_create_from_id(bmain, id); if (override_id != NULL) { BKE_main_id_clear_newpoins(bmain); @@ -537,8 +537,8 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) } break; case UI_ID_OVERRIDE: - if (id && id->override_static) { - BKE_override_static_free(&id->override_static); + if (id && id->override_library) { + BKE_override_library_free(&id->override_library); /* reassign to get get proper updates/notifiers */ idptr = RNA_property_pointer_get(&template_ui->ptr, template_ui->prop); RNA_property_pointer_set(&template_ui->ptr, template_ui->prop, idptr, NULL); @@ -856,9 +856,9 @@ static void template_ID(bContext *C, 0, 0, 0, - BKE_override_static_is_enabled() ? + BKE_override_library_is_enabled() ? TIP_("Direct linked library data-block, click to make local, " - "Shift + Click to create a static override") : + "Shift + Click to create a library override") : TIP_("Direct linked library data-block, click to make local")); if (disabled) { UI_but_flag_enable(but, UI_BUT_DISABLED); @@ -869,22 +869,21 @@ static void template_ID(bContext *C, } } } - else if (ID_IS_STATIC_OVERRIDE(id)) { - but = uiDefIconBut( - block, - UI_BTYPE_BUT, - 0, - ICON_LIBRARY_DATA_OVERRIDE, - 0, - 0, - UI_UNIT_X, - UI_UNIT_Y, - NULL, - 0, - 0, - 0, - 0, - TIP_("Static override of linked library data-block, click to make fully local")); + else if (ID_IS_OVERRIDE_LIBRARY(id)) { + but = uiDefIconBut(block, + UI_BTYPE_BUT, + 0, + ICON_LIBRARY_DATA_OVERRIDE, + 0, + 0, + UI_UNIT_X, + UI_UNIT_Y, + NULL, + 0, + 0, + 0, + 0, + TIP_("Library override of linked data-block, click to make fully local")); UI_but_funcN_set( but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_OVERRIDE)); } |