diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_context.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 30 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 8 |
3 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 755a155653b..bfcfd753975 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -239,7 +239,7 @@ bool CTX_data_dir(const char *member); #define CTX_DATA_BEGIN_WITH_ID(C, Type, instance, member, Type_id, instance_id) \ CTX_DATA_BEGIN (C, Type, instance, member) \ - Type_id instance_id = ctx_link->ptr.id.data; + Type_id instance_id = (Type_id)ctx_link->ptr.owner_id; int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBase *)); diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 1a34c5376f6..ab8ea37377d 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -648,7 +648,7 @@ char *BKE_animdata_driver_path_hack(bContext *C, PropertyRNA *prop, char *base_path) { - ID *id = (ID *)ptr->id.data; + ID *id = ptr->owner_id; ScrArea *sa = CTX_wm_area(C); /* get standard path which may be extended */ @@ -1656,14 +1656,14 @@ static bool animsys_store_rna_setting(PointerRNA *ptr, if (path) { /* get property to write to */ if (RNA_path_resolve_property(ptr, path, &r_result->ptr, &r_result->prop)) { - if ((ptr->id.data == NULL) || RNA_property_animateable(&r_result->ptr, r_result->prop)) { + if ((ptr->owner_id == NULL) || RNA_property_animateable(&r_result->ptr, r_result->prop)) { int array_len = RNA_property_array_length(&r_result->ptr, r_result->prop); if (array_len && array_index >= array_len) { if (G.debug & G_DEBUG) { CLOG_WARN(&LOG, "Animato: Invalid array index. ID = '%s', '%s[%d]', array length is %d", - (ptr->id.data) ? (((ID *)ptr->id.data)->name + 2) : "<No ID>", + (ptr->owner_id) ? (ptr->owner_id->name + 2) : "<No ID>", path, array_index, array_len - 1); @@ -1682,7 +1682,7 @@ static bool animsys_store_rna_setting(PointerRNA *ptr, if (G.debug & G_DEBUG) { CLOG_WARN(&LOG, "Animato: Invalid path. ID = '%s', '%s[%d]'", - (ptr->id.data) ? (((ID *)ptr->id.data)->name + 2) : "<No ID>", + (ptr->owner_id) ? (ptr->owner_id->name + 2) : "<No ID>", path, array_index); } @@ -1703,7 +1703,7 @@ static bool animsys_read_rna_setting(PathResolvedRNA *anim_rna, float *r_value) float orig_value; /* caller must ensure this is animatable */ - BLI_assert(RNA_property_animateable(ptr, prop) || ptr->id.data == NULL); + BLI_assert(RNA_property_animateable(ptr, prop) || ptr->owner_id == NULL); switch (RNA_property_type(prop)) { case PROP_BOOLEAN: { @@ -1765,7 +1765,7 @@ static bool animsys_write_rna_setting(PathResolvedRNA *anim_rna, const float val int array_index = anim_rna->prop_index; /* caller must ensure this is animatable */ - BLI_assert(RNA_property_animateable(ptr, prop) || ptr->id.data == NULL); + BLI_assert(RNA_property_animateable(ptr, prop) || ptr->owner_id == NULL); /* Check whether value is new. Otherwise we skip all the updates. */ float old_value; @@ -1844,7 +1844,7 @@ static bool animsys_construct_orig_pointer_rna(const PointerRNA *ptr, PointerRNA * not a valid pointer, but there are exceptions in various places of this file which handles * such pointers. * We do special trickery here as well, to quickly go from evaluated to original NlaStrip. */ - if (ptr->id.data == NULL) { + if (ptr->owner_id == NULL) { if (ptr->type != &RNA_NlaStrip) { return false; } @@ -1855,8 +1855,8 @@ static bool animsys_construct_orig_pointer_rna(const PointerRNA *ptr, PointerRNA ptr_orig->data = strip->orig_strip; } else { - ptr_orig->id.data = ((ID *)ptr_orig->id.data)->orig_id; - ptr_orig->data = ptr_orig->id.data; + ptr_orig->owner_id = ptr_orig->owner_id->orig_id; + ptr_orig->data = ptr_orig->owner_id; } return true; } @@ -2003,7 +2003,7 @@ void animsys_evaluate_action_group(PointerRNA *ptr, bAction *act, bActionGroup * return; } - action_idcode_patch_check(ptr->id.data, act); + action_idcode_patch_check(ptr->owner_id, act); /* if group is muted, don't evaluated any of the F-Curve */ if (agrp->flag & AGRP_MUTED) { @@ -2034,7 +2034,7 @@ static void animsys_evaluate_action_ex(PointerRNA *ptr, return; } - action_idcode_patch_check(ptr->id.data, act); + action_idcode_patch_check(ptr->owner_id, act); /* calculate then execute each curve */ animsys_evaluate_fcurves(ptr, &act->curves, ctime, flush_to_original); @@ -2643,7 +2643,7 @@ static NlaEvalChannel *nlaevalchan_verify(PointerRNA *ptr, NlaEvalData *nlaeval, if (G.debug & G_DEBUG) { CLOG_WARN(&LOG, "Animato: Invalid path. ID = '%s', '%s'", - (ptr->id.data) ? (((ID *)ptr->id.data)->name + 2) : "<No ID>", + (ptr->owner_id) ? (ptr->owner_id->name + 2) : "<No ID>", path); } @@ -2651,7 +2651,7 @@ static NlaEvalChannel *nlaevalchan_verify(PointerRNA *ptr, NlaEvalData *nlaeval, } /* Check that the property can be animated. */ - if (ptr->id.data != NULL && !RNA_property_animateable(&key.ptr, key.prop)) { + if (ptr->owner_id != NULL && !RNA_property_animateable(&key.ptr, key.prop)) { return NULL; } @@ -2884,7 +2884,7 @@ static bool nlaeval_blend_value(NlaBlendData *blend, if (index < 0) { if (G.debug & G_DEBUG) { - ID *id = nec->key.ptr.id.data; + ID *id = nec->key.ptr.owner_id; CLOG_WARN(&LOG, "Animato: Invalid array index. ID = '%s', '%s[%d]', array length is %d", id ? (id->name + 2) : "<No ID>", @@ -3081,7 +3081,7 @@ static void nlastrip_evaluate_actionclip(PointerRNA *ptr, return; } - action_idcode_patch_check(ptr->id.data, strip->act); + action_idcode_patch_check(ptr->owner_id, strip->act); /* join this strip's modifiers to the parent's modifiers (own modifiers first) */ nlaeval_fmodifiers_join_stacks(&tmp_modifiers, &strip->modifiers, modifiers); 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; |