diff options
Diffstat (limited to 'source/blender/editors')
13 files changed, 101 insertions, 102 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 2154ac4a7f6..8ee78e661d8 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1462,7 +1462,7 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block) void ui_but_override_flag(uiBut *but) { - const int override_status = RNA_property_static_override_status( + const int override_status = RNA_property_override_library_status( &but->rnapoin, but->rnaprop, but->rnaindex); if (override_status & RNA_OVERRIDE_STATUS_OVERRIDDEN) { diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c index 71026e79f60..36e197a0591 100644 --- a/source/blender/editors/interface/interface_context_menu.c +++ b/source/blender/editors/interface/interface_context_menu.c @@ -524,7 +524,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but) const bool is_array = RNA_property_array_length(&but->rnapoin, but->rnaprop) != 0; const bool is_array_component = (is_array && but->rnaindex != -1); - const int override_status = RNA_property_static_override_status(ptr, prop, -1); + const int override_status = RNA_property_override_library_status(ptr, prop, -1); const bool is_overridable = (override_status & RNA_OVERRIDE_STATUS_OVERRIDABLE) != 0; /* Set the (button_pointer, button_prop) diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 768cc32aeb5..b08810c966b 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -430,7 +430,7 @@ static bool override_type_set_button_poll(bContext *C) UI_context_active_but_prop_get(C, &ptr, &prop, &index); - const int override_status = RNA_property_static_override_status(&ptr, prop, index); + const int override_status = RNA_property_override_library_status(&ptr, prop, index); return (ptr.data && prop && (override_status & RNA_OVERRIDE_STATUS_OVERRIDABLE)); } @@ -448,20 +448,20 @@ static int override_type_set_button_exec(bContext *C, wmOperator *op) switch (op_type) { case UIOverride_Type_NOOP: - operation = IDOVERRIDESTATIC_OP_NOOP; + operation = IDOVERRIDE_LIBRARY_OP_NOOP; break; case UIOverride_Type_Replace: - operation = IDOVERRIDESTATIC_OP_REPLACE; + operation = IDOVERRIDE_LIBRARY_OP_REPLACE; break; case UIOverride_Type_Difference: /* override code will automatically switch to subtract if needed. */ - operation = IDOVERRIDESTATIC_OP_ADD; + operation = IDOVERRIDE_LIBRARY_OP_ADD; break; case UIOverride_Type_Factor: - operation = IDOVERRIDESTATIC_OP_MULTIPLY; + operation = IDOVERRIDE_LIBRARY_OP_MULTIPLY; break; default: - operation = IDOVERRIDESTATIC_OP_REPLACE; + operation = IDOVERRIDE_LIBRARY_OP_REPLACE; BLI_assert(0); break; } @@ -475,7 +475,7 @@ static int override_type_set_button_exec(bContext *C, wmOperator *op) index = -1; } - IDOverrideStaticPropertyOperation *opop = RNA_property_override_property_operation_get( + IDOverrideLibraryPropertyOperation *opop = RNA_property_override_property_operation_get( &ptr, prop, operation, index, true, NULL, &created); if (!created) { opop->operation = operation; @@ -491,7 +491,7 @@ static int override_type_set_button_invoke(bContext *C, #if 0 /* Disabled for now */ return WM_menu_invoke_ex(C, op, WM_OP_INVOKE_DEFAULT); #else - RNA_enum_set(op->ptr, "type", IDOVERRIDESTATIC_OP_REPLACE); + RNA_enum_set(op->ptr, "type", IDOVERRIDE_LIBRARY_OP_REPLACE); return override_type_set_button_exec(C, op); #endif } @@ -530,7 +530,7 @@ static bool override_remove_button_poll(bContext *C) UI_context_active_but_prop_get(C, &ptr, &prop, &index); - const int override_status = RNA_property_static_override_status(&ptr, prop, index); + const int override_status = RNA_property_override_library_status(&ptr, prop, index); return (ptr.data && ptr.id.data && prop && (override_status & RNA_OVERRIDE_STATUS_OVERRIDDEN)); } @@ -547,16 +547,16 @@ static int override_remove_button_exec(bContext *C, wmOperator *op) UI_context_active_but_prop_get(C, &ptr, &prop, &index); ID *id = ptr.id.data; - IDOverrideStaticProperty *oprop = RNA_property_override_property_find(&ptr, prop); + IDOverrideLibraryProperty *oprop = RNA_property_override_property_find(&ptr, prop); BLI_assert(oprop != NULL); - BLI_assert(id != NULL && id->override_static != NULL); + BLI_assert(id != NULL && id->override_library != NULL); - const bool is_template = (id->override_static->reference == NULL); + const bool is_template = (id->override_library->reference == NULL); /* We need source (i.e. linked data) to restore values of deleted overrides... * If this is an override template, we obviously do not need to restore anything. */ if (!is_template) { - RNA_id_pointer_create(id->override_static->reference, &id_refptr); + RNA_id_pointer_create(id->override_library->reference, &id_refptr); if (!RNA_path_resolve(&id_refptr, oprop->rna_path, &src, NULL)) { BLI_assert(0 && "Failed to create matching source (linked data) RNA pointer"); } @@ -566,7 +566,7 @@ static int override_remove_button_exec(bContext *C, wmOperator *op) bool is_strict_find; /* Remove override operation for given item, * add singular operations for the other items as needed. */ - IDOverrideStaticPropertyOperation *opop = BKE_override_static_property_operation_find( + IDOverrideLibraryPropertyOperation *opop = BKE_override_library_property_operation_find( oprop, NULL, NULL, index, index, false, &is_strict_find); BLI_assert(opop != NULL); if (!is_strict_find) { @@ -575,22 +575,22 @@ static int override_remove_button_exec(bContext *C, wmOperator *op) * before removing generic one. */ for (int idx = RNA_property_array_length(&ptr, prop); idx--;) { if (idx != index) { - BKE_override_static_property_operation_get( + BKE_override_library_property_operation_get( oprop, opop->operation, NULL, NULL, idx, idx, true, NULL, NULL); } } } - BKE_override_static_property_operation_delete(oprop, opop); + BKE_override_library_property_operation_delete(oprop, opop); if (!is_template) { RNA_property_copy(bmain, &ptr, &src, prop, index); } if (BLI_listbase_is_empty(&oprop->operations)) { - BKE_override_static_property_delete(id->override_static, oprop); + BKE_override_library_property_delete(id->override_library, oprop); } } else { /* Just remove whole generic override operation of this property. */ - BKE_override_static_property_delete(id->override_static, oprop); + BKE_override_library_property_delete(id->override_library, oprop); if (!is_template) { RNA_property_copy(bmain, &ptr, &src, prop, -1); } 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)); } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index e424d2cc5bf..53bc037c736 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -651,9 +651,9 @@ static bool edit_constraint_poll_generic(bContext *C, StructRNA *rna_type) return 0; } - if (ID_IS_STATIC_OVERRIDE(ob)) { - CTX_wm_operator_poll_msg_set(C, "Cannot edit constraints coming from static override"); - return (((bConstraint *)ptr.data)->flag & CONSTRAINT_STATICOVERRIDE_LOCAL) != 0; + if (ID_IS_OVERRIDE_LIBRARY(ob)) { + CTX_wm_operator_poll_msg_set(C, "Cannot edit constraints coming from library override"); + return (((bConstraint *)ptr.data)->flag & CONSTRAINT_OVERRIDE_LIBRARY_LOCAL) != 0; } return 1; diff --git a/source/blender/editors/object/object_gpencil_modifier.c b/source/blender/editors/object/object_gpencil_modifier.c index 383974270f4..5c4fa5aeee6 100644 --- a/source/blender/editors/object/object_gpencil_modifier.c +++ b/source/blender/editors/object/object_gpencil_modifier.c @@ -402,10 +402,10 @@ static int gpencil_edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, return 0; } - if (ID_IS_STATIC_OVERRIDE(ob)) { - CTX_wm_operator_poll_msg_set(C, "Cannot edit modifiers coming from static override"); - return (((GpencilModifierData *)ptr.data)->flag & eGpencilModifierFlag_StaticOverride_Local) != - 0; + if (ID_IS_OVERRIDE_LIBRARY(ob)) { + CTX_wm_operator_poll_msg_set(C, "Cannot edit modifiers coming from library override"); + return (((GpencilModifierData *)ptr.data)->flag & + eGpencilModifierFlag_OverrideLibrary_Local) != 0; } return 1; diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index d17b6515dbb..b9350052093 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -59,7 +59,7 @@ void OBJECT_OT_vertex_parent_set(struct wmOperatorType *ot); void OBJECT_OT_track_set(struct wmOperatorType *ot); void OBJECT_OT_track_clear(struct wmOperatorType *ot); void OBJECT_OT_make_local(struct wmOperatorType *ot); -void OBJECT_OT_make_override_static(struct wmOperatorType *ot); +void OBJECT_OT_make_override_library(struct wmOperatorType *ot); void OBJECT_OT_make_single_user(struct wmOperatorType *ot); void OBJECT_OT_make_links_scene(struct wmOperatorType *ot); void OBJECT_OT_make_links_data(struct wmOperatorType *ot); diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 42f819b9f42..08012842c37 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -927,9 +927,9 @@ bool edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_fla return 0; } - if (ID_IS_STATIC_OVERRIDE(ob)) { - CTX_wm_operator_poll_msg_set(C, "Cannot edit modifiers coming from static override"); - return (((ModifierData *)ptr.data)->flag & eModifierFlag_StaticOverride_Local) != 0; + if (ID_IS_OVERRIDE_LIBRARY(ob)) { + CTX_wm_operator_poll_msg_set(C, "Cannot edit modifiers coming from library override"); + return (((ModifierData *)ptr.data)->flag & eModifierFlag_OverrideLibrary_Local) != 0; } return 1; diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index afc0297cb01..b653c7fa70c 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -78,7 +78,7 @@ void ED_operatortypes_object(void) WM_operatortype_append(OBJECT_OT_track_set); WM_operatortype_append(OBJECT_OT_track_clear); WM_operatortype_append(OBJECT_OT_make_local); - WM_operatortype_append(OBJECT_OT_make_override_static); + WM_operatortype_append(OBJECT_OT_make_override_library); WM_operatortype_append(OBJECT_OT_make_single_user); WM_operatortype_append(OBJECT_OT_make_links_scene); WM_operatortype_append(OBJECT_OT_make_links_data); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 1446ea23bb8..42b27d1d255 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -405,7 +405,7 @@ static int make_proxy_exec(bContext *C, wmOperator *op) * will depend on order of bases. * * TODO(sergey): We really need to get rid of this bi-directional links - * in proxies with something like static overrides. + * in proxies with something like library overrides. */ newob->proxy->proxy_from = newob; @@ -2320,7 +2320,7 @@ void OBJECT_OT_make_local(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", ""); } -static void make_override_static_tag_object(Object *obact, Object *ob) +static void make_override_library_tag_object(Object *obact, Object *ob) { if (ob == obact) { return; @@ -2354,17 +2354,17 @@ static void make_override_static_tag_object(Object *obact, Object *ob) } } -static void make_override_static_tag_collections(Collection *collection) +static void make_override_library_tag_collections(Collection *collection) { collection->id.tag |= LIB_TAG_DOIT; for (CollectionChild *coll_child = collection->children.first; coll_child != NULL; coll_child = coll_child->next) { - make_override_static_tag_collections(coll_child->collection); + make_override_library_tag_collections(coll_child->collection); } } /* Set the object to override. */ -static int make_override_static_invoke(bContext *C, wmOperator *op, const wmEvent *event) +static int make_override_library_invoke(bContext *C, wmOperator *op, const wmEvent *event) { Scene *scene = CTX_data_scene(C); Object *obact = ED_object_active_context(C); @@ -2400,12 +2400,12 @@ static int make_override_static_invoke(bContext *C, wmOperator *op, const wmEven /* Error.. cannot continue. */ BKE_report(op->reports, RPT_ERROR, - "Can only make static override for a referenced object or collection"); + "Can only make library override for a referenced object or collection"); return OPERATOR_CANCELLED; } } -static int make_override_static_exec(bContext *C, wmOperator *op) +static int make_override_library_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); Object *obact = CTX_data_active_object(C); @@ -2421,10 +2421,10 @@ static int make_override_static_exec(bContext *C, wmOperator *op) Base *base = BLI_findlink(&dup_collection_objects, RNA_enum_get(op->ptr, "object")); obact = base->object; - /* First, we make a static override of the linked collection itself, and all its children. */ - make_override_static_tag_collections(collection); + /* First, we make a library override of the linked collection itself, and all its children. */ + make_override_library_tag_collections(collection); - /* Then, we make static override of the whole set of objects in the Collection. */ + /* Then, we make library override of the whole set of objects in the Collection. */ FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (collection, ob) { ob->id.tag |= LIB_TAG_DOIT; } @@ -2443,7 +2443,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op) } FOREACH_COLLECTION_OBJECT_RECURSIVE_END; - success = BKE_override_static_create_from_tag(bmain); + success = BKE_override_library_create_from_tag(bmain); /* Instantiate our newly overridden objects in scene, if not yet done. */ Scene *scene = CTX_data_scene(C); @@ -2452,7 +2452,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op) BKE_collection_child_add(bmain, scene->master_collection, new_collection); FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (new_collection, new_ob) { - if (new_ob != NULL && new_ob->id.override_static != NULL) { + if (new_ob != NULL && new_ob->id.override_library != NULL) { if ((base = BKE_view_layer_base_find(view_layer, new_ob)) == NULL) { BKE_collection_object_add_from(bmain, scene, obcollection, new_ob); base = BKE_view_layer_base_find(view_layer, new_ob); @@ -2468,10 +2468,10 @@ static int make_override_static_exec(bContext *C, wmOperator *op) } else { /* Disable auto-override tags for non-active objects, will help with performaces... */ - new_ob->id.override_static->flag &= ~STATICOVERRIDE_AUTO; + new_ob->id.override_library->flag &= ~OVERRIDE_LIBRARY_AUTO; } /* We still want to store all objects' current override status (i.e. change of parent). */ - BKE_override_static_operations_create(bmain, &new_ob->id, true); + BKE_override_library_operations_create(bmain, &new_ob->id, true); } } FOREACH_COLLECTION_OBJECT_RECURSIVE_END; @@ -2496,10 +2496,10 @@ static int make_override_static_exec(bContext *C, wmOperator *op) obact->id.tag |= LIB_TAG_DOIT; for (Object *ob = bmain->objects.first; ob != NULL; ob = ob->id.next) { - make_override_static_tag_object(obact, ob); + make_override_library_tag_object(obact, ob); } - success = BKE_override_static_create_from_tag(bmain); + success = BKE_override_library_create_from_tag(bmain); /* Also, we'd likely want to lock by default things like * transformations of implicitly overridden objects? */ @@ -2510,7 +2510,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op) } /* TODO: probably more cases where we want to do automated smart things in the future! */ else { - success = (BKE_override_static_create_from_id(bmain, &obact->id) != NULL); + success = (BKE_override_library_create_from_id(bmain, &obact->id) != NULL); } WM_event_add_notifier(C, NC_WINDOW, NULL); @@ -2518,28 +2518,28 @@ static int make_override_static_exec(bContext *C, wmOperator *op) return success ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } -static bool make_override_static_poll(bContext *C) +static bool make_override_library_poll(bContext *C) { Object *obact = CTX_data_active_object(C); /* Object must be directly linked to be overridable. */ - return (BKE_override_static_is_enabled() && ED_operator_objectmode(C) && obact != NULL && + return (BKE_override_library_is_enabled() && ED_operator_objectmode(C) && obact != NULL && ((ID_IS_LINKED(obact) && obact->id.tag & LIB_TAG_EXTERN) || (!ID_IS_LINKED(obact) && obact->instance_collection != NULL && ID_IS_LINKED(obact->instance_collection)))); } -void OBJECT_OT_make_override_static(wmOperatorType *ot) +void OBJECT_OT_make_override_library(wmOperatorType *ot) { /* identifiers */ - ot->name = "Make Static Override"; - ot->description = "Make local override of this library linked data-block"; - ot->idname = "OBJECT_OT_make_override_static"; + ot->name = "Make Library Override"; + ot->description = "Make a local override of this library linked data-block"; + ot->idname = "OBJECT_OT_make_override_library"; /* api callbacks */ - ot->invoke = make_override_static_invoke; - ot->exec = make_override_static_exec; - ot->poll = make_override_static_poll; + ot->invoke = make_override_library_invoke; + ot->exec = make_override_library_exec; + ot->poll = make_override_library_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; diff --git a/source/blender/editors/object/object_shader_fx.c b/source/blender/editors/object/object_shader_fx.c index f4f944459f7..6212269c099 100644 --- a/source/blender/editors/object/object_shader_fx.c +++ b/source/blender/editors/object/object_shader_fx.c @@ -310,9 +310,9 @@ static bool edit_shaderfx_poll_generic(bContext *C, StructRNA *rna_type, int obt return 0; } - if (ID_IS_STATIC_OVERRIDE(ob)) { - CTX_wm_operator_poll_msg_set(C, "Cannot edit shaderfxs coming from static override"); - return (((ShaderFxData *)ptr.data)->flag & eShaderFxFlag_StaticOverride_Local) != 0; + if (ID_IS_OVERRIDE_LIBRARY(ob)) { + CTX_wm_operator_poll_msg_set(C, "Cannot edit shaderfxs coming from library override"); + return (((ShaderFxData *)ptr.data)->flag & eShaderFxFlag_OverrideLibrary_Local) != 0; } return 1; diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 4485475d658..923e4a85d50 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -2904,7 +2904,7 @@ static void outliner_draw_tree_element(bContext *C, } offsx += UI_UNIT_X + 4 * ufac; } - else if (ELEM(tselem->type, 0, TSE_LAYER_COLLECTION) && ID_IS_STATIC_OVERRIDE(tselem->id)) { + else if (ELEM(tselem->type, 0, TSE_LAYER_COLLECTION) && ID_IS_OVERRIDE_LIBRARY(tselem->id)) { UI_icon_draw_alpha((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_OVERRIDE, diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 7e5638e48ea..d8057a0ea28 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -557,17 +557,17 @@ static void id_local_cb(bContext *C, } } -static void id_static_override_cb(bContext *C, - ReportList *UNUSED(reports), - Scene *UNUSED(scene), - TreeElement *UNUSED(te), - TreeStoreElem *UNUSED(tsep), - TreeStoreElem *tselem, - void *UNUSED(user_data)) +static void id_override_library_cb(bContext *C, + ReportList *UNUSED(reports), + Scene *UNUSED(scene), + TreeElement *UNUSED(te), + TreeStoreElem *UNUSED(tsep), + TreeStoreElem *tselem, + void *UNUSED(user_data)) { if (ID_IS_LINKED(tselem->id) && (tselem->id->tag & LIB_TAG_EXTERN)) { Main *bmain = CTX_data_main(C); - ID *override_id = BKE_override_static_create_from_id(bmain, tselem->id); + ID *override_id = BKE_override_library_create_from_id(bmain, tselem->id); if (override_id != NULL) { BKE_main_id_clear_newpoins(bmain); } @@ -1337,7 +1337,7 @@ typedef enum eOutlinerIdOpTypes { OUTLINER_IDOP_UNLINK, OUTLINER_IDOP_LOCAL, - OUTLINER_IDOP_STATIC_OVERRIDE, + OUTLINER_IDOP_OVERRIDE_LIBRARY, OUTLINER_IDOP_SINGLE, OUTLINER_IDOP_DELETE, OUTLINER_IDOP_REMAP, @@ -1356,11 +1356,11 @@ typedef enum eOutlinerIdOpTypes { static const EnumPropertyItem prop_id_op_types[] = { {OUTLINER_IDOP_UNLINK, "UNLINK", 0, "Unlink", ""}, {OUTLINER_IDOP_LOCAL, "LOCAL", 0, "Make Local", ""}, - {OUTLINER_IDOP_STATIC_OVERRIDE, - "STATIC_OVERRIDE", + {OUTLINER_IDOP_OVERRIDE_LIBRARY, + "OVERRIDE_LIBRARY", 0, - "Add Static Override", - "Add a local static override of this data-block"}, + "Add Library Override", + "Add a local override of this linked data-block"}, {OUTLINER_IDOP_SINGLE, "SINGLE", 0, "Make Single User", ""}, {OUTLINER_IDOP_DELETE, "DELETE", ICON_X, "Delete", ""}, {OUTLINER_IDOP_REMAP, @@ -1389,7 +1389,7 @@ static const EnumPropertyItem *outliner_id_operation_itemf(bContext *UNUSED(C), PropertyRNA *UNUSED(prop), bool *r_free) { - if (BKE_override_static_is_enabled()) { + if (BKE_override_library_is_enabled()) { *r_free = false; return prop_id_op_types; } @@ -1398,7 +1398,7 @@ static const EnumPropertyItem *outliner_id_operation_itemf(bContext *UNUSED(C), int totitem = 0; for (const EnumPropertyItem *it = prop_id_op_types; it->identifier != NULL; it++) { - if (it->value == OUTLINER_IDOP_STATIC_OVERRIDE) { + if (it->value == OUTLINER_IDOP_OVERRIDE_LIBRARY) { continue; } RNA_enum_item_add(&items, &totitem, it); @@ -1485,11 +1485,11 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) ED_undo_push(C, "Localized Data"); break; } - case OUTLINER_IDOP_STATIC_OVERRIDE: { - if (BKE_override_static_is_enabled()) { + case OUTLINER_IDOP_OVERRIDE_LIBRARY: { + if (BKE_override_library_is_enabled()) { /* make local */ outliner_do_libdata_operation( - C, op->reports, scene, soops, &soops->tree, id_static_override_cb, NULL); + C, op->reports, scene, soops, &soops->tree, id_override_library_cb, NULL); ED_undo_push(C, "Overridden Data"); } break; |