[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57403] trunk/blender/source/blender/ modifiers/intern/MOD_solidify.c: fix for error in last commit.
Campbell Barton
ideasman42 at gmail.com
Wed Jun 12 09:23:00 CEST 2013
Revision: 57403
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57403
Author: campbellbarton
Date: 2013-06-12 07:23:00 +0000 (Wed, 12 Jun 2013)
Log Message:
-----------
fix for error in last commit.
Modified Paths:
--------------
trunk/blender/source/blender/modifiers/intern/MOD_solidify.c
Modified: trunk/blender/source/blender/modifiers/intern/MOD_solidify.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_solidify.c 2013-06-12 07:16:13 UTC (rev 57402)
+++ trunk/blender/source/blender/modifiers/intern/MOD_solidify.c 2013-06-12 07:23:00 UTC (rev 57403)
@@ -58,6 +58,11 @@
int f2;
} EdgeFaceRef;
+BLI_INLINE bool edgeref_is_init(const EdgeFaceRef *edge_ref)
+{
+ return (edge_ref->f1 != 0) && (edge_ref->f2 != 0);
+}
+
static void dm_calc_normal(DerivedMesh *dm, float (*temp_nors)[3])
{
int i, numVerts, numEdges, numFaces;
@@ -113,7 +118,7 @@
for (j = 0; j < mp->totloop; j++, ml++) {
/* --- add edge ref to face --- */
edge_ref = &edge_ref_array[ml->e];
- if ((edge_ref->f1 == 0) && (edge_ref->f2 == 0)) {
+ if (!edgeref_is_init(edge_ref)) {
edge_ref->f1 = i;
edge_ref->f2 = -1;
}
@@ -127,7 +132,7 @@
for (i = 0, ed = medge, edge_ref = edge_ref_array; i < numEdges; i++, ed++, edge_ref++) {
/* Get the edge vert indices, and edge value (the face indices that use it) */
- if (edge_ref->f2 != -1) {
+ if (edgeref_is_init(edge_ref) && (edge_ref->f2 != -1)) {
/* We have 2 faces using this edge, calculate the edges normal
* using the angle between the 2 faces as a weighting */
#if 0
More information about the Bf-blender-cvs
mailing list