diff options
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 05b51e0c9fa..e0ae1d88760 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -53,6 +53,7 @@ #include "BIK_api.h" #include "RNA_access.h" +#include "RNA_path.h" #include "RNA_prototypes.h" #include "BLO_read_write.h" @@ -314,7 +315,7 @@ IDTypeInfo IDType_ID_AC = { .foreach_id = action_foreach_id, .foreach_cache = NULL, .foreach_path = NULL, - .owner_get = NULL, + .owner_pointer_get = NULL, .blend_write = action_blend_write, .blend_read_data = action_blend_read_data, @@ -1950,7 +1951,7 @@ void BKE_pose_blend_read_lib(BlendLibReader *reader, Object *ob, bPose *pose) pchan->bone = BKE_armature_find_bone_name(arm, pchan->name); - IDP_BlendReadLib(reader, pchan->prop); + IDP_BlendReadLib(reader, ob->id.lib, pchan->prop); BLO_read_id_address(reader, ob->id.lib, &pchan->custom); if (UNLIKELY(pchan->bone == NULL)) { @@ -1983,3 +1984,16 @@ void BKE_pose_blend_read_expand(BlendExpander *expander, bPose *pose) BLO_expand(expander, chan->custom); } } + +void BKE_action_fcurves_clear(bAction *act) +{ + if (!act) { + return; + } + while (act->curves.first) { + FCurve *fcu = act->curves.first; + action_groups_remove_channel(act, fcu); + BKE_fcurve_free(fcu); + } + DEG_id_tag_update(&act->id, ID_RECALC_ANIMATION_NO_FLUSH); +} |