diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_animsys.h | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_nla.h | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_sequencer.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 121 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/nla.c | 17 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 4 |
8 files changed, 91 insertions, 82 deletions
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 326c25e8899..7ae9527b2f7 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -76,7 +76,7 @@ struct AnimData *BKE_animdata_copy(struct Main *bmain, struct AnimData *adt, con bool BKE_animdata_copy_id(struct Main *bmain, struct ID *id_to, struct ID *id_from, const bool do_action, const bool do_id_user); /* Copy AnimData Actions */ -void BKE_animdata_copy_id_action(struct ID *id, const bool set_newid); +void BKE_animdata_copy_id_action(struct Main *bmain, struct ID *id, const bool set_newid); /* Merge copies of data from source AnimData block */ typedef enum eAnimData_MergeCopy_Modes { @@ -90,7 +90,9 @@ typedef enum eAnimData_MergeCopy_Modes { ADT_MERGECOPY_SRC_REF = 2 } eAnimData_MergeCopy_Modes; -void BKE_animdata_merge_copy(struct ID *dst_id, struct ID *src_id, eAnimData_MergeCopy_Modes action_mode, bool fix_drivers); +void BKE_animdata_merge_copy( + struct Main *bmain, struct ID *dst_id, struct ID *src_id, + eAnimData_MergeCopy_Modes action_mode, bool fix_drivers); /* ************************************* */ /* KeyingSets API */ @@ -141,7 +143,8 @@ void BKE_animdata_fix_paths_remove(struct ID *id, const char *path); /* -------------------------------------- */ /* Move animation data from src to destination if it's paths are based on basepaths */ -void BKE_animdata_separate_by_basepath(struct ID *srcID, struct ID *dstID, struct ListBase *basepaths); +void BKE_animdata_separate_by_basepath( + struct Main *bmain, struct ID *srcID, struct ID *dstID, struct ListBase *basepaths); /* Move F-Curves from src to destination if it's path is based on basepath */ void action_move_fcurves_by_basepath(struct bAction *srcAct, struct bAction *dstAct, const char basepath[]); diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h index 4509d374b02..6f0b6d59984 100644 --- a/source/blender/blenkernel/BKE_nla.h +++ b/source/blender/blenkernel/BKE_nla.h @@ -34,6 +34,7 @@ */ struct AnimData; +struct Main; struct NlaStrip; struct NlaTrack; struct bAction; @@ -50,9 +51,9 @@ void BKE_nlastrip_free(ListBase *strips, struct NlaStrip *strip); void BKE_nlatrack_free(ListBase *tracks, struct NlaTrack *nlt); void BKE_nla_tracks_free(ListBase *tracks); -struct NlaStrip *BKE_nlastrip_copy(struct NlaStrip *strip, const bool use_same_action); -struct NlaTrack *BKE_nlatrack_copy(struct NlaTrack *nlt, const bool use_same_actions); -void BKE_nla_tracks_copy(ListBase *dst, ListBase *src); +struct NlaStrip *BKE_nlastrip_copy(struct Main *bmain, struct NlaStrip *strip, const bool use_same_action); +struct NlaTrack *BKE_nlatrack_copy(struct Main *bmain, struct NlaTrack *nlt, const bool use_same_actions); +void BKE_nla_tracks_copy(struct Main *bmain, ListBase *dst, ListBase *src); struct NlaTrack *BKE_nlatrack_add(struct AnimData *adt, struct NlaTrack *prev); struct NlaStrip *BKE_nlastrip_new(struct bAction *act); diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 63c91ef9635..a541120638b 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -495,6 +495,6 @@ struct ImBuf *BKE_sequencer_render_mask_input( int cfra, int fra_offset, bool make_float); void BKE_sequencer_color_balance_apply(struct StripColorBalance *cb, struct ImBuf *ibuf, float mul, bool make_float, struct ImBuf *mask_input); -void BKE_sequencer_all_free_anim_ibufs(int cfra); +void BKE_sequencer_all_free_anim_ibufs(struct Main *bmain, int cfra); #endif /* __BKE_SEQUENCER_H__ */ diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 0867170611f..ec979623a98 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -288,7 +288,7 @@ AnimData *BKE_animdata_copy(Main *bmain, AnimData *adt, const bool do_action, co } /* duplicate NLA data */ - BKE_nla_tracks_copy(&dadt->nla_tracks, &adt->nla_tracks); + BKE_nla_tracks_copy(bmain, &dadt->nla_tracks, &adt->nla_tracks); /* duplicate drivers (F-Curves) */ copy_fcurves(&dadt->drivers, &adt->drivers); @@ -319,25 +319,27 @@ bool BKE_animdata_copy_id(Main *bmain, ID *id_to, ID *id_from, const bool do_act return true; } -void BKE_animdata_copy_id_action(ID *id, const bool set_newid) +void BKE_animdata_copy_id_action(Main *bmain, ID *id, const bool set_newid) { AnimData *adt = BKE_animdata_from_id(id); if (adt) { if (adt->action) { id_us_min((ID *)adt->action); - adt->action = set_newid ? ID_NEW_SET(adt->action, BKE_action_copy(G.main, adt->action)) : - BKE_action_copy(G.main, adt->action); + adt->action = set_newid ? ID_NEW_SET(adt->action, BKE_action_copy(bmain, adt->action)) : + BKE_action_copy(bmain, adt->action); } if (adt->tmpact) { id_us_min((ID *)adt->tmpact); - adt->tmpact = set_newid ? ID_NEW_SET(adt->tmpact, BKE_action_copy(G.main, adt->tmpact)) : - BKE_action_copy(G.main, adt->tmpact); + adt->tmpact = set_newid ? ID_NEW_SET(adt->tmpact, BKE_action_copy(bmain, adt->tmpact)) : + BKE_action_copy(bmain, adt->tmpact); } } } /* Merge copies of the data from the src AnimData into the destination AnimData */ -void BKE_animdata_merge_copy(ID *dst_id, ID *src_id, eAnimData_MergeCopy_Modes action_mode, bool fix_drivers) +void BKE_animdata_merge_copy( + Main *bmain, ID *dst_id, ID *src_id, + eAnimData_MergeCopy_Modes action_mode, bool fix_drivers) { AnimData *src = BKE_animdata_from_id(src_id); AnimData *dst = BKE_animdata_from_id(dst_id); @@ -355,8 +357,8 @@ void BKE_animdata_merge_copy(ID *dst_id, ID *src_id, eAnimData_MergeCopy_Modes a /* handle actions... */ if (action_mode == ADT_MERGECOPY_SRC_COPY) { /* make a copy of the actions */ - dst->action = BKE_action_copy(G.main, src->action); - dst->tmpact = BKE_action_copy(G.main, src->tmpact); + dst->action = BKE_action_copy(bmain, src->action); + dst->tmpact = BKE_action_copy(bmain, src->tmpact); } else if (action_mode == ADT_MERGECOPY_SRC_REF) { /* make a reference to it */ @@ -371,7 +373,7 @@ void BKE_animdata_merge_copy(ID *dst_id, ID *src_id, eAnimData_MergeCopy_Modes a if (src->nla_tracks.first) { ListBase tracks = {NULL, NULL}; - BKE_nla_tracks_copy(&tracks, &src->nla_tracks); + BKE_nla_tracks_copy(bmain, &tracks, &src->nla_tracks); BLI_movelisttolist(&dst->nla_tracks, &tracks); } @@ -508,7 +510,8 @@ void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const cha * animation data is based off "basepath", creating new AnimData and * associated data as necessary */ -void BKE_animdata_separate_by_basepath(ID *srcID, ID *dstID, ListBase *basepaths) +void BKE_animdata_separate_by_basepath( + Main *bmain, ID *srcID, ID *dstID, ListBase *basepaths) { AnimData *srcAdt = NULL, *dstAdt = NULL; LinkData *ld; @@ -534,7 +537,7 @@ void BKE_animdata_separate_by_basepath(ID *srcID, ID *dstID, ListBase *basepaths if (srcAdt->action) { /* set up an action if necessary, and name it in a similar way so that it can be easily found again */ if (dstAdt->action == NULL) { - dstAdt->action = BKE_action_add(G.main, srcAdt->action->id.name + 2); + dstAdt->action = BKE_action_add(bmain, srcAdt->action->id.name + 2); } else if (dstAdt->action == srcAdt->action) { printf("Argh! Source and Destination share animation! ('%s' and '%s' both use '%s') Making new empty action\n", @@ -542,7 +545,7 @@ void BKE_animdata_separate_by_basepath(ID *srcID, ID *dstID, ListBase *basepaths /* TODO: review this... */ id_us_min(&dstAdt->action->id); - dstAdt->action = BKE_action_add(G.main, dstAdt->action->id.name + 2); + dstAdt->action = BKE_action_add(bmain, dstAdt->action->id.name + 2); } /* loop over base paths, trying to fix for each one... */ @@ -1051,20 +1054,20 @@ static void adt_apply_all_fcurves_cb(ID *id, AnimData *adt, void *wrapper_data) } /* apply the given callback function on all F-Curves attached to data in main database */ -void BKE_fcurves_main_cb(Main *mainptr, ID_FCurve_Edit_Callback func, void *user_data) +void BKE_fcurves_main_cb(Main *bmain, ID_FCurve_Edit_Callback func, void *user_data) { /* Wrap F-Curve operation stuff to pass to the general AnimData-level func */ AllFCurvesCbWrapper wrapper = {func, user_data}; /* Use the AnimData-based function so that we don't have to reimplement all that stuff */ - BKE_animdata_main_cb(mainptr, adt_apply_all_fcurves_cb, &wrapper); + BKE_animdata_main_cb(bmain, adt_apply_all_fcurves_cb, &wrapper); } /* Whole Database Ops -------------------------------------------- */ /* apply the given callback function on all data in main database */ -void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *user_data) +void BKE_animdata_main_cb(Main *bmain, ID_AnimData_Edit_Callback func, void *user_data) { ID *id; @@ -1088,67 +1091,67 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u } (void)0 /* nodes */ - ANIMDATA_IDS_CB(mainptr->nodetree.first); + ANIMDATA_IDS_CB(bmain->nodetree.first); /* textures */ - ANIMDATA_NODETREE_IDS_CB(mainptr->tex.first, Tex); + ANIMDATA_NODETREE_IDS_CB(bmain->tex.first, Tex); /* lamps */ - ANIMDATA_NODETREE_IDS_CB(mainptr->lamp.first, Lamp); + ANIMDATA_NODETREE_IDS_CB(bmain->lamp.first, Lamp); /* materials */ - ANIMDATA_NODETREE_IDS_CB(mainptr->mat.first, Material); + ANIMDATA_NODETREE_IDS_CB(bmain->mat.first, Material); /* cameras */ - ANIMDATA_IDS_CB(mainptr->camera.first); + ANIMDATA_IDS_CB(bmain->camera.first); /* shapekeys */ - ANIMDATA_IDS_CB(mainptr->key.first); + ANIMDATA_IDS_CB(bmain->key.first); /* metaballs */ - ANIMDATA_IDS_CB(mainptr->mball.first); + ANIMDATA_IDS_CB(bmain->mball.first); /* curves */ - ANIMDATA_IDS_CB(mainptr->curve.first); + ANIMDATA_IDS_CB(bmain->curve.first); /* armatures */ - ANIMDATA_IDS_CB(mainptr->armature.first); + ANIMDATA_IDS_CB(bmain->armature.first); /* lattices */ - ANIMDATA_IDS_CB(mainptr->latt.first); + ANIMDATA_IDS_CB(bmain->latt.first); /* meshes */ - ANIMDATA_IDS_CB(mainptr->mesh.first); + ANIMDATA_IDS_CB(bmain->mesh.first); /* particles */ - ANIMDATA_IDS_CB(mainptr->particle.first); + ANIMDATA_IDS_CB(bmain->particle.first); /* speakers */ - ANIMDATA_IDS_CB(mainptr->speaker.first); + ANIMDATA_IDS_CB(bmain->speaker.first); /* movie clips */ - ANIMDATA_IDS_CB(mainptr->movieclip.first); + ANIMDATA_IDS_CB(bmain->movieclip.first); /* objects */ - ANIMDATA_IDS_CB(mainptr->object.first); + ANIMDATA_IDS_CB(bmain->object.first); /* masks */ - ANIMDATA_IDS_CB(mainptr->mask.first); + ANIMDATA_IDS_CB(bmain->mask.first); /* worlds */ - ANIMDATA_NODETREE_IDS_CB(mainptr->world.first, World); + ANIMDATA_NODETREE_IDS_CB(bmain->world.first, World); /* scenes */ - ANIMDATA_NODETREE_IDS_CB(mainptr->scene.first, Scene); + ANIMDATA_NODETREE_IDS_CB(bmain->scene.first, Scene); /* line styles */ - ANIMDATA_IDS_CB(mainptr->linestyle.first); + ANIMDATA_IDS_CB(bmain->linestyle.first); /* grease pencil */ - ANIMDATA_IDS_CB(mainptr->gpencil.first); + ANIMDATA_IDS_CB(bmain->gpencil.first); /* cache files */ - ANIMDATA_IDS_CB(mainptr->cachefiles.first); + ANIMDATA_IDS_CB(bmain->cachefiles.first); } /* Fix all RNA-Paths throughout the database (directly access the Global.main version) @@ -1158,7 +1161,7 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u /* TODO: use BKE_animdata_main_cb for looping over all data */ void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const char *oldName, const char *newName) { - Main *mainptr = G.main; + Main *bmain = G.main; /* XXX UGLY! */ ID *id; /* macro for less typing @@ -1184,67 +1187,67 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const cha } (void)0 /* nodes */ - RENAMEFIX_ANIM_IDS(mainptr->nodetree.first); + RENAMEFIX_ANIM_IDS(bmain->nodetree.first); /* textures */ - RENAMEFIX_ANIM_NODETREE_IDS(mainptr->tex.first, Tex); + RENAMEFIX_ANIM_NODETREE_IDS(bmain->tex.first, Tex); /* lamps */ - RENAMEFIX_ANIM_NODETREE_IDS(mainptr->lamp.first, Lamp); + RENAMEFIX_ANIM_NODETREE_IDS(bmain->lamp.first, Lamp); /* materials */ - RENAMEFIX_ANIM_NODETREE_IDS(mainptr->mat.first, Material); + RENAMEFIX_ANIM_NODETREE_IDS(bmain->mat.first, Material); /* cameras */ - RENAMEFIX_ANIM_IDS(mainptr->camera.first); + RENAMEFIX_ANIM_IDS(bmain->camera.first); /* shapekeys */ - RENAMEFIX_ANIM_IDS(mainptr->key.first); + RENAMEFIX_ANIM_IDS(bmain->key.first); /* metaballs */ - RENAMEFIX_ANIM_IDS(mainptr->mball.first); + RENAMEFIX_ANIM_IDS(bmain->mball.first); /* curves */ - RENAMEFIX_ANIM_IDS(mainptr->curve.first); + RENAMEFIX_ANIM_IDS(bmain->curve.first); /* armatures */ - RENAMEFIX_ANIM_IDS(mainptr->armature.first); + RENAMEFIX_ANIM_IDS(bmain->armature.first); /* lattices */ - RENAMEFIX_ANIM_IDS(mainptr->latt.first); + RENAMEFIX_ANIM_IDS(bmain->latt.first); /* meshes */ - RENAMEFIX_ANIM_IDS(mainptr->mesh.first); + RENAMEFIX_ANIM_IDS(bmain->mesh.first); /* particles */ - RENAMEFIX_ANIM_IDS(mainptr->particle.first); + RENAMEFIX_ANIM_IDS(bmain->particle.first); /* speakers */ - RENAMEFIX_ANIM_IDS(mainptr->speaker.first); + RENAMEFIX_ANIM_IDS(bmain->speaker.first); /* movie clips */ - RENAMEFIX_ANIM_IDS(mainptr->movieclip.first); + RENAMEFIX_ANIM_IDS(bmain->movieclip.first); /* objects */ - RENAMEFIX_ANIM_IDS(mainptr->object.first); + RENAMEFIX_ANIM_IDS(bmain->object.first); /* masks */ - RENAMEFIX_ANIM_IDS(mainptr->mask.first); + RENAMEFIX_ANIM_IDS(bmain->mask.first); /* worlds */ - RENAMEFIX_ANIM_NODETREE_IDS(mainptr->world.first, World); + RENAMEFIX_ANIM_NODETREE_IDS(bmain->world.first, World); /* linestyles */ - RENAMEFIX_ANIM_IDS(mainptr->linestyle.first); + RENAMEFIX_ANIM_IDS(bmain->linestyle.first); /* grease pencil */ - RENAMEFIX_ANIM_IDS(mainptr->gpencil.first); + RENAMEFIX_ANIM_IDS(bmain->gpencil.first); /* cache files */ - RENAMEFIX_ANIM_IDS(mainptr->cachefiles.first); + RENAMEFIX_ANIM_IDS(bmain->cachefiles.first); /* scenes */ - RENAMEFIX_ANIM_NODETREE_IDS(mainptr->scene.first, Scene); + RENAMEFIX_ANIM_NODETREE_IDS(bmain->scene.first, Scene); } /* *********************************** */ diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index a885f22b739..2327da82615 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -772,9 +772,10 @@ bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop) if (id) { /* if property isn't editable, we're going to have an extra block hanging around until we save */ if (RNA_property_editable(ptr, prop)) { - if (id_copy(CTX_data_main(C), id, &newid, false) && newid) { + Main *bmain = CTX_data_main(C); + if (id_copy(bmain, id, &newid, false) && newid) { /* copy animation actions too */ - BKE_animdata_copy_id_action(id, false); + BKE_animdata_copy_id_action(bmain, id, false); /* us is 1 by convention, but RNA_property_pointer_set * will also increment it, so set it to zero */ newid->us = 0; diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index fc236cc2ad0..98586a5c2f5 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -171,7 +171,7 @@ static void get_sequence_fname(const MovieClip *clip, BLI_strncpy(name, clip->name, sizeof(clip->name)); } - BLI_path_abs(name, ID_BLEND_PATH(G.main, &clip->id)); + BLI_path_abs(name, ID_BLEND_PATH_FROM_GLOBAL(&clip->id)); } /* supposed to work with sequences only */ @@ -261,7 +261,7 @@ static void movieclip_open_anim_file(MovieClip *clip) if (!clip->anim) { BLI_strncpy(str, clip->name, FILE_MAX); - BLI_path_abs(str, ID_BLEND_PATH(G.main, &clip->id)); + BLI_path_abs(str, ID_BLEND_PATH_FROM_GLOBAL(&clip->id)); /* FIXME: make several stream accessible in image editor, too */ clip->anim = openanim(str, IB_rect, 0, clip->colorspace_settings.name); @@ -1300,7 +1300,7 @@ void BKE_movieclip_reload(Main *bmain, MovieClip *clip) */ { Scene *scene; - for (scene = G.main->scene.first; scene; scene = scene->id.next) { + for (scene = bmain->scene.first; scene; scene = scene->id.next) { if (scene->nodetree) { nodeUpdateID(scene->nodetree, &clip->id); } @@ -1568,7 +1568,7 @@ void BKE_movieclip_filename_for_frame(MovieClip *clip, MovieClipUser *user, char } else { BLI_strncpy(name, clip->name, FILE_MAX); - BLI_path_abs(name, ID_BLEND_PATH(G.main, &clip->id)); + BLI_path_abs(name, ID_BLEND_PATH_FROM_GLOBAL(&clip->id)); } } diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index b91887e6815..56705c834d5 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -54,9 +54,10 @@ #include "BKE_action.h" #include "BKE_fcurve.h" -#include "BKE_nla.h" #include "BKE_global.h" #include "BKE_library.h" +#include "BKE_main.h" +#include "BKE_nla.h" #ifdef WITH_AUDASPACE # include <AUD_Special.h> @@ -162,7 +163,7 @@ void BKE_nla_tracks_free(ListBase *tracks) * * \param use_same_action When true, the existing action is used (instead of being duplicated) */ -NlaStrip *BKE_nlastrip_copy(NlaStrip *strip, const bool use_same_action) +NlaStrip *BKE_nlastrip_copy(Main *bmain, NlaStrip *strip, const bool use_same_action) { NlaStrip *strip_d; NlaStrip *cs, *cs_d; @@ -183,7 +184,7 @@ NlaStrip *BKE_nlastrip_copy(NlaStrip *strip, const bool use_same_action) } else { /* use a copy of the action instead (user count shouldn't have changed yet) */ - strip_d->act = BKE_action_copy(G.main, strip_d->act); + strip_d->act = BKE_action_copy(bmain, strip_d->act); } } @@ -195,7 +196,7 @@ NlaStrip *BKE_nlastrip_copy(NlaStrip *strip, const bool use_same_action) BLI_listbase_clear(&strip_d->strips); for (cs = strip->strips.first; cs; cs = cs->next) { - cs_d = BKE_nlastrip_copy(cs, use_same_action); + cs_d = BKE_nlastrip_copy(bmain, cs, use_same_action); BLI_addtail(&strip_d->strips, cs_d); } @@ -204,7 +205,7 @@ NlaStrip *BKE_nlastrip_copy(NlaStrip *strip, const bool use_same_action) } /* Copy NLA Track */ -NlaTrack *BKE_nlatrack_copy(NlaTrack *nlt, const bool use_same_actions) +NlaTrack *BKE_nlatrack_copy(Main *bmain, NlaTrack *nlt, const bool use_same_actions) { NlaStrip *strip, *strip_d; NlaTrack *nlt_d; @@ -221,7 +222,7 @@ NlaTrack *BKE_nlatrack_copy(NlaTrack *nlt, const bool use_same_actions) BLI_listbase_clear(&nlt_d->strips); for (strip = nlt->strips.first; strip; strip = strip->next) { - strip_d = BKE_nlastrip_copy(strip, use_same_actions); + strip_d = BKE_nlastrip_copy(bmain, strip, use_same_actions); BLI_addtail(&nlt_d->strips, strip_d); } @@ -230,7 +231,7 @@ NlaTrack *BKE_nlatrack_copy(NlaTrack *nlt, const bool use_same_actions) } /* Copy all NLA data */ -void BKE_nla_tracks_copy(ListBase *dst, ListBase *src) +void BKE_nla_tracks_copy(Main *bmain, ListBase *dst, ListBase *src) { NlaTrack *nlt, *nlt_d; @@ -245,7 +246,7 @@ void BKE_nla_tracks_copy(ListBase *dst, ListBase *src) for (nlt = src->first; nlt; nlt = nlt->next) { /* make a copy, and add the copy to the destination list */ // XXX: we need to fix this sometime - nlt_d = BKE_nlatrack_copy(nlt, true); + nlt_d = BKE_nlatrack_copy(bmain, nlt, true); BLI_addtail(dst, nlt_d); } } diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index ecd0335fc4e..7d1bb69c788 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -5724,10 +5724,10 @@ static void sequencer_all_free_anim_ibufs(ListBase *seqbase, int cfra) } } -void BKE_sequencer_all_free_anim_ibufs(int cfra) +void BKE_sequencer_all_free_anim_ibufs(Main *bmain, int cfra) { BKE_sequencer_cache_cleanup(); - for (Scene *scene = G.main->scene.first; + for (Scene *scene = bmain->scene.first; scene != NULL; scene = scene->id.next) { |