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>2019-03-26 13:25:07 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-04-01 15:43:45 +0300
commit64c8d72ef1ad01dae0ef0a7a78a47d7c83a240d4 (patch)
treeec85173659b0637ea9dfec8c8e900b46bbe9c808 /source/blender/modifiers
parenta2a571987c6f6a1caee57057cfed18896b786c5b (diff)
Modifiers: Use object passed to evaluation
This was wrong and violating design to force modifiers to query evaluated objects and IDs. It is up to the caller to make sure the object is properly evaluatable. Effectively, reverting changes from de491abf9962 (and possibly other related changes).
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_armature.c8
-rw-r--r--source/blender/modifiers/intern/MOD_array.c8
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.c2
-rw-r--r--source/blender/modifiers/intern/MOD_cast.c8
-rw-r--r--source/blender/modifiers/intern/MOD_curve.c2
-rw-r--r--source/blender/modifiers/intern/MOD_datatransfer.c2
-rw-r--r--source/blender/modifiers/intern/MOD_displace.c2
-rw-r--r--source/blender/modifiers/intern/MOD_hook.c4
-rw-r--r--source/blender/modifiers/intern/MOD_lattice.c2
-rw-r--r--source/blender/modifiers/intern/MOD_mask.c2
-rw-r--r--source/blender/modifiers/intern/MOD_meshdeform.c2
-rw-r--r--source/blender/modifiers/intern/MOD_mirror.c4
-rw-r--r--source/blender/modifiers/intern/MOD_normal_edit.c8
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c2
-rw-r--r--source/blender/modifiers/intern/MOD_simpledeform.c4
-rw-r--r--source/blender/modifiers/intern/MOD_surfacedeform.c4
-rw-r--r--source/blender/modifiers/intern/MOD_util.c6
-rw-r--r--source/blender/modifiers/intern/MOD_uvproject.c4
-rw-r--r--source/blender/modifiers/intern/MOD_uvwarp.c4
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c6
-rw-r--r--source/blender/modifiers/intern/MOD_wave.c4
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c1
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c2
23 files changed, 45 insertions, 46 deletions
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index bc933e9b6ba..4cc780431d0 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -107,7 +107,7 @@ static void deformVerts(
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
- armature_deform_verts(DEG_get_evaluated_object(ctx->depsgraph, amd->object), ctx->object, mesh, vertexCos, NULL,
+ armature_deform_verts(amd->object, ctx->object, mesh, vertexCos, NULL,
numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name, NULL);
/* free cache */
@@ -126,7 +126,7 @@ static void deformVertsEM(
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
- armature_deform_verts(DEG_get_evaluated_object(ctx->depsgraph, amd->object), ctx->object, mesh_src, vertexCos, NULL,
+ armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, NULL,
numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name, NULL);
/* free cache */
@@ -148,7 +148,7 @@ static void deformMatricesEM(
ArmatureModifierData *amd = (ArmatureModifierData *) md;
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, NULL, numVerts, false, false);
- armature_deform_verts(DEG_get_evaluated_object(ctx->depsgraph, amd->object), ctx->object, mesh_src, vertexCos, defMats,
+ armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, defMats,
numVerts, amd->deformflag, NULL, amd->defgrp_name, NULL);
if (mesh_src != mesh) {
@@ -163,7 +163,7 @@ static void deformMatrices(
ArmatureModifierData *amd = (ArmatureModifierData *) md;
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, NULL, mesh, NULL, numVerts, false, false);
- armature_deform_verts(DEG_get_evaluated_object(ctx->depsgraph, amd->object), ctx->object, mesh_src, vertexCos, defMats,
+ armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, defMats,
numVerts, amd->deformflag, NULL, amd->defgrp_name, NULL);
if (mesh_src != mesh) {
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index 2af89b00c16..542c7665807 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -374,7 +374,7 @@ static Mesh *arrayModifier_doArray(
count = amd->count;
- Object *start_cap_ob = DEG_get_evaluated_object(ctx->depsgraph, amd->start_cap);
+ Object *start_cap_ob = amd->start_cap;
if (start_cap_ob && start_cap_ob != ctx->object && start_cap_ob->type == OB_MESH) {
vgroup_start_cap_remap = BKE_object_defgroup_index_map_create(
start_cap_ob, ctx->object, &vgroup_start_cap_remap_len);
@@ -387,7 +387,7 @@ static Mesh *arrayModifier_doArray(
start_cap_npolys = start_cap_mesh->totpoly;
}
}
- Object *end_cap_ob = DEG_get_evaluated_object(ctx->depsgraph, amd->end_cap);
+ Object *end_cap_ob = amd->end_cap;
if (end_cap_ob && end_cap_ob != ctx->object && end_cap_ob->type == OB_MESH) {
vgroup_end_cap_remap = BKE_object_defgroup_index_map_create(
end_cap_ob, ctx->object, &vgroup_end_cap_remap_len);
@@ -433,7 +433,7 @@ static Mesh *arrayModifier_doArray(
else
unit_m4(obinv);
- mul_m4_series(result_mat, offset, obinv, DEG_get_evaluated_object(ctx->depsgraph, amd->offset_ob)->obmat);
+ mul_m4_series(result_mat, offset, obinv, amd->offset_ob->obmat);
copy_m4_m4(offset, result_mat);
}
@@ -442,7 +442,7 @@ static Mesh *arrayModifier_doArray(
offset_has_scale = !is_one_v3(scale);
if (amd->fit_type == MOD_ARR_FITCURVE && amd->curve_ob != NULL) {
- Object *curve_ob = DEG_get_evaluated_object(ctx->depsgraph, amd->curve_ob);
+ Object *curve_ob = amd->curve_ob;
Curve *cu = curve_ob->data;
if (cu) {
CurveCache *curve_cache = curve_ob->runtime.curve_cache;
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index c225fe80b37..8e3a19e524a 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -163,7 +163,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
return result;
}
- Object *other = DEG_get_evaluated_object(ctx->depsgraph, bmd->object);
+ Object *other = bmd->object;
mesh_other = BKE_modifier_get_evaluated_mesh_from_evaluated_object(other, false);
if (mesh_other) {
Object *object = ctx->object;
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c
index ec0aa4361f4..b8917f58234 100644
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@ -95,7 +95,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
}
static void sphere_do(
- CastModifierData *cmd, const ModifierEvalContext *ctx,
+ CastModifierData *cmd, const ModifierEvalContext *UNUSED(ctx),
Object *ob, Mesh *mesh,
float (*vertexCos)[3], int numVerts)
{
@@ -119,7 +119,7 @@ static void sphere_do(
if (type == MOD_CAST_TYPE_CYLINDER)
flag &= ~MOD_CAST_Z;
- ctrl_ob = DEG_get_evaluated_object(ctx->depsgraph, cmd->object);
+ ctrl_ob = cmd->object;
/* spherify's center is {0, 0, 0} (the ob's own center in its local
* space), by default, but if the user defined a control object,
@@ -217,7 +217,7 @@ static void sphere_do(
}
static void cuboid_do(
- CastModifierData *cmd, const ModifierEvalContext *ctx,
+ CastModifierData *cmd, const ModifierEvalContext *UNUSED(ctx),
Object *ob, Mesh *mesh,
float (*vertexCos)[3], int numVerts)
{
@@ -236,7 +236,7 @@ static void cuboid_do(
flag = cmd->flag;
- ctrl_ob = DEG_get_evaluated_object(ctx->depsgraph, cmd->object);
+ ctrl_ob = cmd->object;
/* now we check which options the user wants */
diff --git a/source/blender/modifiers/intern/MOD_curve.c b/source/blender/modifiers/intern/MOD_curve.c
index 6242ef674ba..91cedda4f48 100644
--- a/source/blender/modifiers/intern/MOD_curve.c
+++ b/source/blender/modifiers/intern/MOD_curve.c
@@ -115,7 +115,7 @@ static void deformVerts(
/* silly that defaxis and curve_deform_verts are off by 1
* but leave for now to save having to call do_versions */
- curve_deform_verts(DEG_get_evaluated_object(ctx->depsgraph, cmd->object), ctx->object,
+ curve_deform_verts(cmd->object, ctx->object,
vertexCos, numVerts, dvert, defgrp_index, cmd->defaxis - 1);
if (!ELEM(mesh_src, NULL, mesh)) {
diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c
index a8e4fe41a04..567af7bae09 100644
--- a/source/blender/modifiers/intern/MOD_datatransfer.c
+++ b/source/blender/modifiers/intern/MOD_datatransfer.c
@@ -160,7 +160,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
/* Only used to check wehther we are operating on org data or not... */
Mesh *me = ctx->object->data;
- Object *ob_source = DEG_get_evaluated_object(ctx->depsgraph, dtmd->ob_source);
+ Object *ob_source = dtmd->ob_source;
const bool invert_vgroup = (dtmd->flags & MOD_DATATRANSFER_INVERT_VGROUP) != 0;
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index c95bded12af..0060639970c 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -290,7 +290,7 @@ static void displaceModifier_do(
mvert = mesh->mvert;
MOD_get_vgroup(ob, mesh, dmd->defgrp_name, &dvert, &defgrp_index);
- Tex *tex_target = (Tex *)DEG_get_evaluated_id(ctx->depsgraph, &dmd->texture->id);
+ Tex *tex_target = dmd->texture;
if (tex_target != NULL) {
tex_co = MEM_calloc_arrayN((size_t)numVerts, sizeof(*tex_co),
"displaceModifier_do tex_co");
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index 2693b6da498..0c15f4caa23 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -248,11 +248,11 @@ static void hook_co_apply(struct HookData_cb *hd, const int j)
}
static void deformVerts_do(
- HookModifierData *hmd, const ModifierEvalContext *ctx,
+ HookModifierData *hmd, const ModifierEvalContext *UNUSED(ctx),
Object *ob, Mesh *mesh,
float (*vertexCos)[3], int numVerts)
{
- Object *ob_target = DEG_get_evaluated_object(ctx->depsgraph, hmd->object);
+ Object *ob_target = hmd->object;
bPoseChannel *pchan = BKE_pose_channel_find_name(ob_target->pose, hmd->subtarget);
float dmat[4][4];
int i, *index_pt;
diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c
index 660abb2118d..4715d2ab073 100644
--- a/source/blender/modifiers/intern/MOD_lattice.c
+++ b/source/blender/modifiers/intern/MOD_lattice.c
@@ -94,7 +94,7 @@ static void deformVerts(
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
- lattice_deform_verts(DEG_get_evaluated_object(ctx->depsgraph, lmd->object), ctx->object, mesh_src,
+ lattice_deform_verts(lmd->object, ctx->object, mesh_src,
vertexCos, numVerts, lmd->name, lmd->strength);
if (!ELEM(mesh_src, NULL, mesh)) {
diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c
index 4e0ae3ea86b..efb299773ef 100644
--- a/source/blender/modifiers/intern/MOD_mask.c
+++ b/source/blender/modifiers/intern/MOD_mask.c
@@ -127,7 +127,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
/* if mode is to use selected armature bones, aggregate the bone groups */
if (mmd->mode == MOD_MASK_MODE_ARM) { /* --- using selected bones --- */
- Object *oba = DEG_get_evaluated_object(ctx->depsgraph, mmd->ob_arm);
+ Object *oba = mmd->ob_arm;
bPoseChannel *pchan;
bDeformGroup *def;
bool *bone_select_array;
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c
index 2e360df5a8f..310b05d4580 100644
--- a/source/blender/modifiers/intern/MOD_meshdeform.c
+++ b/source/blender/modifiers/intern/MOD_meshdeform.c
@@ -296,7 +296,7 @@ static void meshdeformModifier_do(
*
* We'll support this case once granular dependency graph is landed.
*/
- Object *ob_target = DEG_get_evaluated_object(ctx->depsgraph, mmd->object);
+ Object *ob_target = mmd->object;
cagemesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(ob_target, false);
#if 0 /* This shall not be needed if we always get evaluated target object... */
if (cagemesh == NULL && mmd->bindcagecos == NULL && ob == DEG_get_original_object(ob)) {
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c
index ac5f2906498..5fb4c66471f 100644
--- a/source/blender/modifiers/intern/MOD_mirror.c
+++ b/source/blender/modifiers/intern/MOD_mirror.c
@@ -130,7 +130,7 @@ static Mesh *doBiscetOnMirrorPlane(
static Mesh *doMirrorOnAxis(
MirrorModifierData *mmd,
- const ModifierEvalContext *ctx,
+ const ModifierEvalContext *UNUSED(ctx),
Object *ob,
const Mesh *mesh,
int axis)
@@ -159,7 +159,7 @@ static Mesh *doMirrorOnAxis(
unit_m4(mtx);
mtx[axis][axis] = -1.0f;
- Object *mirror_ob = DEG_get_evaluated_object(ctx->depsgraph, mmd->mirror_ob);
+ Object *mirror_ob = mmd->mirror_ob;
if (mirror_ob != NULL) {
float tmp[4][4];
float itmp[4][4];
diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c
index 284487d7066..2a8bca895be 100644
--- a/source/blender/modifiers/intern/MOD_normal_edit.c
+++ b/source/blender/modifiers/intern/MOD_normal_edit.c
@@ -192,7 +192,7 @@ static bool polygons_check_flip(
}
static void normalEditModifier_do_radial(
- NormalEditModifierData *enmd, const ModifierEvalContext *ctx,
+ NormalEditModifierData *enmd, const ModifierEvalContext *UNUSED(ctx),
Object *ob, Mesh *mesh,
short (*clnors)[2], float (*loopnors)[3], float (*polynors)[3],
const short mix_mode, const float mix_factor, const float mix_limit,
@@ -200,7 +200,7 @@ static void normalEditModifier_do_radial(
MVert *mvert, const int num_verts, MEdge *medge, const int num_edges,
MLoop *mloop, const int num_loops, MPoly *mpoly, const int num_polys)
{
- Object *ob_target = DEG_get_evaluated_object(ctx->depsgraph, enmd->target);
+ Object *ob_target = enmd->target;
const bool do_polynors_fix = (enmd->flag & MOD_NORMALEDIT_NO_POLYNORS_FIX) == 0;
int i;
@@ -296,7 +296,7 @@ static void normalEditModifier_do_radial(
}
static void normalEditModifier_do_directional(
- NormalEditModifierData *enmd, const ModifierEvalContext *ctx,
+ NormalEditModifierData *enmd, const ModifierEvalContext *UNUSED(ctx),
Object *ob, Mesh *mesh,
short (*clnors)[2], float (*loopnors)[3], float (*polynors)[3],
const short mix_mode, const float mix_factor, const float mix_limit,
@@ -304,7 +304,7 @@ static void normalEditModifier_do_directional(
MVert *mvert, const int num_verts, MEdge *medge, const int num_edges,
MLoop *mloop, const int num_loops, MPoly *mpoly, const int num_polys)
{
- Object *ob_target = DEG_get_evaluated_object(ctx->depsgraph, enmd->target);
+ Object *ob_target = enmd->target;
const bool do_polynors_fix = (enmd->flag & MOD_NORMALEDIT_NO_POLYNORS_FIX) == 0;
const bool use_parallel_normals = (enmd->flag & MOD_NORMALEDIT_USE_DIRECTION_PARALLEL) != 0;
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index eee71da6477..8e881fd09f0 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -236,7 +236,7 @@ static Mesh *applyModifier(
MEdge *medge_orig, *med_orig, *med_new, *med_new_firstloop, *medge_new;
MVert *mvert_new, *mvert_orig, *mv_orig, *mv_new, *mv_new_base;
- Object *ob_axis = DEG_get_evaluated_object(ctx->depsgraph, ltmd->ob_axis);
+ Object *ob_axis = ltmd->ob_axis;
ScrewVertConnect *vc, *vc_tmp, *vert_connect = NULL;
diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c
index dbeb4193e72..0ebeb1cd761 100644
--- a/source/blender/modifiers/intern/MOD_simpledeform.c
+++ b/source/blender/modifiers/intern/MOD_simpledeform.c
@@ -178,7 +178,7 @@ static void simpleDeform_bend(const float factor, const int axis, const float dc
/* simple deform modifier */
static void SimpleDeformModifier_do(
- SimpleDeformModifierData *smd, const ModifierEvalContext *ctx,
+ SimpleDeformModifierData *smd, const ModifierEvalContext *UNUSED(ctx),
struct Object *ob, struct Mesh *mesh,
float (*vertexCos)[3], int numVerts)
{
@@ -222,7 +222,7 @@ static void SimpleDeformModifier_do(
/* Calculate matrixs do convert between coordinate spaces */
if (smd->origin != NULL) {
transf = &tmp_transf;
- BLI_SPACE_TRANSFORM_SETUP(transf, ob, DEG_get_evaluated_object(ctx->depsgraph, smd->origin));
+ BLI_SPACE_TRANSFORM_SETUP(transf, ob, smd->origin);
}
/* Update limits if needed */
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index 52394cf0ff1..44307b4271e 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -1124,7 +1124,7 @@ static void deformVert(
static void surfacedeformModifier_do(
ModifierData *md,
- const ModifierEvalContext *ctx,
+ const ModifierEvalContext *UNUSED(ctx),
float (*vertexCos)[3], unsigned int numverts, Object *ob)
{
SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md;
@@ -1147,7 +1147,7 @@ static void surfacedeformModifier_do(
return;
}
- Object *ob_target = DEG_get_evaluated_object(ctx->depsgraph, smd->target);
+ Object *ob_target = smd->target;
target = BKE_modifier_get_evaluated_mesh_from_evaluated_object(ob_target, false);
#if 0 /* Should not be needed anymore since we always get that mesh from eval object ? */
if (target == NULL && smd->verts == NULL && ob == DEG_get_original_object(ob)) {
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index 245186bbc02..1bb38001328 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -59,7 +59,7 @@
void MOD_init_texture(MappingInfoModifierData *dmd, const ModifierEvalContext *ctx)
{
- Tex *tex = (Tex *)DEG_get_evaluated_id(ctx->depsgraph, &dmd->texture->id);
+ Tex *tex = dmd->texture;
if (tex == NULL) {
return;
@@ -74,7 +74,7 @@ void MOD_init_texture(MappingInfoModifierData *dmd, const ModifierEvalContext *c
/** \param cos: may be NULL, in which case we use directly mesh vertices' coordinates. */
void MOD_get_texture_coords(
MappingInfoModifierData *dmd,
- const ModifierEvalContext *ctx,
+ const ModifierEvalContext *UNUSED(ctx),
Object *ob,
Mesh *mesh,
float (*cos)[3],
@@ -87,7 +87,7 @@ void MOD_get_texture_coords(
if (texmapping == MOD_DISP_MAP_OBJECT) {
if (dmd->map_object != NULL) {
- Object *map_object = DEG_get_evaluated_object(ctx->depsgraph, dmd->map_object);
+ Object *map_object = dmd->map_object;
invert_m4_m4(mapob_imat, map_object->obmat);
}
else {/* if there is no map object, default to local */
diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c
index 301edf805c7..06cd7a80494 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.c
+++ b/source/blender/modifiers/intern/MOD_uvproject.c
@@ -109,7 +109,7 @@ typedef struct Projector {
static Mesh *uvprojectModifier_do(
UVProjectModifierData *umd,
- const ModifierEvalContext *ctx,
+ const ModifierEvalContext *UNUSED(ctx),
Object *ob, Mesh *mesh)
{
float (*coords)[3], (*co)[3];
@@ -128,7 +128,7 @@ static Mesh *uvprojectModifier_do(
for (i = 0; i < umd->num_projectors; ++i) {
if (umd->projectors[i] != NULL) {
- projectors[num_projectors++].ob = DEG_get_evaluated_object(ctx->depsgraph, umd->projectors[i]);
+ projectors[num_projectors++].ob = umd->projectors[i];
}
}
diff --git a/source/blender/modifiers/intern/MOD_uvwarp.c b/source/blender/modifiers/intern/MOD_uvwarp.c
index 2fb866d987e..a850bb34111 100644
--- a/source/blender/modifiers/intern/MOD_uvwarp.c
+++ b/source/blender/modifiers/intern/MOD_uvwarp.c
@@ -161,8 +161,8 @@ static Mesh *applyModifier(
}
/* make sure anything moving UVs is available */
- matrix_from_obj_pchan(mat_src, DEG_get_evaluated_object(ctx->depsgraph, umd->object_src), umd->bone_src);
- matrix_from_obj_pchan(mat_dst, DEG_get_evaluated_object(ctx->depsgraph, umd->object_dst), umd->bone_dst);
+ matrix_from_obj_pchan(mat_src, umd->object_src, umd->bone_src);
+ matrix_from_obj_pchan(mat_dst, umd->object_dst, umd->bone_dst);
invert_m4_m4(imat_dst, mat_dst);
mul_m4_m4m4(warp_mat, imat_dst, mat_src);
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index a4f3dec2f4b..30bd391ef84 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -189,8 +189,8 @@ static void warpModifier_do(
invert_m4_m4(obinv, ob->obmat);
- mul_m4_m4m4(mat_from, obinv, DEG_get_evaluated_object(ctx->depsgraph, wmd->object_from)->obmat);
- mul_m4_m4m4(mat_to, obinv, DEG_get_evaluated_object(ctx->depsgraph, wmd->object_to)->obmat);
+ mul_m4_m4m4(mat_from, obinv, wmd->object_from->obmat);
+ mul_m4_m4m4(mat_to, obinv, wmd->object_to->obmat);
invert_m4_m4(tmat, mat_from); // swap?
mul_m4_m4m4(mat_final, tmat, mat_to);
@@ -211,7 +211,7 @@ static void warpModifier_do(
}
weight = strength;
- Tex *tex_target = (Tex *)DEG_get_evaluated_id(ctx->depsgraph, &wmd->texture->id);
+ Tex *tex_target = wmd->texture;
if (mesh != NULL && tex_target != NULL) {
tex_co = MEM_malloc_arrayN(numVerts, sizeof(*tex_co), "warpModifier_do tex_co");
MOD_get_texture_coords((MappingInfoModifierData *)wmd, ctx, ob, mesh, vertexCos, tex_co);
diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c
index 982111acec1..d5c372a2809 100644
--- a/source/blender/modifiers/intern/MOD_wave.c
+++ b/source/blender/modifiers/intern/MOD_wave.c
@@ -167,7 +167,7 @@ static void waveModifier_do(
float mat[4][4];
/* get the control object's location in local coordinates */
invert_m4_m4(ob->imat, ob->obmat);
- mul_m4_m4m4(mat, ob->imat, DEG_get_evaluated_object(ctx->depsgraph, wmd->objectcenter)->obmat);
+ mul_m4_m4m4(mat, ob->imat, wmd->objectcenter->obmat);
wmd->startx = mat[3][0];
wmd->starty = mat[3][1];
@@ -191,7 +191,7 @@ static void waveModifier_do(
}
}
- Tex *tex_target = (Tex *)DEG_get_evaluated_id(ctx->depsgraph, &wmd->texture->id);
+ Tex *tex_target = wmd->texture;
if (mesh != NULL && tex_target != NULL) {
tex_co = MEM_malloc_arrayN(numVerts, sizeof(*tex_co), "waveModifier_do tex_co");
MOD_get_texture_coords((MappingInfoModifierData *)wmd, ctx, ob, mesh, vertexCos, tex_co);
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index 85cf3102733..d0631a0c30b 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -127,7 +127,6 @@ void weightvg_do_mask(
/* If we want to mask vgroup weights from a texture. */
if (texture != NULL) {
- texture = (Tex *)DEG_get_evaluated_id(ctx->depsgraph, &texture->id);
/* The texture coordinates. */
float (*tex_co)[3];
/* See mapping note below... */
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index d31106bac8e..89ba5395775 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -398,7 +398,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
}
/* Get our target object. */
- obr = DEG_get_evaluated_object(ctx->depsgraph, wmd->proximity_ob_target);
+ obr = wmd->proximity_ob_target;
if (obr == NULL) {
return mesh;
}