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 <jacques@blender.org>2020-11-06 19:33:00 +0300
committerJacques Lucke <jacques@blender.org>2020-11-06 19:33:13 +0300
commit37ef37711d997899041d84e8c7a17e1fbb4efab9 (patch)
treee27bdc0042524a585074285360e618c20e00ef9d /source/blender/blenloader/intern/readfile.c
parenta3a6443bfd8ac16824bdbf349913696531f348a1 (diff)
Refactor: move MotionPath .blend I/O to blenkernel
Ref T76372.
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 2b93f5222db..77a1925d444 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -113,6 +113,7 @@
#include "BKE_action.h"
#include "BKE_anim_data.h"
+#include "BKE_anim_visualization.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_brush.h"
@@ -2912,22 +2913,6 @@ static void lib_link_object(BlendLibReader *reader, Object *ob)
}
}
-/* direct data for cache */
-static void direct_link_motionpath(BlendDataReader *reader, bMotionPath *mpath)
-{
- /* sanity check */
- if (mpath == NULL) {
- return;
- }
-
- /* relink points cache */
- BLO_read_data_address(reader, &mpath->points);
-
- mpath->points_vbo = NULL;
- mpath->batch_line = NULL;
- mpath->batch_points = NULL;
-}
-
static void direct_link_pose(BlendDataReader *reader, bPose *pose)
{
if (!pose) {
@@ -2959,7 +2944,7 @@ static void direct_link_pose(BlendDataReader *reader, bPose *pose)
BLO_read_data_address(reader, &pchan->mpath);
if (pchan->mpath) {
- direct_link_motionpath(reader, pchan->mpath);
+ animviz_motionpath_blend_read_data(reader, pchan->mpath);
}
BLI_listbase_clear(&pchan->iktree);
@@ -3005,7 +2990,7 @@ static void direct_link_object(BlendDataReader *reader, Object *ob)
BLO_read_data_address(reader, &ob->mpath);
if (ob->mpath) {
- direct_link_motionpath(reader, ob->mpath);
+ animviz_motionpath_blend_read_data(reader, ob->mpath);
}
BLO_read_list(reader, &ob->defbase);