Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-06-15 00:16:04 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-06-15 00:21:12 +0300
commit23254ce4ee6b21b202549b421cf1d98f6a03b33d (patch)
tree77ebd72c7f1cd2776e058f04b5e6e49f14a327ec /source/blender/editors/object
parentf64070185808f153d141b26e63942424a1b258b1 (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/object')
-rw-r--r--source/blender/editors/object/object_constraint.c6
-rw-r--r--source/blender/editors/object/object_gpencil_modifier.c8
-rw-r--r--source/blender/editors/object/object_intern.h2
-rw-r--r--source/blender/editors/object/object_modifier.c6
-rw-r--r--source/blender/editors/object/object_ops.c2
-rw-r--r--source/blender/editors/object/object_relations.c52
-rw-r--r--source/blender/editors/object/object_shader_fx.c6
7 files changed, 41 insertions, 41 deletions
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;