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:
authorHans Goudey <h.goudey@me.com>2020-08-12 04:59:16 +0300
committerHans Goudey <h.goudey@me.com>2020-08-12 04:59:16 +0300
commitef11238c743e6985fe325280fb13e05d6ec27378 (patch)
tree1dd2605a676bee52296535825b99f000a9c255eb /source/blender/modifiers/intern/MOD_skin.c
parent1f768bbe4145daed111636ca09dd53b25b8d29b5 (diff)
parentec5f39208785c1bbe723054ffe69e1ac2ab470dd (diff)
Merge branch 'master' into property-search-uiproperty-search-ui
Diffstat (limited to 'source/blender/modifiers/intern/MOD_skin.c')
-rw-r--r--source/blender/modifiers/intern/MOD_skin.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c
index 8f0174fe6d9..797d9e9e251 100644
--- a/source/blender/modifiers/intern/MOD_skin.c
+++ b/source/blender/modifiers/intern/MOD_skin.c
@@ -222,9 +222,8 @@ static bool skin_frame_find_contained_faces(const Frame *frame, BMFace *fill_fac
if (diag) {
return BM_edge_face_pair(diag, &fill_faces[0], &fill_faces[1]);
}
- else {
- return false;
- }
+
+ return false;
}
/* Returns true if hull is successfully built, false otherwise */
@@ -460,7 +459,7 @@ static void node_frames_init(SkinNode *nf, int totframe)
}
static void create_frame(
- Frame *frame, const float co[3], const float radius[2], float mat[3][3], float offset)
+ Frame *frame, const float co[3], const float radius[2], const float mat[3][3], float offset)
{
float rx[3], ry[3], rz[3];
int i;
@@ -773,6 +772,11 @@ static EMat *build_edge_mats(const MVertSkin *vs,
*has_valid_root = true;
}
+ else if (totedge == 0) {
+ /* Vertex-only mesh is valid, mark valid root as well (will display error otherwise). */
+ *has_valid_root = true;
+ break;
+ }
}
}
@@ -814,9 +818,8 @@ static int calc_edge_subdivisions(const MVert *mvert,
if (v1_branch && v2_branch) {
return 2;
}
- else {
- return 0;
- }
+
+ return 0;
}
avg_radius = half_v2(evs[0]->radius) + half_v2(evs[1]->radius);
@@ -1278,7 +1281,7 @@ static void skin_choose_quad_bridge_order(BMVert *a[4], BMVert *b[4], int best_o
if (len < shortest_len) {
shortest_len = len;
- memcpy(best_order, orders[i], sizeof(int) * 4);
+ memcpy(best_order, orders[i], sizeof(int[4]));
}
}
}