diff options
author | Colin Basnett <cmbasnett@gmail.com> | 2022-09-17 03:50:37 +0300 |
---|---|---|
committer | Colin Basnett <cmbasnett@gmail.com> | 2022-09-17 03:50:37 +0300 |
commit | 564bda241a973396da51d7c3ccd9efd97d51728a (patch) | |
tree | 4d9aa4cccd82e2e606b47774afa5e1015bf14768 /source/blender/blenkernel/intern/action.c | |
parent | 0fff238150d076576053c25b646f653d6e3b0edb (diff) | |
parent | 48d7ff68f0df209c77bbb081ab46fbc109fd825a (diff) |
Merge branch 'master' into feature-imformatfeature-imformat
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); +} |