[Bf-blender-cvs] [05ef2252723] blender2.8: Cleanup: rename 'static override regarding reference ID' tag.

Bastien Montagne noreply at git.blender.org
Wed Apr 18 10:45:56 CEST 2018


Commit: 05ef225272366f754a56ef5bfe63405f6af01729
Author: Bastien Montagne
Date:   Wed Apr 18 10:44:38 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB05ef225272366f754a56ef5bfe63405f6af01729

Cleanup: rename 'static override regarding reference ID' tag.

Just 'OK' was waaayyyyyy too generic!

===================================================================

M	source/blender/blenkernel/intern/library_override.c
M	source/blender/makesdna/DNA_ID.h

===================================================================

diff --git a/source/blender/blenkernel/intern/library_override.c b/source/blender/blenkernel/intern/library_override.c
index 8b8658921b5..17cabc247ae 100644
--- a/source/blender/blenkernel/intern/library_override.c
+++ b/source/blender/blenkernel/intern/library_override.c
@@ -86,7 +86,7 @@ IDOverrideStatic *BKE_override_static_init(ID *local_id, ID *reference_id)
 	local_id->override_static = MEM_callocN(sizeof(*local_id->override_static), __func__);
 	local_id->override_static->reference = reference_id;
 	id_us_plus(local_id->override_static->reference);
-	local_id->tag &= ~LIB_TAG_OVERRIDESTATIC_OK;
+	local_id->tag &= ~LIB_TAG_OVERRIDESTATIC_REFOK;
 	/* TODO do we want to add tag or flag to referee to mark it as such? */
 	return local_id->override_static;
 }
@@ -125,7 +125,7 @@ void BKE_override_static_copy(ID *dst_id, const ID *src_id)
 		bke_override_property_copy(op_dst, op_src);
 	}
 
-	dst_id->tag &= ~LIB_TAG_OVERRIDESTATIC_OK;
+	dst_id->tag &= ~LIB_TAG_OVERRIDESTATIC_REFOK;
 }
 
 /** Clear any overriding data from given \a override. */
@@ -445,7 +445,7 @@ bool BKE_override_static_status_check_local(ID *local)
 	        &rnaptr_local, &rnaptr_reference, NULL, local->override_static,
 	        RNA_OVERRIDE_COMPARE_IGNORE_NON_OVERRIDABLE | RNA_OVERRIDE_COMPARE_IGNORE_OVERRIDDEN, NULL))
 	{
-		local->tag &= ~LIB_TAG_OVERRIDESTATIC_OK;
+		local->tag &= ~LIB_TAG_OVERRIDESTATIC_REFOK;
 		return false;
 	}
 
@@ -474,12 +474,12 @@ bool BKE_override_static_status_check_reference(ID *local)
 
 	BLI_assert(GS(local->name) == GS(reference->name));
 
-	if (reference->override_static && (reference->tag & LIB_TAG_OVERRIDESTATIC_OK) == 0) {
+	if (reference->override_static && (reference->tag & LIB_TAG_OVERRIDESTATIC_REFOK) == 0) {
 		if (!BKE_override_static_status_check_reference(reference)) {
 			/* If reference is also override of another data-block, and its status is not OK,
 			 * then this override is not OK either.
 			 * Note that this should only happen when reloading libraries... */
-			local->tag &= ~LIB_TAG_OVERRIDESTATIC_OK;
+			local->tag &= ~LIB_TAG_OVERRIDESTATIC_REFOK;
 			return false;
 		}
 	}
@@ -492,7 +492,7 @@ bool BKE_override_static_status_check_reference(ID *local)
 	        &rnaptr_local, &rnaptr_reference, NULL, local->override_static,
 	        RNA_OVERRIDE_COMPARE_IGNORE_OVERRIDDEN, NULL))
 	{
-		local->tag &= ~LIB_TAG_OVERRIDESTATIC_OK;
+		local->tag &= ~LIB_TAG_OVERRIDESTATIC_REFOK;
 		return false;
 	}
 
@@ -573,7 +573,7 @@ void BKE_override_static_update(Main *bmain, ID *local)
 	}
 
 	/* Recursively do 'ancestors' overrides first, if any. */
-	if (local->override_static->reference->override_static && (local->override_static->reference->tag & LIB_TAG_OVERRIDESTATIC_OK) == 0) {
+	if (local->override_static->reference->override_static && (local->override_static->reference->tag & LIB_TAG_OVERRIDESTATIC_REFOK) == 0) {
 		BKE_override_static_update(bmain, local->override_static->reference);
 	}
 
@@ -624,7 +624,7 @@ void BKE_override_static_update(Main *bmain, ID *local)
 		local->override_static->storage = NULL;
 	}
 
-	local->tag |= LIB_TAG_OVERRIDESTATIC_OK;
+	local->tag |= LIB_TAG_OVERRIDESTATIC_REFOK;
 
 	/* Full rebuild of Depsgraph! */
 	DEG_on_visible_update(bmain, true);  /* XXX Is this actual valid replacement for old DAG_relations_tag_update(bmain) ? */
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index edab09351ee..d53f290e606 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -435,7 +435,7 @@ enum {
 	LIB_TAG_MISSING         = 1 << 6,
 
 	/* RESET_NEVER tag datablock as being up-to-date regarding its reference. */
-	LIB_TAG_OVERRIDESTATIC_OK = 1 << 9,
+	LIB_TAG_OVERRIDESTATIC_REFOK = 1 << 9,
 
 	/* tag datablock has having an extra user. */
 	LIB_TAG_EXTRAUSER       = 1 << 2,



More information about the Bf-blender-cvs mailing list