diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-23 17:36:44 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-23 17:37:36 +0300 |
commit | 0cc2666605d84cc43e8be5d4b3f65f903346f205 (patch) | |
tree | 25769500efadc3dbb62803640720a3e60970e502 /source/blender/modifiers/intern/MOD_surface.c | |
parent | 9cb2b9b523ec73b8fab2d0d7785576e3ae9fb9f2 (diff) |
Fix last usages of Scene.r.cfra in modifiers code.
Note that some modifiers-related code in BKE still uses that...
Diffstat (limited to 'source/blender/modifiers/intern/MOD_surface.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_surface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c index 7f3fa125cd9..46fd3198699 100644 --- a/source/blender/modifiers/intern/MOD_surface.c +++ b/source/blender/modifiers/intern/MOD_surface.c @@ -42,6 +42,9 @@ #include "BKE_library.h" #include "BKE_mesh.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_query.h" + #include "BLI_math.h" #include "BLI_utildefines.h" @@ -91,6 +94,7 @@ static void deformVerts( int UNUSED(numVerts)) { SurfaceModifierData *surmd = (SurfaceModifierData *) md; + const int cfra = (int)DEG_get_ctime(ctx->depsgraph); if (surmd->mesh) { BKE_id_free(NULL, surmd->mesh); @@ -128,7 +132,7 @@ static void deformVerts( if (numverts != surmd->numverts || surmd->x == NULL || surmd->v == NULL || - md->scene->r.cfra != surmd->cfra + 1) + cfra != surmd->cfra + 1) { if (surmd->x) { MEM_freeN(surmd->x); @@ -160,7 +164,7 @@ static void deformVerts( copy_v3_v3(x->co, vec); } - surmd->cfra = md->scene->r.cfra; + surmd->cfra = cfra; if (surmd->bvhtree) free_bvhtree_from_mesh(surmd->bvhtree); |