diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-07 13:47:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-07 13:48:29 +0300 |
commit | b3a7a75a266de6765d8c04953c0dabce3c30c359 (patch) | |
tree | 98d27c5eb1d6573235c42e6e4b14137a8cee5c49 /source/blender/editors/animation/anim_deps.c | |
parent | 16017178b24c9c84df5c1114fae8dce4796c6c26 (diff) |
Cleanup: remove moar G.main usages.
Notes:
* Really need to address RNA setters case, end up adding way too much
G.main here these days... :/
* Added Main pointer into bAnimContext, helps a lot in anim code ;)
Diffstat (limited to 'source/blender/editors/animation/anim_deps.c')
-rw-r--r-- | source/blender/editors/animation/anim_deps.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 7eddb3bc3b2..c71acd714d3 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -46,11 +46,11 @@ #include "BKE_animsys.h" #include "BKE_action.h" -#include "BKE_fcurve.h" -#include "BKE_gpencil.h" #include "BKE_context.h" #include "BKE_depsgraph.h" -#include "BKE_global.h" +#include "BKE_fcurve.h" +#include "BKE_gpencil.h" +#include "BKE_main.h" #include "BKE_node.h" #include "BKE_sequencer.h" @@ -63,7 +63,7 @@ /* tags the given anim list element for refreshes (if applicable) * due to Animation Editor editing */ -void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale) +void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) { ID *id; FCurve *fcu; @@ -93,7 +93,7 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale) RNA_id_pointer_create(id, &id_ptr); if (RNA_path_resolve_property(&id_ptr, fcu->rna_path, &ptr, &prop)) - RNA_property_update_main(G.main, scene, &ptr, prop); + RNA_property_update_main(bmain, scene, &ptr, prop); } else { /* in other case we do standard depsgraph update, ideally @@ -402,7 +402,7 @@ void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data) if (ale->update & ANIM_UPDATE_DEPS) { ale->update &= ~ANIM_UPDATE_DEPS; - ANIM_list_elem_update(ac->scene, ale); + ANIM_list_elem_update(ac->bmain, ac->scene, ale); } } else if (ale->datatype == ALE_FCURVE) { @@ -422,13 +422,13 @@ void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data) if (ale->update & ANIM_UPDATE_DEPS) { ale->update &= ~ANIM_UPDATE_DEPS; - ANIM_list_elem_update(ac->scene, ale); + ANIM_list_elem_update(ac->bmain, ac->scene, ale); } } else if (ale->datatype == ALE_NLASTRIP) { if (ale->update & ANIM_UPDATE_DEPS) { ale->update &= ~ANIM_UPDATE_DEPS; - ANIM_list_elem_update(ac->scene, ale); + ANIM_list_elem_update(ac->bmain, ac->scene, ale); } } |