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:
-rw-r--r--source/blender/blenkernel/intern/displist.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index c985de94854..c5dadb1b529 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -965,6 +965,19 @@ static void curve_calc_modifiers_post(
if (!modifier_isEnabled(scene, md, required_mode))
continue;
+ /* If we need normals, no choice, have to convert to mesh now. */
+ if (mti->dependsOnNormals != NULL && mti->dependsOnNormals(md) && modified == NULL) {
+ if (vertCos != NULL) {
+ displist_apply_allverts(dispbase, vertCos);
+ }
+
+ if (ELEM(ob->type, OB_CURVE, OB_FONT) && (cu->flag & CU_DEFORM_FILL)) {
+ curve_to_filledpoly(cu, nurb, dispbase);
+ }
+
+ modified = BKE_mesh_new_nomain_from_curve_displist(ob, dispbase);
+ }
+
if (mti->type == eModifierTypeType_OnlyDeform ||
(mti->type == eModifierTypeType_DeformOrConstruct && !modified))
{
@@ -972,6 +985,9 @@ static void curve_calc_modifiers_post(
if (!vertCos) {
vertCos = BKE_mesh_vertexCos_get(modified, &totvert);
}
+ if (mti->dependsOnNormals != NULL && mti->dependsOnNormals(md)) {
+ BKE_mesh_ensure_normals(modified);
+ }
mti->deformVerts(md, &mectx_deform, modified, vertCos, totvert);
}
else {
@@ -1021,6 +1037,9 @@ static void curve_calc_modifiers_post(
vertCos = NULL;
}
+ if (mti->dependsOnNormals != NULL && mti->dependsOnNormals(md)) {
+ BKE_mesh_ensure_normals(modified);
+ }
mesh_applied = mti->applyModifier(md, &mectx_apply, modified);
if (mesh_applied) {