Commit: 8f2861c215c2d68cd9d4374c7acde75da44fc475 Author: Hans Goudey Date: Sun Jun 30 18:14:56 2019 -0400 Branches: soc-2019-bevel-profiles https://developer.blender.org/rB8f2861c215c2d68cd9d4374c7acde75da44fc475
Bevel Vertex Meshes: Various small changes. - Disabled Cube Corner test for custom profiles. - Re-enabled the ProfileWidget copy function, it does not cause the loading crash. - Changed variable names and added comments. =================================================================== M source/blender/bmesh/tools/bmesh_bevel.c M source/blender/modifiers/intern/MOD_bevel.c =================================================================== diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index cd32cf468ff..529501c7323 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -3613,10 +3613,10 @@ static NewVert *mesh_vert_canon(VMesh *vm, int i, int j, int k) static bool is_canon(VMesh *vm, int i, int j, int k) { int ns2 = vm->seg / 2; - if (vm->seg % 2 == 1) { + if (vm->seg % 2 == 1) { /* odd */ return (j <= ns2 && k <= ns2); } - else { + else { /* even */ return ((j < ns2 && k <= ns2) || (j == ns2 && k == ns2 && i == 0)); } } @@ -4246,7 +4246,7 @@ static int tri_corner_test(BevelParams *bp, BevVert *bv) int i; int in_plane_e = 0; - if (bp->vertex_only) { + if (bp->vertex_only || bp->use_custom_profile) { return -1; } if (bv->vmesh->count != 3) { @@ -4528,20 +4528,20 @@ static VMesh *pipe_adj_vmesh(BevelParams *bp, BevVert *bv, BoundVert *vpipe) #if DEBUG_CUSTOM_PROFILE_ADJ printf("PIPE ADJ VMESH\n"); #endif - int i, j, k, n, ns, ns2, ipipe1, ipipe2; + int i, j, k, n_bndv, ns, ns2, ipipe1, ipipe2; VMesh *vm; bool even, midline; vm = adj_vmesh(bp, bv); /* Now snap all interior coordinates to be on the epipe profile */ - n = bv->vmesh->count; + n_bndv = bv->vmesh->count; ns = bv->vmesh->seg; ns2 = ns / 2; even = (ns % 2) == 0; ipipe1 = vpipe->index; ipipe2 = vpipe->next->next->index; - for (i = 0; i < n; i++) { + for (i = 0; i < n_bndv; i++) { for (j = 1; j <= ns2; j++) { for (k = 0; k <= ns2; k++) { if (!is_canon(vm, i, j, k)) { diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index 70546a751dd..97127eacf1b 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -49,9 +49,9 @@ static void initData(ModifierData *md) { BevelModifierData *bmd = (BevelModifierData *)md; - bmd->value = 0.1f; + bmd->value = 1.0f; bmd->res = 1; - bmd->flags = 0; + bmd->flags = MOD_BEVEL_SAMPLE_POINTS; bmd->val_flags = MOD_BEVEL_AMT_OFFSET; bmd->lim_flags = 0; bmd->e_flags = 0; @@ -70,12 +70,12 @@ static void initData(ModifierData *md) static void copyData(const ModifierData *md_src, ModifierData *md_dst, const int flag) { printf("COPY DATA (MOD_bevel.c)\n"); -// const BevelModifierData *bmd_src = (const BevelModifierData *)md_src; -// BevelModifierData *bmd_dst = (BevelModifierData *)md_dst; + const BevelModifierData *bmd_src = (const BevelModifierData *)md_src; + BevelModifierData *bmd_dst = (BevelModifierData *)md_dst; modifier_copyData_generic(md_src, md_dst, flag); -// bmd_dst->prwdgt = profilewidget_copy(bmd_src->prwdgt); + bmd_dst->prwdgt = profilewidget_copy(bmd_src->prwdgt); } static void requiredDataMask(Object *UNUSED(ob), _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs