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 <bastien@blender.org>2020-07-10 16:23:52 +0300
committerBastien Montagne <bastien@blender.org>2020-07-10 16:23:52 +0300
commitf93e0f1a9eefb162cf9432240b101a5d9c372910 (patch)
treed2dc213894c937241d1e72eff888964217a28b84 /source/blender/makesrna/intern/rna_internal_types.h
parent337e2c902930d8a8980505d66234bc46c95b051c (diff)
Refactor override code to properly deal with runtime rna properties too.
The triplet static RNA / runtime RNA / custom properties is a real pain to deal with... Using the new `PropertyRNAOrID` struct helps clarifying and properly dealing with all three cases. Note that this makes override of py-defined RNA properties working (support for that will be committed next). Differential Revision: https://developer.blender.org/D8249
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 6336be25ac3..20c8743f768 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -195,23 +195,17 @@ typedef struct PropertyRNAOrID {
} PropertyRNAOrID;
/**
- * If \a override is NULL, merely do comparison between prop_a from ptr_a and prop_b from ptr_b,
+ * If \a override is NULL, merely do comparison between prop_a and prop_b,
* following comparison mode given.
* If \a override and \a rna_path are not NULL, it will add a new override operation for
* overridable properties that differ and have not yet been overridden
* (and set accordingly \a r_override_changed if given).
*
- * \note Given PropertyRNA are final (in case of IDProps...).
- * \note In non-array cases, \a len values are 0.
* \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,
+ struct PropertyRNAOrID *prop_a,
+ struct PropertyRNAOrID *prop_b,
const int mode,
struct IDOverrideLibrary *override,
const char *rna_path,