[Bf-blender-cvs] [386051c] hair_immediate_fixes: Sanity check for strand root/tip checks, now supports single vertices.
Lukas Tönne
noreply at git.blender.org
Sat Dec 27 11:32:49 CET 2014
Commit: 386051c2b631aac8bb37fdce33436a46fcc4fb12
Author: Lukas Tönne
Date: Sat Dec 6 10:29:49 2014 +0100
Branches: hair_immediate_fixes
https://developer.blender.org/rB386051c2b631aac8bb37fdce33436a46fcc4fb12
Sanity check for strand root/tip checks, now supports single vertices.
===================================================================
M source/blender/bmesh/intern/bmesh_strands.h
===================================================================
diff --git a/source/blender/bmesh/intern/bmesh_strands.h b/source/blender/bmesh/intern/bmesh_strands.h
index 66284ee..a0b0cfb 100644
--- a/source/blender/bmesh/intern/bmesh_strands.h
+++ b/source/blender/bmesh/intern/bmesh_strands.h
@@ -39,6 +39,8 @@ BLI_INLINE bool BM_strands_vert_is_root(BMVert *v)
BMEdge *e_first = v->e;
BMEdge *e_next;
+ if (!e_first)
+ return true; /* single vertex is both root and tip */
e_next = bmesh_disk_edge_next(e_first, v);
/* with a single edge, the vertex is either first or last of the curve;
@@ -57,6 +59,8 @@ BLI_INLINE bool BM_strands_vert_is_tip(BMVert *v)
BMEdge *e_first = v->e;
BMEdge *e_next;
+ if (!e_first)
+ return true; /* single vertex is both root and tip */
e_next = bmesh_disk_edge_next(e_first, v);
/* with a single edge, the vertex is either first or last of the curve;
More information about the Bf-blender-cvs
mailing list