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-05-31 17:44:05 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-31 17:44:05 +0300
commitda11e33b26b6579ef36c97de1b6fbc0eb02a0b69 (patch)
treeda13c4b1971e26c0659c2dd218eeb6f42887178a /source/blender/alembic
parent16100f8261770e367b0892bb38c778699ed609fe (diff)
Cleanup: remove G.main from BKE mball code.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/abc_exporter.cc8
-rw-r--r--source/blender/alembic/intern/abc_mball.cc4
-rw-r--r--source/blender/alembic/intern/abc_mball.h3
3 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc
index 946b89213e6..2e882a491c3 100644
--- a/source/blender/alembic/intern/abc_exporter.cc
+++ b/source/blender/alembic/intern/abc_exporter.cc
@@ -111,7 +111,7 @@ static bool object_is_smoke_sim(Object *ob)
return false;
}
-static bool object_type_is_exportable(Scene *scene, Object *ob)
+static bool object_type_is_exportable(EvaluationContext *eval_ctx, Scene *scene, Object *ob)
{
switch (ob->type) {
case OB_MESH:
@@ -126,7 +126,7 @@ static bool object_type_is_exportable(Scene *scene, Object *ob)
case OB_CAMERA:
return true;
case OB_MBALL:
- return AbcMBallWriter::isBasisBall(scene, ob);
+ return AbcMBallWriter::isBasisBall(eval_ctx, scene, ob);
default:
return false;
}
@@ -386,7 +386,7 @@ void AbcExporter::exploreTransform(EvaluationContext *eval_ctx, Object *ob, Obje
return;
}
- if (object_type_is_exportable(m_scene, ob)) {
+ if (object_type_is_exportable(eval_ctx, m_scene, ob)) {
createTransformWriter(ob, parent, dupliObParent);
}
@@ -551,7 +551,7 @@ void AbcExporter::createParticleSystemsWriters(Object *ob, AbcTransformWriter *x
void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent)
{
- if (!object_type_is_exportable(m_scene, ob)) {
+ if (!object_type_is_exportable(m_bmain->eval_ctx, m_scene, ob)) {
return;
}
diff --git a/source/blender/alembic/intern/abc_mball.cc b/source/blender/alembic/intern/abc_mball.cc
index 1ef7b757577..c5712daf499 100644
--- a/source/blender/alembic/intern/abc_mball.cc
+++ b/source/blender/alembic/intern/abc_mball.cc
@@ -115,8 +115,8 @@ void AbcMBallWriter::do_write()
m_mesh_ob->data = NULL;
}
-bool AbcMBallWriter::isBasisBall(Scene *scene, Object *ob)
+bool AbcMBallWriter::isBasisBall(EvaluationContext *eval_ctx, Scene *scene, Object *ob)
{
- Object *basis_ob = BKE_mball_basis_find(scene, ob);
+ Object *basis_ob = BKE_mball_basis_find(eval_ctx, scene, ob);
return ob == basis_ob;
}
diff --git a/source/blender/alembic/intern/abc_mball.h b/source/blender/alembic/intern/abc_mball.h
index 9b943698416..9a74006f839 100644
--- a/source/blender/alembic/intern/abc_mball.h
+++ b/source/blender/alembic/intern/abc_mball.h
@@ -26,6 +26,7 @@
#include "abc_object.h"
class AbcMeshWriter;
+struct EvaluationContext;
struct Main;
struct MetaBall;
struct Object;
@@ -50,7 +51,7 @@ public:
~AbcMBallWriter();
- static bool isBasisBall(Scene *scene, Object *ob);
+ static bool isBasisBall(EvaluationContext *eval_ctx, Scene *scene, Object *ob);
private:
virtual void do_write();