fix for zero length normalize before scanfill for meshes and other minor changes.

This commit is contained in:
Campbell Barton 2013-06-27 04:32:44 +00:00
parent 3ff36f928c
commit 603258d763
3 changed files with 8 additions and 5 deletions

@ -773,6 +773,7 @@ class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
row.prop(light, "ao_factor", text="Factor")
row.prop(light, "distance", text="Distance")
class CyclesWorld_PT_mist(CyclesButtonsPanel, Panel):
bl_label = "Mist Pass"
bl_context = "world"
@ -940,7 +941,7 @@ class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
col = split.column(align=True)
col.label()
col.prop(mat, "pass_index")
col = layout.column()
col.prop(cmat, "sample_as_light")
col.prop(cmat, "use_transparent_shadow")
@ -1166,7 +1167,7 @@ class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
row = layout.row()
row.prop(ccscene, "use_parents", text="Include parents")
row = layout.row()
row.prop(ccscene, "minimum_width", text="Min Pixels")
row.prop(ccscene, "maximum_width", text="Max Ext.")
@ -1198,7 +1199,7 @@ class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel):
row = layout.row()
row.prop(cpsys, "root_width", text="Root")
row.prop(cpsys, "tip_width", text="Tip")
row = layout.row()
row.prop(cpsys, "radius_scale", text="Scaling")
row.prop(cpsys, "use_closetip", text="Close tip")

@ -2765,7 +2765,9 @@ int BKE_mesh_recalc_tessellation(CustomData *fdata,
BLI_scanfill_edge_add(&sf_ctx, sf_vert_last, sf_vert_first);
#ifdef USE_TESSFACE_CALCNORMAL
add_newell_cross_v3_v3v3(normal, sf_vert_last->co, sf_vert_first->co);
normalize_v3(normal);
if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
normal[2] = 1.0f;
}
totfilltri = BLI_scanfill_calc_ex(&sf_ctx, 0, normal);
#else
totfilltri = BLI_scanfill_calc(&sf_ctx, 0);

@ -299,7 +299,7 @@ static int insert_lorem_exec(bContext *C, wmOperator *UNUSED(op))
Object *obedit = CTX_data_edit_object(C);
const char *p, *p2;
int i;
static const char *lastlorem;
static const char *lastlorem = NULL;
if (lastlorem)
p = lastlorem;