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-08-21 16:42:26 +0300
committerJacques Lucke <jacques@blender.org>2020-08-21 16:42:26 +0300
commitbed634c4f96cac7b1afaccc1ff646fc22f3efb29 (patch)
tree95bd87ada9c4fe9e751295e7173788356df8984b /source/blender/blenloader/intern/writefile.c
parent71634d94ca4ce2b838206144089010a16bb3f1ff (diff)
Refactor: move nla code from blenloader to blenkernel
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 1c6c70bab6d..9aac713668e 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -171,6 +171,7 @@
#include "BKE_lib_override.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
+#include "BKE_nla.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_pointcache.h"
@@ -744,31 +745,6 @@ static void write_keyingsets(BlendWriter *writer, ListBase *list)
}
}
-static void write_nlastrips(BlendWriter *writer, ListBase *strips)
-{
- BLO_write_struct_list(writer, NlaStrip, strips);
- LISTBASE_FOREACH (NlaStrip *, strip, strips) {
- /* write the strip's F-Curves and modifiers */
- BKE_fcurve_blend_write(writer, &strip->fcurves);
- BKE_fmodifiers_blend_write(writer, &strip->modifiers);
-
- /* write the strip's children */
- write_nlastrips(writer, &strip->strips);
- }
-}
-
-static void write_nladata(BlendWriter *writer, ListBase *nlabase)
-{
- /* write all the tracks */
- LISTBASE_FOREACH (NlaTrack *, nlt, nlabase) {
- /* write the track first */
- BLO_write_struct(writer, NlaTrack, nlt);
-
- /* write the track's strips */
- write_nlastrips(writer, &nlt->strips);
- }
-}
-
static void write_animdata(BlendWriter *writer, AnimData *adt)
{
/* firstly, just write the AnimData block */
@@ -788,7 +764,7 @@ static void write_animdata(BlendWriter *writer, AnimData *adt)
// TODO write the remaps (if they are needed)
/* write NLA data */
- write_nladata(writer, &adt->nla_tracks);
+ BKE_nla_blend_write(writer, &adt->nla_tracks);
}
static void write_node_socket_default_value(BlendWriter *writer, bNodeSocket *sock)