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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-06-22 16:03:42 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-22 16:12:03 +0300
commita7ca8fe1dd111f0b99c1b17cdd6b0f7e1c6f987b (patch)
tree98d27b8d18a21c6389f3090b0f8d92c6b5f595e0 /source/blender/modifiers/intern/MOD_meshcache.c
parent7a4b784909b3d31f318f92ddcfd534223f3e8412 (diff)
Modifiers: Remove lots of usages of md->scene
Diffstat (limited to 'source/blender/modifiers/intern/MOD_meshcache.c')
-rw-r--r--source/blender/modifiers/intern/MOD_meshcache.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshcache.c b/source/blender/modifiers/intern/MOD_meshcache.c
index 145bceb99aa..9d6dfc0e1eb 100644
--- a/source/blender/modifiers/intern/MOD_meshcache.c
+++ b/source/blender/modifiers/intern/MOD_meshcache.c
@@ -42,6 +42,8 @@
#include "BKE_mesh.h"
#include "BKE_main.h"
+#include "DEG_depsgraph_query.h"
+
#include "MEM_guardedalloc.h"
#include "MOD_meshcache_util.h" /* utility functions */
@@ -80,7 +82,7 @@ static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int
static void meshcache_do(
- MeshCacheModifierData *mcmd, Object *ob, DerivedMesh *UNUSED(dm),
+ MeshCacheModifierData *mcmd, Scene *scene, Object *ob, DerivedMesh *UNUSED(dm),
float (*vertexCos_Real)[3], int numVerts)
{
const bool use_factor = mcmd->factor < 1.0f;
@@ -88,7 +90,6 @@ static void meshcache_do(
MEM_malloc_arrayN(numVerts, sizeof(*vertexCos_Store), __func__) : NULL;
float (*vertexCos)[3] = vertexCos_Store ? vertexCos_Store : vertexCos_Real;
- Scene *scene = mcmd->modifier.scene;
const float fps = FPS;
char filepath[FILE_MAX];
@@ -270,8 +271,9 @@ static void deformVerts(
int numVerts)
{
MeshCacheModifierData *mcmd = (MeshCacheModifierData *)md;
+ Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
- meshcache_do(mcmd, ctx->object, derivedData, vertexCos, numVerts);
+ meshcache_do(mcmd, scene, ctx->object, derivedData, vertexCos, numVerts);
}
static void deformVertsEM(
@@ -279,8 +281,9 @@ static void deformVertsEM(
DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
MeshCacheModifierData *mcmd = (MeshCacheModifierData *)md;
+ Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
- meshcache_do(mcmd, ctx->object, derivedData, vertexCos, numVerts);
+ meshcache_do(mcmd, scene, ctx->object, derivedData, vertexCos, numVerts);
}