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:
authorJacques Lucke <mail@jlucke.com>2019-08-23 10:52:12 +0300
committerJacques Lucke <mail@jlucke.com>2019-08-23 10:52:12 +0300
commita1aa4a259713f26c32a5fac4adbe0751e0479f5b (patch)
tree0737940d32513ad8e2458760c81ad7c1c61e1ce6 /source/blender/blenkernel/intern/fcurve.c
parent232049dd9408e15d2082181e60ddd775b375ff19 (diff)
RNA: Cleanup PointerRNA struct
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve.c')
-rw-r--r--source/blender/blenkernel/intern/fcurve.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 9580ea763fb..657a08877b0 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -382,8 +382,8 @@ FCurve *rna_get_fcurve_context_ui(bContext *C,
}
/* there must be some RNA-pointer + property combon */
- if (prop && tptr.id.data && RNA_property_animateable(&tptr, prop)) {
- AnimData *adt = BKE_animdata_from_id(tptr.id.data);
+ if (prop && tptr.owner_id && RNA_property_animateable(&tptr, prop)) {
+ AnimData *adt = BKE_animdata_from_id(tptr.owner_id);
int step = (
/* Always 1 in case we have no context (can't check in 'ancestors' of given RNA ptr). */
C ? 2 : 1);
@@ -391,7 +391,7 @@ FCurve *rna_get_fcurve_context_ui(bContext *C,
if (!adt && C) {
path = BKE_animdata_driver_path_hack(C, &tptr, prop, NULL);
- adt = BKE_animdata_from_id(tptr.id.data);
+ adt = BKE_animdata_from_id(tptr.owner_id);
step--;
}
@@ -438,7 +438,7 @@ FCurve *rna_get_fcurve_context_ui(bContext *C,
if (tpath && tpath != path) {
MEM_freeN(path);
path = tpath;
- adt = BKE_animdata_from_id(tptr.id.data);
+ adt = BKE_animdata_from_id(tptr.owner_id);
}
else {
adt = NULL;