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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_solidify_extrude.c')
-rw-r--r--source/blender/modifiers/intern/MOD_solidify_extrude.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/modifiers/intern/MOD_solidify_extrude.c b/source/blender/modifiers/intern/MOD_solidify_extrude.c
index 95fb87bb54c..e97190b1878 100644
--- a/source/blender/modifiers/intern/MOD_solidify_extrude.c
+++ b/source/blender/modifiers/intern/MOD_solidify_extrude.c
@@ -242,9 +242,8 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex
MDeformVert *dvert;
const bool defgrp_invert = (smd->flag & MOD_SOLIDIFY_VGROUP_INV) != 0;
int defgrp_index;
- const int shell_defgrp_index = BKE_object_defgroup_name_index(ctx->object,
- smd->shell_defgrp_name);
- const int rim_defgrp_index = BKE_object_defgroup_name_index(ctx->object, smd->rim_defgrp_name);
+ const int shell_defgrp_index = BKE_id_defgroup_name_index(&mesh->id, smd->shell_defgrp_name);
+ const int rim_defgrp_index = BKE_id_defgroup_name_index(&mesh->id, smd->rim_defgrp_name);
/* array size is doubled in case of using a shell */
const uint stride = do_shell ? 2 : 1;
@@ -505,7 +504,7 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex
}
}
- /* note, copied vertex layers don't have flipped normals yet. do this after applying offset */
+ /* NOTE: copied vertex layers don't have flipped normals yet. do this after applying offset. */
if ((smd->flag & MOD_SOLIDIFY_EVEN) == 0) {
/* no even thickness, very simple */
float scalar_short;
@@ -1028,14 +1027,13 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex
if (do_rim) {
uint i;
- /* bugger, need to re-calculate the normals for the new edge faces.
+ /* NOTE(campbell): Unfortunately re-calculate the normals for the new edge faces is necessary.
* This could be done in many ways, but probably the quickest way
* is to calculate the average normals for side faces only.
* Then blend them with the normals of the edge verts.
*
- * at the moment its easiest to allocate an entire array for every vertex,
- * even though we only need edge verts - campbell
- */
+ * At the moment its easiest to allocate an entire array for every vertex,
+ * even though we only need edge verts. */
#define SOLIDIFY_SIDE_NORMALS
@@ -1200,7 +1198,7 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex
short *nor_short;
int k;
- /* note, only the first vertex (lower half of the index) is calculated */
+ /* NOTE: only the first vertex (lower half of the index) is calculated. */
BLI_assert(ed->v1 < numVerts);
normalize_v3_v3(nor_cpy, edge_vert_nos[ed_orig->v1]);