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>2018-06-29 13:46:54 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-29 13:48:12 +0300
commit2223d63c58c9a2125fb4a2e6ee1c780c781a95bb (patch)
tree42b820b7ffd2ebe4f71a51d6e05b73c1cc13fdd7 /source/blender/makesrna
parent3733be8731df978ec50cd283ff24b813bdd89df1 (diff)
Refactor static override code to pass Main around.
Access to main database is actually rarely needed, but some custom 'apply' functions do need it (like Collections' overriding of objects or children collections).
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h13
-rw-r--r--source/blender/makesrna/intern/rna_access.c40
-rw-r--r--source/blender/makesrna/intern/rna_animation.c1
-rw-r--r--source/blender/makesrna/intern/rna_group.c6
-rw-r--r--source/blender/makesrna/intern/rna_internal.h4
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
-rw-r--r--source/blender/makesrna/intern/rna_pose.c1
-rw-r--r--source/blender/makesrna/intern/rna_rna.c18
9 files changed, 69 insertions, 19 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 4ec6107d676..a135e716770 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -977,7 +977,7 @@ void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop);
bool RNA_property_collection_move(PointerRNA *ptr, PropertyRNA *prop, int key, int pos);
/* copy/reset */
-bool RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index);
+bool RNA_property_copy(struct Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index);
bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index);
/* Path
@@ -1251,8 +1251,12 @@ typedef enum eRNACompareMode {
RNA_EQ_COMPARE,
} eRNACompareMode;
-bool RNA_property_equals(struct PointerRNA *ptr_a, struct PointerRNA *ptr_b, struct PropertyRNA *prop, eRNACompareMode mode);
-bool RNA_struct_equals(struct PointerRNA *ptr_a, struct PointerRNA *ptr_b, eRNACompareMode mode);
+bool RNA_property_equals(
+ struct Main *bmain,
+ struct PointerRNA *ptr_a, struct PointerRNA *ptr_b, struct PropertyRNA *prop, eRNACompareMode mode);
+bool RNA_struct_equals(
+ struct Main *bmain,
+ struct PointerRNA *ptr_a, struct PointerRNA *ptr_b, eRNACompareMode mode);
/* Override. */
@@ -1284,15 +1288,18 @@ typedef enum eRNAOverrideStatus {
} eRNAOverrideStatus;
bool RNA_struct_override_matches(
+ struct Main *bmain,
struct PointerRNA *ptr_local, struct PointerRNA *ptr_reference, const char *root_path,
struct IDOverrideStatic *override, const eRNAOverrideMatch flags,
eRNAOverrideMatchResult *r_report_flags);
bool RNA_struct_override_store(
+ struct Main *bmain,
struct PointerRNA *ptr_local, struct PointerRNA *ptr_reference, PointerRNA *ptr_storage,
struct IDOverrideStatic *override);
void RNA_struct_override_apply(
+ struct Main *bmain,
struct PointerRNA *ptr_local, struct PointerRNA *ptr_override, struct PointerRNA *ptr_storage,
struct IDOverrideStatic *override);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 3cae03d466c..9b231f4aa5e 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -7198,12 +7198,13 @@ bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
}
static bool rna_property_override_operation_apply(
+ Main *bmain,
PointerRNA *ptr_local, PointerRNA *ptr_override, PointerRNA *ptr_storage,
PropertyRNA *prop_local, PropertyRNA *prop_override, PropertyRNA *prop_storage,
PointerRNA *ptr_item_local, PointerRNA *ptr_item_override, PointerRNA *ptr_item_storage,
IDOverrideStaticPropertyOperation *opop);
-bool RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index)
+bool RNA_property_copy(Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index)
{
if (!RNA_property_editable(ptr, prop)) {
return false;
@@ -7239,6 +7240,7 @@ bool RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop,
.subitem_local_index = index
};
return rna_property_override_operation_apply(
+ bmain,
ptr, fromptr, NULL,
prop_dst, prop_src, NULL,
NULL, NULL, NULL,
@@ -7268,17 +7270,18 @@ void _RNA_warning(const char *format, ...)
}
static int rna_property_override_diff(
+ Main *bmain,
PointerRNA *ptr_a, PointerRNA *ptr_b, PropertyRNA *prop, PropertyRNA *prop_a, PropertyRNA *prop_b, const char *rna_path,
eRNACompareMode mode, IDOverrideStatic *override, const int flags, eRNAOverrideMatchResult *r_report_flags);
-bool RNA_property_equals(PointerRNA *ptr_a, PointerRNA *ptr_b, PropertyRNA *prop, eRNACompareMode mode)
+bool RNA_property_equals(Main *bmain, PointerRNA *ptr_a, PointerRNA *ptr_b, PropertyRNA *prop, eRNACompareMode mode)
{
BLI_assert(ELEM(mode, RNA_EQ_STRICT, RNA_EQ_UNSET_MATCH_ANY, RNA_EQ_UNSET_MATCH_NONE));
- return (rna_property_override_diff(ptr_a, ptr_b, prop, NULL, NULL, NULL, mode, NULL, 0, NULL) == 0);
+ return (rna_property_override_diff(bmain, ptr_a, ptr_b, prop, NULL, NULL, NULL, mode, NULL, 0, NULL) == 0);
}
-bool RNA_struct_equals(PointerRNA *ptr_a, PointerRNA *ptr_b, eRNACompareMode mode)
+bool RNA_struct_equals(Main *bmain, PointerRNA *ptr_a, PointerRNA *ptr_b, eRNACompareMode mode)
{
CollectionPropertyIterator iter;
PropertyRNA *iterprop;
@@ -7297,7 +7300,7 @@ bool RNA_struct_equals(PointerRNA *ptr_a, PointerRNA *ptr_b, eRNACompareMode mod
for (; iter.valid; RNA_property_collection_next(&iter)) {
PropertyRNA *prop = iter.ptr.data;
- if (!RNA_property_equals(ptr_a, ptr_b, prop, mode)) {
+ if (!RNA_property_equals(bmain, ptr_a, ptr_b, prop, mode)) {
equals = false;
break;
}
@@ -7320,6 +7323,7 @@ bool RNA_struct_equals(PointerRNA *ptr_a, PointerRNA *ptr_b, eRNACompareMode mod
* \note When there is no equality, but we cannot determine an order (greater than/lesser than), we return 1.
*/
static int rna_property_override_diff(
+ Main *bmain,
PointerRNA *ptr_a, PointerRNA *ptr_b, PropertyRNA *prop, PropertyRNA *prop_a, PropertyRNA *prop_b,
const char *rna_path, eRNACompareMode mode,
IDOverrideStatic *override, const int flags, eRNAOverrideMatchResult *r_report_flags)
@@ -7419,6 +7423,7 @@ static int rna_property_override_diff(
diff_flags &= ~RNA_OVERRIDE_COMPARE_CREATE;
}
const int diff = override_diff(
+ bmain,
ptr_a, ptr_b, prop_a, prop_b, len_a, len_b,
mode, override, rna_path, diff_flags, &override_changed);
if (override_changed && r_report_flags) {
@@ -7431,6 +7436,7 @@ static int rna_property_override_diff(
/* Modify local data-block to make it ready for override application (only needed for diff operations, where we use
* the local data-block's data as second operand). */
static bool rna_property_override_operation_store(
+ Main *bmain,
PointerRNA *ptr_local, PointerRNA *ptr_reference, PointerRNA *ptr_storage,
PropertyRNA *prop_local, PropertyRNA *prop_reference, PropertyRNA *prop_storage,
IDOverrideStaticProperty *op)
@@ -7465,8 +7471,11 @@ static bool rna_property_override_operation_store(
}
if (prop_local->override_store(
- ptr_local, ptr_reference, ptr_storage, prop_local, prop_reference, prop_storage,
- len_local, len_reference, len_storage, opop))
+ bmain,
+ ptr_local, ptr_reference, ptr_storage,
+ prop_local, prop_reference, prop_storage,
+ len_local, len_reference, len_storage,
+ opop))
{
changed = true;
}
@@ -7476,6 +7485,7 @@ static bool rna_property_override_operation_store(
}
static bool rna_property_override_operation_apply(
+ Main *bmain,
PointerRNA *ptr_local, PointerRNA *ptr_override, PointerRNA *ptr_storage,
PropertyRNA *prop_local, PropertyRNA *prop_override, PropertyRNA *prop_storage,
PointerRNA *ptr_item_local, PointerRNA *ptr_item_override, PointerRNA *ptr_item_storage,
@@ -7547,6 +7557,7 @@ static bool rna_property_override_operation_apply(
/* get and set the default values as appropriate for the various types */
return override_apply(
+ bmain,
ptr_local, ptr_override, ptr_storage,
prop_local, prop_override, prop_storage,
len_local, len_reference, len_storage,
@@ -7564,6 +7575,7 @@ static bool rna_property_override_operation_apply(
* \return True if _resulting_ \a ptr_local does match \a ptr_reference.
*/
bool RNA_struct_override_matches(
+ Main *bmain,
PointerRNA *ptr_local, PointerRNA *ptr_reference, const char *root_path,
IDOverrideStatic *override, const eRNAOverrideMatch flags,
eRNAOverrideMatchResult *r_report_flags)
@@ -7668,6 +7680,7 @@ bool RNA_struct_override_matches(
eRNAOverrideMatchResult report_flags = 0;
const int diff = rna_property_override_diff(
+ bmain,
ptr_local, ptr_reference, NULL, prop_local, prop_reference, rna_path,
RNA_EQ_STRICT, override, flags, &report_flags);
@@ -7700,6 +7713,7 @@ bool RNA_struct_override_matches(
.subitem_local_index = -1
};
rna_property_override_operation_apply(
+ bmain,
ptr_local, ptr_reference, NULL,
prop_local, prop_reference, NULL,
NULL, NULL, NULL,
@@ -7757,6 +7771,7 @@ bool RNA_struct_override_matches(
/** Store needed second operands into \a storage data-block for differential override operations. */
bool RNA_struct_override_store(
+ Main *bmain,
PointerRNA *ptr_local, PointerRNA *ptr_reference, PointerRNA *ptr_storage, IDOverrideStatic *override)
{
bool changed = false;
@@ -7780,8 +7795,11 @@ bool RNA_struct_override_store(
RNA_path_resolve_property(ptr_storage, op->rna_path, &data_storage, &prop_storage);
}
- if (rna_property_override_operation_store(&data_local, &data_reference, &data_storage,
- prop_reference, prop_local, prop_storage, op))
+ if (rna_property_override_operation_store(
+ bmain,
+ &data_local, &data_reference, &data_storage,
+ prop_reference, prop_local, prop_storage,
+ op))
{
changed = true;
}
@@ -7795,6 +7813,7 @@ bool RNA_struct_override_store(
}
static void rna_property_override_apply_ex(
+ Main *bmain,
PointerRNA *ptr_local, PointerRNA *ptr_override, PointerRNA *ptr_storage,
PropertyRNA *prop_local, PropertyRNA *prop_override, PropertyRNA *prop_storage,
PointerRNA *ptr_item_local, PointerRNA *ptr_item_override, PointerRNA *ptr_item_storage,
@@ -7808,6 +7827,7 @@ static void rna_property_override_apply_ex(
continue;
}
if (!rna_property_override_operation_apply(
+ bmain,
ptr_local, ptr_override, ptr_storage,
prop_local, prop_override, prop_storage,
ptr_item_local, ptr_item_override, ptr_item_storage,
@@ -7823,6 +7843,7 @@ static void rna_property_override_apply_ex(
/** Apply given \a override operations on \a ptr_local, using \a ptr_override
* (and \a ptr_storage form differential ops) as source. */
void RNA_struct_override_apply(
+ Main *bmain,
PointerRNA *ptr_local, PointerRNA *ptr_override, PointerRNA *ptr_storage, IDOverrideStatic *override)
{
#ifdef DEBUG_OVERRIDE_TIMEIT
@@ -7854,6 +7875,7 @@ void RNA_struct_override_apply(
}
rna_property_override_apply_ex(
+ bmain,
&data_local, &data_override, prop_storage ? &data_storage : NULL,
prop_local, prop_override, prop_storage,
&data_item_local, &data_item_override, prop_storage ? &data_item_storage : NULL,
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 1aee30cd94b..7b14c6960b5 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -586,6 +586,7 @@ static FCurve *rna_Driver_find(AnimData *adt, ReportList *reports, const char *d
}
bool rna_AnimaData_override_apply(
+ Main *UNUSED(bmain),
PointerRNA *ptr_dst, PointerRNA *ptr_src, PointerRNA *ptr_storage,
PropertyRNA *prop_dst, PropertyRNA *prop_src, PropertyRNA *UNUSED(prop_storage),
const int len_dst, const int len_src, const int len_storage,
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index ff3900705e4..b3afba36a9f 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -109,6 +109,7 @@ static void rna_Collection_objects_unlink(Collection *collection, Main *bmain, R
}
static bool rna_Collection_objects_override_apply(
+ Main *bmain,
PointerRNA *ptr_dst, PointerRNA *UNUSED(ptr_src), PointerRNA *UNUSED(ptr_storage),
PropertyRNA *UNUSED(prop_dst), PropertyRNA *UNUSED(prop_src), PropertyRNA *UNUSED(prop_storage),
const int UNUSED(len_dst), const int UNUSED(len_src), const int UNUSED(len_storage),
@@ -142,7 +143,7 @@ static bool rna_Collection_objects_override_apply(
id_us_plus(&cob_dst->ob->id);
if (BKE_collection_is_in_scene(coll_dst)) {
- BKE_main_collection_sync(G.main); /* YUCK!!!!!!!!!!!!! */
+ BKE_main_collection_sync(bmain);
}
return true;
@@ -191,6 +192,7 @@ static void rna_Collection_children_unlink(Collection *collection, Main *bmain,
}
static bool rna_Collection_children_override_apply(
+ Main *bmain,
PointerRNA *ptr_dst, PointerRNA *UNUSED(ptr_src), PointerRNA *UNUSED(ptr_storage),
PropertyRNA *UNUSED(prop_dst), PropertyRNA *UNUSED(prop_src), PropertyRNA *UNUSED(prop_storage),
const int UNUSED(len_dst), const int UNUSED(len_src), const int UNUSED(len_storage),
@@ -224,7 +226,7 @@ static bool rna_Collection_children_override_apply(
id_us_plus(&collchild_dst->collection->id);
BKE_collection_object_cache_free(coll_dst);
- BKE_main_collection_sync(G.main); /* YUCK!!!!!!!!!!!!! */
+ BKE_main_collection_sync(bmain);
return true;
}
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 012a24cb572..5ab1297f43c 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -205,6 +205,7 @@ void RNA_def_mask(struct BlenderRNA *brna);
void rna_def_animdata_common(struct StructRNA *srna);
bool rna_AnimaData_override_apply(
+ struct Main *bmain,
struct PointerRNA *ptr_local, struct PointerRNA *ptr_reference, struct PointerRNA *ptr_storage,
struct PropertyRNA *prop_local, struct PropertyRNA *prop_reference, struct PropertyRNA *prop_storage,
const int len_local, const int len_reference, const int len_storage,
@@ -411,6 +412,7 @@ struct PropertyRNA *rna_ensure_property_realdata(struct PropertyRNA **prop, stru
* Not obvious though, those are fairly more complicated than basic SDNA access.
*/
int rna_property_override_diff_default(
+ struct Main *bmain,
struct PointerRNA *ptr_a, struct PointerRNA *ptr_b,
struct PropertyRNA *prop_a, struct PropertyRNA *prop_b,
const int len_a, const int len_b,
@@ -419,12 +421,14 @@ int rna_property_override_diff_default(
const int flags, bool *r_override_changed);
bool rna_property_override_store_default(
+ struct Main *bmain,
struct PointerRNA *ptr_local, struct PointerRNA *ptr_reference, struct PointerRNA *ptr_storage,
struct PropertyRNA *prop_local, struct PropertyRNA *prop_reference, struct PropertyRNA *prop_storage,
const int len_local, const int len_reference, const int len_storage,
struct IDOverrideStaticPropertyOperation *opop);
bool rna_property_override_apply_default(
+ struct Main *bmain,
struct PointerRNA *ptr_dst, struct PointerRNA *ptr_src, struct PointerRNA *ptr_storage,
struct PropertyRNA *prop_dst, struct PropertyRNA *prop_src, struct PropertyRNA *prop_storage,
const int len_dst, const int len_src, const int len_storage,
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 83d83826341..fcca0c0a3ab 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -133,6 +133,7 @@ typedef void (*PropEnumSetFuncEx)(struct PointerRNA *ptr, struct PropertyRNA *pr
* \note \a override, \a rna_path and \a r_override_changed may be NULL pointers.
*/
typedef int (*RNAPropOverrideDiff)(
+ struct Main *bmain,
struct PointerRNA *ptr_a, struct PointerRNA *ptr_b,
struct PropertyRNA *prop_a, struct PropertyRNA *prop_b,
const int len_a, const int len_b,
@@ -150,6 +151,7 @@ typedef int (*RNAPropOverrideDiff)(
* is out of range (or even change it to basic 'set' operation if nothing else works).
*/
typedef bool (*RNAPropOverrideStore)(
+ struct Main *bmain,
struct PointerRNA *ptr_local, struct PointerRNA *ptr_reference, struct PointerRNA *ptr_storage,
struct PropertyRNA *prop_local, struct PropertyRNA *prop_reference, struct PropertyRNA *prop_storage,
const int len_local, const int len_reference, const int len_storage,
@@ -163,6 +165,7 @@ typedef bool (*RNAPropOverrideStore)(
* \note In non-array cases, \a len values are 0.
*/
typedef bool (*RNAPropOverrideApply)(
+ struct Main *bmain,
struct PointerRNA *ptr_dst, struct PointerRNA *ptr_src, struct PointerRNA *ptr_storage,
struct PropertyRNA *prop_dst, struct PropertyRNA *prop_src, struct PropertyRNA *prop_storage,
const int len_dst, const int len_src, const int len_storage,
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 204a2c28746..e75a03edac1 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1147,6 +1147,7 @@ static void rna_Object_constraints_clear(Object *object, Main *bmain)
}
bool rna_Object_constraints_override_apply(
+ Main *UNUSED(bmain),
PointerRNA *ptr_dst, PointerRNA *ptr_src, PointerRNA *UNUSED(ptr_storage),
PropertyRNA *UNUSED(prop_dst), PropertyRNA *UNUSED(prop_src), PropertyRNA *UNUSED(prop_storage),
const int UNUSED(len_dst), const int UNUSED(len_src), const int UNUSED(len_storage),
@@ -1222,6 +1223,7 @@ static void rna_Object_modifier_clear(Object *object, bContext *C)
}
bool rna_Object_modifiers_override_apply(
+ Main *UNUSED(bmain),
PointerRNA *ptr_dst, PointerRNA *ptr_src, PointerRNA *UNUSED(ptr_storage),
PropertyRNA *UNUSED(prop_dst), PropertyRNA *UNUSED(prop_src), PropertyRNA *UNUSED(prop_storage),
const int UNUSED(len_dst), const int UNUSED(len_src), const int UNUSED(len_storage),
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 5152480255a..05eb2117990 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -570,6 +570,7 @@ static void rna_PoseChannel_constraints_remove(
}
bool rna_PoseChannel_constraints_override_apply(
+ Main *UNUSED(bmain),
PointerRNA *ptr_dst, PointerRNA *ptr_src, PointerRNA *UNUSED(ptr_storage),
PropertyRNA *UNUSED(prop_dst), PropertyRNA *UNUSED(prop_src), PropertyRNA *UNUSED(prop_storage),
const int UNUSED(len_dst), const int UNUSED(len_src), const int UNUSED(len_storage),
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 2777f87d0d2..0d3fe1bac33 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -1222,6 +1222,7 @@ static bool rna_property_override_diff_propptr_validate_diffing(
/* Used for both Pointer and Collection properties. */
static int rna_property_override_diff_propptr(
+ Main *bmain,
PointerRNA *propptr_a, PointerRNA *propptr_b,
eRNACompareMode mode, const bool no_ownership, const bool no_prop_name,
IDOverrideStatic *override, const char *rna_path, const int flags, bool *r_override_changed)
@@ -1264,7 +1265,8 @@ static int rna_property_override_diff_propptr(
}
else {
eRNAOverrideMatchResult report_flags = 0;
- const bool match = RNA_struct_override_matches(propptr_a, propptr_b, rna_path, override, flags, &report_flags);
+ const bool match = RNA_struct_override_matches(
+ bmain, propptr_a, propptr_b, rna_path, override, flags, &report_flags);
if (r_override_changed && (report_flags & RNA_OVERRIDE_MATCH_RESULT_CREATED) != 0) {
*r_override_changed = true;
}
@@ -1274,7 +1276,7 @@ static int rna_property_override_diff_propptr(
else {
/* We could also use is_diff_pointer, but then we potentially lose the gt/lt info -
* and don't think performances are critical here for now anyway... */
- return !RNA_struct_equals(propptr_a, propptr_b, mode);
+ return !RNA_struct_equals(bmain, propptr_a, propptr_b, mode);
}
}
@@ -1287,7 +1289,9 @@ static int rna_property_override_diff_propptr(
(is_array ? RNA_property_##_typename##_set_index((_ptr), (_prop), (_index), (_value)) : \
RNA_property_##_typename##_set((_ptr), (_prop), (_value)))
-int rna_property_override_diff_default(PointerRNA *ptr_a, PointerRNA *ptr_b,
+int rna_property_override_diff_default(
+ Main *bmain,
+ PointerRNA *ptr_a, PointerRNA *ptr_b,
PropertyRNA *prop_a, PropertyRNA *prop_b,
const int len_a, const int len_b,
const int mode,
@@ -1541,6 +1545,7 @@ int rna_property_override_diff_default(PointerRNA *ptr_a, PointerRNA *ptr_b,
const bool no_ownership = (RNA_property_flag(prop_a) & PROP_PTR_NO_OWNERSHIP) != 0;
const bool no_prop_name = (RNA_property_override_flag(prop_a) & PROPOVERRIDE_NO_PROP_NAME) != 0;
return rna_property_override_diff_propptr(
+ bmain,
&propptr_a, &propptr_b, mode, no_ownership, no_prop_name,
override, rna_path, flags, r_override_changed);
}
@@ -1691,8 +1696,9 @@ int rna_property_override_diff_default(PointerRNA *ptr_a, PointerRNA *ptr_b,
if (equals || do_create) {
const bool no_ownership = (RNA_property_flag(prop_a) & PROP_PTR_NO_OWNERSHIP) != 0;
const int eq = rna_property_override_diff_propptr(
- &iter_a.ptr, &iter_b.ptr, mode, no_ownership, no_prop_name,
- override, extended_rna_path, flags, r_override_changed);
+ bmain,
+ &iter_a.ptr, &iter_b.ptr, mode, no_ownership, no_prop_name,
+ override, extended_rna_path, flags, r_override_changed);
equals = equals && eq;
}
}
@@ -1763,6 +1769,7 @@ int rna_property_override_diff_default(PointerRNA *ptr_a, PointerRNA *ptr_b,
}
bool rna_property_override_store_default(
+ Main *UNUSED(bmain),
PointerRNA *ptr_local, PointerRNA *ptr_reference, PointerRNA *ptr_storage,
PropertyRNA *prop_local, PropertyRNA *prop_reference, PropertyRNA *prop_storage,
const int len_local, const int len_reference, const int len_storage,
@@ -2006,6 +2013,7 @@ bool rna_property_override_store_default(
}
bool rna_property_override_apply_default(
+ Main *UNUSED(bmain),
PointerRNA *ptr_dst, PointerRNA *ptr_src, PointerRNA *ptr_storage,
PropertyRNA *prop_dst, PropertyRNA *prop_src, PropertyRNA *prop_storage,
const int len_dst, const int len_src, const int len_storage,