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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-01 16:47:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-01 16:47:49 +0400
commit5fa7d1c1b4e7bde1d173caa60af0e273c86b6f0b (patch)
tree186a794aef722993c7067a657b4d007c62dd669b /source/blender/blenkernel
parentc34f831757e0985b7523b6e5bbfadd7dd6a2c161 (diff)
2.5: code changes to reduce the usage of G.main and pass it along
or get it from the context instead.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_depsgraph.h12
-rw-r--r--source/blender/blenkernel/BKE_material.h5
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h16
-rw-r--r--source/blender/blenkernel/BKE_scene.h4
-rw-r--r--source/blender/blenkernel/intern/anim.c6
-rw-r--r--source/blender/blenkernel/intern/blender.c2
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c42
-rw-r--r--source/blender/blenkernel/intern/material.c10
-rw-r--r--source/blender/blenkernel/intern/particle.c4
-rw-r--r--source/blender/blenkernel/intern/pointcache.c10
-rw-r--r--source/blender/blenkernel/intern/scene.c24
-rw-r--r--source/blender/blenkernel/intern/sequencer.c4
12 files changed, 72 insertions, 67 deletions
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h
index 6a44051806e..0b78a1206fe 100644
--- a/source/blender/blenkernel/BKE_depsgraph.h
+++ b/source/blender/blenkernel/BKE_depsgraph.h
@@ -70,7 +70,7 @@ int queue_count(struct DagNodeQueue *queue);
void queue_delete(struct DagNodeQueue *queue);
// queries
-struct DagForest *build_dag(struct Scene *sce, short mask);
+struct DagForest *build_dag(struct Main *bmain, struct Scene *sce, short mask);
void free_forest(struct DagForest *Dag);
// note :
@@ -97,14 +97,14 @@ void draw_all_deps(void);
/* Note that the DAG never executes changes in Objects, only sets flags in Objects */
/* (re)-create dependency graph for scene */
-void DAG_scene_sort(struct Scene *sce);
+void DAG_scene_sort(struct Main *bmain, struct Scene *sce);
/* flag all objects that need recalc because they're animated */
-void DAG_scene_update_flags(struct Scene *sce, unsigned int lay);
+void DAG_scene_update_flags(struct Main *bmain, struct Scene *sce, unsigned int lay);
/* flushes all recalc flags in objects down the dependency tree */
-void DAG_scene_flush_update(struct Scene *sce, unsigned int lay, int time);
+void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, int time);
/* tag objects for update on file load */
-void DAG_on_load_update(void);
+void DAG_on_load_update(struct Main *bmain);
/* flag all IDs that need recalc because they're animated, influencing
this ID only. only for objects currently */
@@ -113,7 +113,7 @@ void DAG_id_update_flags(struct ID *id);
but note the DAG only supports objects and object data currently */
void DAG_id_flush_update(struct ID *id, short flag);
/* when setting manual RECALC flags, call this afterwards */
-void DAG_ids_flush_update(int time);
+void DAG_ids_flush_update(struct Main *bmain, int time);
/* (re)-create dependency graph for armature pose */
void DAG_pose_sort(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 07ca5a1c0ee..a220153523e 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -35,6 +35,7 @@
extern "C" {
#endif
+struct Main;
struct Material;
struct ID;
struct Object;
@@ -69,9 +70,9 @@ int object_remove_material_slot(struct Object *ob);
/* rendering */
void init_render_material(struct Material *, int, float *);
-void init_render_materials(int, float *);
+void init_render_materials(struct Main *, int, float *);
void end_render_material(struct Material *);
-void end_render_materials(void);
+void end_render_materials(struct Main *);
int material_in_material(struct Material *parmat, struct Material *mat);
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 03a86b6566a..63f36a5f103 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -70,15 +70,16 @@
#define PTCACHE_READ_OLD 3
/* Structs */
+struct ClothModifierData;
+struct ListBase;
+struct Main;
struct Object;
-struct Scene;
-struct SoftBody;
-struct ParticleSystem;
struct ParticleKey;
-struct ClothModifierData;
-struct SmokeModifierData;
+struct ParticleSystem;
struct PointCache;
-struct ListBase;
+struct Scene;
+struct SmokeModifierData;
+struct SoftBody;
/* temp structure for read/write */
typedef struct PTCacheData {
@@ -143,6 +144,7 @@ typedef struct PTCacheID {
} PTCacheID;
typedef struct PTCacheBaker {
+ struct Main *main;
struct Scene *scene;
int bake;
int render;
@@ -286,7 +288,7 @@ struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new, struct L
/********************** Baking *********************/
/* Bakes cache with cache_step sized jumps in time, not accurate but very fast. */
-void BKE_ptcache_quick_cache_all(struct Scene *scene);
+void BKE_ptcache_quick_cache_all(struct Main *bmain, struct Scene *scene);
/* Bake cache or simulate to current frame with settings defined in the baker. */
void BKE_ptcache_make_cache(struct PTCacheBaker* baker);
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h
index f0fb2a65673..878fca81378 100644
--- a/source/blender/blenkernel/BKE_scene.h
+++ b/source/blender/blenkernel/BKE_scene.h
@@ -82,8 +82,8 @@ int scene_check_setscene(struct Scene *sce);
float BKE_curframe(struct Scene *scene);
-void scene_update_tagged(struct Scene *sce);
-void scene_update_for_newframe(struct Scene *sce, unsigned int lay);
+void scene_update_tagged(struct Main *bmain, struct Scene *sce);
+void scene_update_for_newframe(struct Main *bmain, struct Scene *sce, unsigned int lay);
void scene_add_render_layer(struct Scene *sce);
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 412084f7cd1..c24ec78dc1c 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -289,7 +289,7 @@ static void motionpaths_calc_optimise_depsgraph(Scene *scene, ListBase *targets)
}
/* "brew me a list that's sorted a bit faster now depsy" */
- DAG_scene_sort(scene);
+ DAG_scene_sort(G.main, scene);
}
/* update scene for current frame */
@@ -299,7 +299,7 @@ static void motionpaths_calc_update_scene(Scene *scene)
Base *base, *last=NULL;
/* only stuff that moves or needs display still */
- DAG_scene_update_flags(scene, scene->lay);
+ DAG_scene_update_flags(G.main, scene, scene->lay);
/* find the last object with the tag
* - all those afterwards are assumed to not be relevant for our calculations
@@ -327,7 +327,7 @@ static void motionpaths_calc_update_scene(Scene *scene)
* that doesn't force complete update, but for now, this is the
* most accurate way!
*/
- scene_update_for_newframe(scene, scene->lay); // XXX this is the best way we can get anything moving
+ scene_update_for_newframe(G.main, scene, scene->lay); // XXX this is the best way we can get anything moving
#endif
}
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 9a624017a16..64d07db024b 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -478,7 +478,7 @@ static int read_undosave(bContext *C, UndoElem *uel)
G.fileflags= fileflags;
if(success)
- DAG_on_load_update();
+ DAG_on_load_update(G.main);
return success;
}
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 142f80a350e..1f8360324d5 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -658,7 +658,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
dag_add_relation(dag,scenenode,node,DAG_RL_SCENE, "Scene Relation");
}
-struct DagForest *build_dag(struct Scene *sce, short mask)
+struct DagForest *build_dag(Main *bmain, Scene *sce, short mask)
{
Base *base;
Object *ob;
@@ -695,7 +695,7 @@ struct DagForest *build_dag(struct Scene *sce, short mask)
}
/* add groups used in current scene objects */
- for(group= G.main->group.first; group; group= group->id.next) {
+ for(group= bmain->group.first; group; group= group->id.next) {
if(group->id.flag & LIB_DOIT) {
for(go= group->gobject.first; go; go= go->next) {
build_dag_object(dag, scenenode, sce, go->ob, mask);
@@ -1605,7 +1605,7 @@ static void dag_editors_update(Main *bmain, ID *id)
}
/* groups with objects in this scene need to be put in the right order as well */
-static void scene_sort_groups(Scene *sce)
+static void scene_sort_groups(Main *bmain, Scene *sce)
{
Base *base;
Group *group;
@@ -1613,14 +1613,14 @@ static void scene_sort_groups(Scene *sce)
Object *ob;
/* test; are group objects all in this scene? */
- for(ob= G.main->object.first; ob; ob= ob->id.next) {
+ for(ob= bmain->object.first; ob; ob= ob->id.next) {
ob->id.flag &= ~LIB_DOIT;
ob->id.newid= NULL; /* newid abuse for GroupObject */
}
for(base = sce->base.first; base; base= base->next)
base->object->id.flag |= LIB_DOIT;
- for(group= G.main->group.first; group; group= group->id.next) {
+ for(group= bmain->group.first; group; group= group->id.next) {
for(go= group->gobject.first; go; go= go->next) {
if((go->ob->id.flag & LIB_DOIT)==0)
break;
@@ -1649,7 +1649,7 @@ static void scene_sort_groups(Scene *sce)
}
/* sort the base list on dependency order */
-void DAG_scene_sort(struct Scene *sce)
+void DAG_scene_sort(Main *bmain, Scene *sce)
{
DagNode *node;
DagNodeQueue *nqueue;
@@ -1661,7 +1661,7 @@ void DAG_scene_sort(struct Scene *sce)
tempbase.first= tempbase.last= NULL;
- build_dag(sce, DAG_RL_ALL_BUT_DATA);
+ build_dag(bmain, sce, DAG_RL_ALL_BUT_DATA);
dag_check_cycle(sce->theDag);
@@ -1731,7 +1731,7 @@ void DAG_scene_sort(struct Scene *sce)
queue_delete(nqueue);
/* all groups with objects in this scene gets resorted too */
- scene_sort_groups(sce);
+ scene_sort_groups(bmain, sce);
if(G.f & G_DEBUG) {
printf("\nordered\n");
@@ -1926,7 +1926,7 @@ static void dag_scene_flush_layers(Scene *sce, int lay)
}
/* flushes all recalc flags in objects down the dependency tree */
-void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
+void DAG_scene_flush_update(Main *bmain, Scene *sce, unsigned int lay, int time)
{
DagNode *firstnode;
DagAdjList *itA;
@@ -1935,7 +1935,7 @@ void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
if(sce->theDag==NULL) {
printf("DAG zero... not allowed to happen!\n");
- DAG_scene_sort(sce);
+ DAG_scene_sort(bmain, sce);
}
firstnode= sce->theDag->DagNode.first; // always scene node
@@ -2135,7 +2135,7 @@ static void dag_object_time_update_flags(Object *ob)
}
}
/* flag all objects that need recalc, for changes in time for example */
-void DAG_scene_update_flags(Scene *scene, unsigned int lay)
+void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay)
{
Base *base;
Object *ob;
@@ -2157,7 +2157,7 @@ void DAG_scene_update_flags(Scene *scene, unsigned int lay)
}
/* we do groups each once */
- for(group= G.main->group.first; group; group= group->id.next) {
+ for(group= bmain->group.first; group; group= group->id.next) {
if(group->id.flag & LIB_DOIT) {
for(go= group->gobject.first; go; go= go->next) {
dag_object_time_update_flags(go->ob);
@@ -2166,7 +2166,7 @@ void DAG_scene_update_flags(Scene *scene, unsigned int lay)
}
for(sce= scene; sce; sce= sce->set)
- DAG_scene_flush_update(sce, lay, 1);
+ DAG_scene_flush_update(bmain, sce, lay, 1);
/* test: set time flag, to disable baked systems to update */
for(SETLOOPER(scene, base)) {
@@ -2223,21 +2223,19 @@ static void dag_current_scene_layers(Main *bmain, Scene **sce, unsigned int *lay
}
}
-void DAG_ids_flush_update(int time)
+void DAG_ids_flush_update(Main *bmain, int time)
{
- Main *bmain= G.main;
Scene *sce;
unsigned int lay;
dag_current_scene_layers(bmain, &sce, &lay);
if(sce)
- DAG_scene_flush_update(sce, lay, time);
+ DAG_scene_flush_update(bmain, sce, lay, time);
}
-void DAG_on_load_update(void)
+void DAG_on_load_update(Main *bmain)
{
- Main *bmain= G.main;
Scene *scene, *sce;
Base *base;
Object *ob;
@@ -2268,7 +2266,7 @@ void DAG_on_load_update(void)
}
}
- for(group= G.main->group.first; group; group= group->id.next) {
+ for(group= bmain->group.first; group; group= group->id.next) {
if(group->id.flag & LIB_DOIT) {
for(go= group->gobject.first; go; go= go->next) {
if(ELEM5(go->ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL))
@@ -2282,7 +2280,7 @@ void DAG_on_load_update(void)
}
/* now tag update flags, to ensure deformers get calculated on redraw */
- DAG_scene_update_flags(scene, lay);
+ DAG_scene_update_flags(bmain, scene, lay);
}
}
@@ -2394,7 +2392,7 @@ void DAG_id_flush_update(ID *id, short flag)
}
/* flush to other objects that depend on this one */
- DAG_scene_flush_update(sce, lay, 0);
+ DAG_scene_flush_update(bmain, sce, lay, 0);
}
/* recursively descends tree, each node only checked once */
@@ -2477,7 +2475,7 @@ void DAG_id_update_flags(ID *id)
}
/* set recalcs and flushes */
- DAG_scene_update_flags(sce, lay);
+ DAG_scene_update_flags(bmain, sce, lay);
/* now we clear recalcs, unless color is set */
for(node = sce->theDag->DagNode.first; node; node= node->next) {
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 11c96e9a347..6b79a7b4d62 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -783,14 +783,14 @@ void init_render_material(Material *mat, int r_mode, float *amb)
}
}
-void init_render_materials(int r_mode, float *amb)
+void init_render_materials(Main *bmain, int r_mode, float *amb)
{
Material *ma;
/* clear these flags before going over materials, to make sure they
* are cleared only once, otherwise node materials contained in other
* node materials can go wrong */
- for(ma= G.main->mat.first; ma; ma= ma->id.next) {
+ for(ma= bmain->mat.first; ma; ma= ma->id.next) {
if(ma->id.us) {
ma->texco= 0;
ma->mapto= 0;
@@ -798,7 +798,7 @@ void init_render_materials(int r_mode, float *amb)
}
/* two steps, first initialize, then or the flags for layers */
- for(ma= G.main->mat.first; ma; ma= ma->id.next) {
+ for(ma= bmain->mat.first; ma; ma= ma->id.next) {
/* is_used flag comes back in convertblender.c */
ma->flag &= ~MA_IS_USED;
if(ma->id.us)
@@ -815,10 +815,10 @@ void end_render_material(Material *mat)
ntreeEndExecTree(mat->nodetree); /* has internal flag to detect it only does it once */
}
-void end_render_materials(void)
+void end_render_materials(Main *bmain)
{
Material *ma;
- for(ma= G.main->mat.first; ma; ma= ma->id.next)
+ for(ma= bmain->mat.first; ma; ma= ma->id.next)
if(ma->id.us)
end_render_material(ma);
}
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index ed63f011342..52ee0180f43 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -3395,7 +3395,7 @@ ModifierData *object_add_particle_system(Scene *scene, Object *ob, char *name)
psys->flag = PSYS_ENABLED|PSYS_CURRENT;
psys->cfra=bsystem_time(scene,ob,scene->r.cfra+1,0.0);
- DAG_scene_sort(scene);
+ DAG_scene_sort(G.main, scene);
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
return md;
@@ -3432,7 +3432,7 @@ void object_remove_particle_system(Scene *scene, Object *ob)
else
ob->mode &= ~OB_MODE_PARTICLE_EDIT;
- DAG_scene_sort(scene);
+ DAG_scene_sort(G.main, scene);
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
static void default_particle_settings(ParticleSettings *part)
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index ced5d116ad0..d44221d2cd3 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -2335,7 +2335,7 @@ PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, ListBase *ptcaches_old
/* Baking */
-void BKE_ptcache_quick_cache_all(Scene *scene)
+void BKE_ptcache_quick_cache_all(Main *bmain, Scene *scene)
{
PTCacheBaker baker;
@@ -2348,6 +2348,7 @@ void BKE_ptcache_quick_cache_all(Scene *scene)
baker.progresscontext=NULL;
baker.render=0;
baker.anim_init = 0;
+ baker.main=bmain;
baker.scene=scene;
baker.quick_step=scene->physics_settings.quick_cache_step;
@@ -2362,6 +2363,7 @@ typedef struct {
int endframe;
int step;
int *cfra_ptr;
+ Main *main;
Scene *scene;
} ptcache_make_cache_data;
@@ -2369,7 +2371,7 @@ static void *ptcache_make_cache_thread(void *ptr) {
ptcache_make_cache_data *data = (ptcache_make_cache_data*)ptr;
for(; (*data->cfra_ptr <= data->endframe) && !data->break_operation; *data->cfra_ptr+=data->step) {
- scene_update_for_newframe(data->scene, data->scene->lay);
+ scene_update_for_newframe(data->main, data->scene, data->scene->lay);
if(G.background) {
printf("bake: frame %d :: %d\n", (int)*data->cfra_ptr, data->endframe);
}
@@ -2382,6 +2384,7 @@ static void *ptcache_make_cache_thread(void *ptr) {
/* if bake is not given run simulations to current frame */
void BKE_ptcache_make_cache(PTCacheBaker* baker)
{
+ Main *bmain = baker->main;
Scene *scene = baker->scene;
Scene *sce; /* SETLOOPER macro only */
Base *base;
@@ -2401,6 +2404,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker)
thread_data.step = baker->quick_step;
thread_data.cfra_ptr = &CFRA;
thread_data.scene = baker->scene;
+ thread_data.main = baker->main;
G.afbreek = 0;
@@ -2570,7 +2574,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker)
CFRA = cfrao;
if(bake) /* already on cfra unless baking */
- scene_update_for_newframe(scene, scene->lay);
+ scene_update_for_newframe(bmain, scene, scene->lay);
if (thread_data.break_operation)
WM_cursor_wait(0);
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 3c7f6e13445..811f8a81b06 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -531,12 +531,12 @@ void set_scene_bg(Scene *scene)
}
/* sort baselist */
- DAG_scene_sort(scene);
+ DAG_scene_sort(G.main, scene);
/* ensure dags are built for sets */
for(sce= scene->set; sce; sce= sce->set)
if(sce->theDag==NULL)
- DAG_scene_sort(sce);
+ DAG_scene_sort(G.main, sce);
/* copy layers and flags from bases to objects */
for(base= scene->base.first; base; base= base->next) {
@@ -907,14 +907,14 @@ float BKE_curframe(Scene *scene)
return ctime;
}
-static void scene_update_tagged_recursive(Scene *scene, Scene *scene_parent)
+static void scene_update_tagged_recursive(Main *bmain, Scene *scene, Scene *scene_parent)
{
Base *base;
/* sets first, we allow per definition current scene to have
dependencies on sets, but not the other way around. */
if(scene->set)
- scene_update_tagged_recursive(scene->set, scene_parent);
+ scene_update_tagged_recursive(bmain, scene->set, scene_parent);
for(base= scene->base.first; base; base= base->next) {
Object *ob= base->object;
@@ -930,14 +930,14 @@ static void scene_update_tagged_recursive(Scene *scene, Scene *scene_parent)
}
/* this is called in main loop, doing tagged updates before redraw */
-void scene_update_tagged(Scene *scene)
+void scene_update_tagged(Main *bmain, Scene *scene)
{
scene->physics_settings.quick_cache_step= 0;
/* update all objects: drivers, matrices, displists, etc. flags set
by depgraph or manual, no layer check here, gets correct flushed */
- scene_update_tagged_recursive(scene, scene);
+ scene_update_tagged_recursive(bmain, scene, scene);
/* recalc scene animation data here (for sequencer) */
{
@@ -949,14 +949,14 @@ void scene_update_tagged(Scene *scene)
}
if(scene->physics_settings.quick_cache_step)
- BKE_ptcache_quick_cache_all(scene);
+ BKE_ptcache_quick_cache_all(bmain, scene);
/* in the future this should handle updates for all datablocks, not
only objects and scenes. - brecht */
}
/* applies changes right away, does all sets too */
-void scene_update_for_newframe(Scene *sce, unsigned int lay)
+void scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
{
float ctime = BKE_curframe(sce);
Scene *sce_iter;
@@ -966,13 +966,13 @@ void scene_update_for_newframe(Scene *sce, unsigned int lay)
for(sce_iter= sce; sce_iter; sce_iter= sce_iter->set) {
if(sce_iter->theDag==NULL)
- DAG_scene_sort(sce_iter);
+ DAG_scene_sort(bmain, sce_iter);
}
/* Following 2 functions are recursive
* so dont call within 'scene_update_tagged_recursive' */
- DAG_scene_update_flags(sce, lay); // only stuff that moves or needs display still
+ DAG_scene_update_flags(bmain, sce, lay); // only stuff that moves or needs display still
/* All 'standard' (i.e. without any dependencies) animation is handled here,
* with an 'local' to 'macro' order of evaluation. This should ensure that
@@ -980,11 +980,11 @@ void scene_update_for_newframe(Scene *sce, unsigned int lay)
* can be overridden by settings from Scene, which owns the Texture through a hierarchy
* such as Scene->World->MTex/Texture) can still get correctly overridden.
*/
- BKE_animsys_evaluate_all_animation(G.main, ctime);
+ BKE_animsys_evaluate_all_animation(bmain, ctime);
/*...done with recusrive funcs */
/* object_handle_update() on all objects, groups and sets */
- scene_update_tagged_recursive(sce, sce);
+ scene_update_tagged_recursive(bmain, sce, sce);
}
/* return default layer, also used to patch old files */
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index df185732d22..aab4e1226b2 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -1852,7 +1852,7 @@ static ImBuf * seq_render_scene_strip_impl(
if(sequencer_view3d_cb && BLI_thread_is_main() && doseq_gl && (seq->scene == scene || have_seq==0) && seq->scene->camera) {
/* opengl offscreen render */
- scene_update_for_newframe(seq->scene, seq->scene->lay);
+ scene_update_for_newframe(G.main, seq->scene, seq->scene->lay);
ibuf= sequencer_view3d_cb(seq->scene, seqrectx, seqrecty,
scene->r.seq_prev_type);
}
@@ -1865,7 +1865,7 @@ static ImBuf * seq_render_scene_strip_impl(
else
re= RE_NewRender(sce->id.name);
- RE_BlenderFrame(re, sce, NULL, sce->lay, frame);
+ RE_BlenderFrame(re, G.main, sce, NULL, sce->lay, frame);
RE_AcquireResultImage(re, &rres);