diff --git a/intern/cycles/kernel/osl/nodes/node_rgb_ramp.osl b/intern/cycles/kernel/osl/nodes/node_rgb_ramp.osl index afce1127305..a128ebbd1cf 100644 --- a/intern/cycles/kernel/osl/nodes/node_rgb_ramp.osl +++ b/intern/cycles/kernel/osl/nodes/node_rgb_ramp.osl @@ -20,25 +20,24 @@ #include "oslutil.h" shader node_rgb_ramp( - color ramp_color[RAMP_TABLE_SIZE] = {0.0}, - float ramp_alpha[RAMP_TABLE_SIZE] = {0.0}, + color ramp_color[RAMP_TABLE_SIZE] = {0.0}, + float ramp_alpha[RAMP_TABLE_SIZE] = {0.0}, - float Fac = 0.0, - output color Color = color(0.0, 0.0, 0.0), - output float Alpha = 1.0 - ) + float Fac = 0.0, + output color Color = color(0.0, 0.0, 0.0), + output float Alpha = 1.0) { - float f = clamp(Fac, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1); + float f = clamp(Fac, 0.0, 1.0) * (RAMP_TABLE_SIZE - 1); - int i = (int)f; - float t = f - (float)i; + int i = (int)f; + float t = f - (float)i; - Color = ramp_color[i]; - Alpha = ramp_alpha[i]; + Color = ramp_color[i]; + Alpha = ramp_alpha[i]; - if (t > 0.0) { - Color = (1.0 - t) * Color + t * ramp_color[i + 1]; - Alpha = (1.0 - t) * Alpha + t * ramp_alpha[i + 1]; - } + if (t > 0.0) { + Color = (1.0 - t) * Color + t * ramp_color[i + 1]; + Alpha = (1.0 - t) * Alpha + t * ramp_alpha[i + 1]; + } } diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index 413f480c60d..cef2c1f7573 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -1607,10 +1607,10 @@ BMEdge *bmesh_jekv(BMesh *bm, BMEdge *ke, BMVert *kv, const short check_edge_dou BMESH_ASSERT(edok != FALSE); } - /* deallocate edg */ + /* deallocate edge */ bm_kill_only_edge(bm, ke); - /* deallocate verte */ + /* deallocate vertex */ bm_kill_only_vert(bm, kv); /* Validate disk cycle lengths of ov, tv are unchanged */ @@ -1619,7 +1619,7 @@ BMEdge *bmesh_jekv(BMesh *bm, BMEdge *ke, BMVert *kv, const short check_edge_dou edok = bmesh_disk_validate(valence2, tv->e, tv); BMESH_ASSERT(edok != FALSE); - /* Validate loop cycle of all faces attached to oe */ + /* Validate loop cycle of all faces attached to 'oe' */ for (i = 0, l = oe->l; i < radlen; i++, l = l->radial_next) { BMESH_ASSERT(l->e == oe); edok = bmesh_verts_in_edge(l->v, l->next->v, oe); @@ -1800,6 +1800,10 @@ BMFace *bmesh_jfke(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e) * Merges two verts into one (\a v into \a vtarget). * * \return Success + * + * \warning This does't work for collapsing edges, + * where \a v and \a vtarget are connected by an edge + * (assert checks for this case). */ int BM_vert_splice(BMesh *bm, BMVert *v, BMVert *vtarget) { @@ -1827,6 +1831,7 @@ int BM_vert_splice(BMesh *bm, BMVert *v, BMVert *vtarget) bmesh_disk_edge_remove(e, v); bmesh_edge_swapverts(e, v, vtarget); bmesh_disk_edge_append(e, vtarget); + BLI_assert(e->v1 != e->v2); } BM_CHECK_ELEMENT(v); diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c index 6d6c1361566..cd2ef5957cd 100644 --- a/source/blender/modifiers/intern/MOD_particlesystem.c +++ b/source/blender/modifiers/intern/MOD_particlesystem.c @@ -131,7 +131,7 @@ static void deformVerts(ModifierData *md, Object *ob, ParticleSystemModifierData *psmd = (ParticleSystemModifierData *) md; ParticleSystem *psys = NULL; int needsFree = 0; - float cfra = BKE_scene_frame_get(md->scene); + /* float cfra = BKE_scene_frame_get(md->scene); */ /* UNUSED */ if (ob->particlesystem.first) psys = psmd->psys;