diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-15 16:59:38 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-15 16:59:38 +0300 |
commit | 77497175fa1f2f3aacf4ab966df9d7223d4034cc (patch) | |
tree | 34e143b88d2f9857e6926a1d156b8d8c3243d7b2 /source/blender/blenkernel | |
parent | 90d80ddaa28908048e428fd08c4c771c015a0d66 (diff) |
Cleanup/refactor: no new general arg-less macros enforcing var names please!
We do have an history of those pieces of evil in our code, would be nice
to get fully rid of it, but at the very least let's not add more of them
in new code. :)
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/effect.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 6 |
6 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 45c3e92b70b..50a476c3fde 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -500,7 +500,7 @@ static int surface_getBrushFlags(DynamicPaintSurface *surface, const SceneLayer if (surface->brush_group) go = surface->brush_group->gobject.first; else - base = FIRSTBASE_NEW; + base = FIRSTBASE_NEW(sl); while (base || go) { brushObj = NULL; @@ -5788,7 +5788,7 @@ static int dynamicPaint_doStep(struct EvaluationContext *eval_ctx, Scene *scene, if (surface->brush_group) go = surface->brush_group->gobject.first; else - base = FIRSTBASE_NEW; + base = FIRSTBASE_NEW(sl); while (base || go) { brushObj = NULL; diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index af1d4cc2e7d..521f91b2afa 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -243,7 +243,7 @@ ListBase *pdInitEffectors(struct EvaluationContext *eval_ctx, Scene *scene, Obje } } else { - for (base = FIRSTBASE_NEW; base; base = base->next) { + for (base = FIRSTBASE_NEW(sl); base; base = base->next) { if ( base->object->pd && base->object->pd->forcefield ) add_object_to_effectors(&effectors, eval_ctx, scene, weights, base->object, ob_src, for_simulation); diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index a479f45f275..7470453ba77 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -834,7 +834,7 @@ static LodLevel *lod_level_select(Object *ob, const float camera_position[3]) bool BKE_object_lod_is_usable(Object *ob, SceneLayer *sl) { - bool active = (sl) ? ob == OBACT_NEW : false; + bool active = (sl) ? ob == OBACT_NEW(sl) : false; return (ob->mode == OB_MODE_OBJECT || !active); } @@ -2538,7 +2538,7 @@ void BKE_scene_foreach_display_point( Base *base; Object *ob; - for (base = FIRSTBASE_NEW; base; base = base->next) { + for (base = FIRSTBASE_NEW(sl); base; base = base->next) { if (((base->flag & BASE_VISIBLED) != 0) && ((base->flag & BASE_SELECTED) != 0)) { ob = base->object; diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 807c672d234..7ea408471b8 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -266,7 +266,7 @@ void BKE_scene_copy_data(Main *bmain, Scene *sce_dst, const Scene *sce_src, cons BLI_listbase_clear(&new_sl->drawdata); layer_collections_recreate(new_sl, &sl->layer_collections, mcn, mc); - Object *active_ob = OBACT_NEW; + Object *active_ob = OBACT_NEW(sl); Base *new_base = new_sl->object_bases.first; for (Base *base = sl->object_bases.first; base; base = base->next) { new_base->flag = base->flag; diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index b222b6f4f3c..cad4b2e1dd0 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -704,7 +704,7 @@ static int get_lamp(SceneLayer *sl, float *light) int found_lamp = 0; // try to find a lamp, preferably local - for (base_tmp = FIRSTBASE_NEW; base_tmp; base_tmp = base_tmp->next) { + for (base_tmp = FIRSTBASE_NEW(sl); base_tmp; base_tmp = base_tmp->next) { if (base_tmp->object->type == OB_LAMP) { Lamp *la = base_tmp->object->data; diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 4d8270568ba..28dea3e1669 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -532,7 +532,7 @@ static void ccd_build_deflector_hash(SceneLayer *sl, Group *group, Object *verte } } else { - for (Base *base = FIRSTBASE_NEW; base; base = base->next) { + for (Base *base = FIRSTBASE_NEW(sl); base; base = base->next) { /*Only proceed for mesh object in same layer */ if (base->object->type == OB_MESH) { ob = base->object; @@ -578,7 +578,7 @@ static void ccd_update_deflector_hash(SceneLayer *sl, Group *group, Object *vert } } else { - for (Base *base = FIRSTBASE_NEW; base; base = base->next) { + for (Base *base = FIRSTBASE_NEW(sl); base; base = base->next) { /*Only proceed for mesh object in same layer */ if (base->object->type == OB_MESH) { ob = base->object; @@ -988,7 +988,7 @@ static bool are_there_deflectors(SceneLayer *sl, Group *group) } } else { - for (Base *base = FIRSTBASE_NEW; base; base = base->next) { + for (Base *base = FIRSTBASE_NEW(sl); base; base = base->next) { if (base->object->pd) { if (base->object->pd->deflect) return 1; |