diff options
-rw-r--r-- | source/blender/modifiers/intern/MOD_boolean.c | 16 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_uvproject.c | 19 |
2 files changed, 17 insertions, 18 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index 2b6f6cf8920..0cbce903dc6 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -180,16 +180,16 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes mesh_other = BKE_modifier_get_evaluated_mesh_from_evaluated_object(bmd->object, &mesh_other_free); if (mesh_other) { - Object *object_eval = DEG_get_evaluated_object(ctx->depsgraph, ctx->object); - Object *other_eval = DEG_get_evaluated_object(ctx->depsgraph, bmd->object); + Object *object = ctx->object; + Object *other = bmd->object; /* when one of objects is empty (has got no faces) we could speed up * calculation a bit returning one of objects' derived meshes (or empty one) * Returning mesh is depended on modifiers operation (sergey) */ - result = get_quick_mesh(object_eval, mesh, other_eval, mesh_other, bmd->operation); + result = get_quick_mesh(object, mesh, other, mesh_other, bmd->operation); if (result == NULL) { - const bool is_flip = (is_negative_m4(object_eval->obmat) != is_negative_m4(other_eval->obmat)); + const bool is_flip = (is_negative_m4(object->obmat) != is_negative_m4(other->obmat)); BMesh *bm; const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(mesh, mesh_other); @@ -236,8 +236,8 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes float imat[4][4]; float omat[4][4]; - invert_m4_m4(imat, object_eval->obmat); - mul_m4_m4m4(omat, imat, other_eval->obmat); + invert_m4_m4(imat, object->obmat); + mul_m4_m4m4(omat, imat, other->obmat); BMVert *eve; i = 0; @@ -259,11 +259,11 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes negate_m3(nmat); } - const short ob_src_totcol = other_eval->totcol; + const short ob_src_totcol = other->totcol; short *material_remap = BLI_array_alloca(material_remap, ob_src_totcol ? ob_src_totcol : 1); /* Using original (not evaluated) object here since we are writing to it. */ - BKE_material_remap_object_calc(ctx->object, other_eval, material_remap); + BKE_material_remap_object_calc(ctx->object, other, material_remap); BMFace *efa; i = 0; diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c index b491496caa4..394255ddb18 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.c +++ b/source/blender/modifiers/intern/MOD_uvproject.c @@ -113,7 +113,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte } typedef struct Projector { - Object *ob_eval; /* object this projector is derived from */ + Object *ob; /* object this projector is derived from */ float projmat[4][4]; /* projection matrix */ float normal[3]; /* projector normal in world space */ void *uci; /* optional uv-project info (panorama projection) */ @@ -121,7 +121,6 @@ typedef struct Projector { static Mesh *uvprojectModifier_do( UVProjectModifierData *umd, - Depsgraph *depsgraph, Object *ob, Mesh *mesh) { float (*coords)[3], (*co)[3]; @@ -140,7 +139,7 @@ static Mesh *uvprojectModifier_do( for (i = 0; i < umd->num_projectors; ++i) if (umd->projectors[i]) - projectors[num_projectors++].ob_eval = DEG_get_evaluated_object(depsgraph, umd->projectors[i]); + projectors[num_projectors++].ob = umd->projectors[i]; if (num_projectors == 0) return mesh; @@ -157,14 +156,14 @@ static Mesh *uvprojectModifier_do( float offsetmat[4][4]; Camera *cam = NULL; /* calculate projection matrix */ - invert_m4_m4(projectors[i].projmat, projectors[i].ob_eval->obmat); + invert_m4_m4(projectors[i].projmat, projectors[i].ob->obmat); projectors[i].uci = NULL; - if (projectors[i].ob_eval->type == OB_CAMERA) { - cam = (Camera *)projectors[i].ob_eval->data; + if (projectors[i].ob->type == OB_CAMERA) { + cam = (Camera *)projectors[i].ob->data; if (cam->type == CAM_PANO) { - projectors[i].uci = BLI_uvproject_camera_info(projectors[i].ob_eval, NULL, aspx, aspy); + projectors[i].uci = BLI_uvproject_camera_info(projectors[i].ob, NULL, aspx, aspy); BLI_uvproject_camera_info_scale(projectors[i].uci, scax, scay); free_uci = 1; } @@ -173,7 +172,7 @@ static Mesh *uvprojectModifier_do( /* setup parameters */ BKE_camera_params_init(¶ms); - BKE_camera_params_from_object(¶ms, projectors[i].ob_eval); + BKE_camera_params_from_object(¶ms, projectors[i].ob); /* compute matrix, viewplane, .. */ BKE_camera_params_compute_viewplane(¶ms, 1, 1, aspx, aspy); @@ -202,7 +201,7 @@ static Mesh *uvprojectModifier_do( projectors[i].normal[0] = 0; projectors[i].normal[1] = 0; projectors[i].normal[2] = 1; - mul_mat3_m4_v3(projectors[i].ob_eval->obmat, projectors[i].normal); + mul_mat3_m4_v3(projectors[i].ob->obmat, projectors[i].normal); } numPolys = mesh->totpoly; @@ -314,7 +313,7 @@ static Mesh *applyModifier( Mesh *result; UVProjectModifierData *umd = (UVProjectModifierData *) md; - result = uvprojectModifier_do(umd, ctx->depsgraph, ctx->object, mesh); + result = uvprojectModifier_do(umd, ctx->object, mesh); return result; } |