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/makesrna/intern/rna_action.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/makesrna/intern/rna_action.c')
-rw-r--r--source/blender/makesrna/intern/rna_action.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 4ad2aa55c75..24f8d5c4e3d 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -249,15 +249,15 @@ static void rna_Action_active_pose_marker_index_range(
static void rna_Action_frame_range_get(PointerRNA *ptr, float *values)
{ /* don't include modifiers because they too easily can have very large
* ranges: MINAFRAMEF to MAXFRAMEF. */
- calc_action_range(ptr->id.data, values, values + 1, false);
+ calc_action_range((bAction *)ptr->owner_id, values, values + 1, false);
}
/* Used to check if an action (value pointer)
* is suitable to be assigned to the ID-block that is ptr. */
bool rna_Action_id_poll(PointerRNA *ptr, PointerRNA value)
{
- ID *srcId = (ID *)ptr->id.data;
- bAction *act = (bAction *)value.id.data;
+ ID *srcId = ptr->owner_id;
+ bAction *act = (bAction *)value.owner_id;
if (act) {
/* there can still be actions that will have undefined id-root
@@ -280,7 +280,7 @@ bool rna_Action_id_poll(PointerRNA *ptr, PointerRNA value)
bool rna_Action_actedit_assign_poll(PointerRNA *ptr, PointerRNA value)
{
SpaceAction *saction = (SpaceAction *)ptr->data;
- bAction *act = (bAction *)value.id.data;
+ bAction *act = (bAction *)value.owner_id;
if (act) {
/* there can still be actions that will have undefined id-root