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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-11 13:14:18 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-11 13:15:14 +0300
commitd0956e9cb3077971a9ae6c1ba9560604d5ad1ef7 (patch)
tree0dea964abf85748db7ab15a2feee1a41bf6ec52c /source/blender/blenkernel/intern/mball_tessellate.c
parent8055ed2741d1da48f2bf84c75ccb37b54cef1ab8 (diff)
Cleanup: Moar G.main removal of Hell.
This commit actually adds some G.main... but at much, much higher level than the ones it removes, so should still be better ;)
Diffstat (limited to 'source/blender/blenkernel/intern/mball_tessellate.c')
-rw-r--r--source/blender/blenkernel/intern/mball_tessellate.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/mball_tessellate.c b/source/blender/blenkernel/intern/mball_tessellate.c
index a1ae3a7f572..cc82d12a776 100644
--- a/source/blender/blenkernel/intern/mball_tessellate.c
+++ b/source/blender/blenkernel/intern/mball_tessellate.c
@@ -49,9 +49,10 @@
#include "BKE_global.h"
#include "BKE_depsgraph.h"
-#include "BKE_scene.h"
#include "BKE_displist.h"
+#include "BKE_main.h"
#include "BKE_mball_tessellate.h" /* own include */
+#include "BKE_scene.h"
#include "BLI_strict_flags.h"
@@ -1055,7 +1056,7 @@ static void polygonize(PROCESS *process)
* Iterates over ALL objects in the scene and all of its sets, including
* making all duplis(not only metas). Copies metas to mainb array.
* Computes bounding boxes for building BVH. */
-static void init_meta(EvaluationContext *eval_ctx, PROCESS *process, Scene *scene, Object *ob)
+static void init_meta(Main *bmain, EvaluationContext *eval_ctx, PROCESS *process, Scene *scene, Object *ob)
{
Scene *sce_iter = scene;
Base *base;
@@ -1074,8 +1075,8 @@ static void init_meta(EvaluationContext *eval_ctx, PROCESS *process, Scene *scen
BLI_split_name_num(obname, &obnr, ob->id.name + 2, '.');
/* make main array */
- BKE_scene_base_iter_next(eval_ctx, &iter, &sce_iter, 0, NULL, NULL);
- while (BKE_scene_base_iter_next(eval_ctx, &iter, &sce_iter, 1, &base, &bob)) {
+ BKE_scene_base_iter_next(bmain, eval_ctx, &iter, &sce_iter, 0, NULL, NULL);
+ while (BKE_scene_base_iter_next(bmain, eval_ctx, &iter, &sce_iter, 1, &base, &bob)) {
if (bob->type == OB_MBALL) {
zero_size = 0;
ml = NULL;
@@ -1232,7 +1233,7 @@ static void init_meta(EvaluationContext *eval_ctx, PROCESS *process, Scene *scen
}
}
-void BKE_mball_polygonize(EvaluationContext *eval_ctx, Scene *scene, Object *ob, ListBase *dispbase)
+void BKE_mball_polygonize(Main *bmain, EvaluationContext *eval_ctx, Scene *scene, Object *ob, ListBase *dispbase)
{
MetaBall *mb;
DispList *dl;
@@ -1266,7 +1267,7 @@ void BKE_mball_polygonize(EvaluationContext *eval_ctx, Scene *scene, Object *ob,
process.pgn_elements = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "Metaball memarena");
/* initialize all mainb (MetaElems) */
- init_meta(eval_ctx, &process, scene, ob);
+ init_meta(bmain, eval_ctx, &process, scene, ob);
if (process.totelem > 0) {
build_bvh_spatial(&process, &process.metaball_bvh, 0, process.totelem, &process.allbb);