From 5327c2f486ec5c5024b28816d76beb44aa71180c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 20 Sep 2012 12:42:22 +0000 Subject: [PATCH] fix [#32602] Bevel operator's transform input is inverted inset was inverted also --- source/blender/blenkernel/intern/sound.c | 1 - source/blender/editors/mesh/editmesh_tools.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index f340bcb5b1e..385d1bb6fc5 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -792,7 +792,6 @@ void sound_stop_scene(struct Scene *UNUSED(scene)) {} void sound_seek_scene(struct Main *UNUSED(bmain), struct Scene *UNUSED(scene)) {} float sound_sync_scene(struct Scene *UNUSED(scene)) { return NAN_FLT; } int sound_scene_playing(struct Scene *UNUSED(scene)) { return -1; } -int sound_read_sound_buffer(struct bSound *UNUSED(sound), float *UNUSED(buffer), int UNUSED(length), float UNUSED(start), float UNUSED(end)) { return 0; } void sound_read_waveform(struct bSound *sound) { (void)sound; } void sound_init_main(struct Main *bmain) { (void)bmain; } void sound_set_cfra(int cfra) { (void)cfra; } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 06d48d29f0e..42979e6f2f4 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -4710,7 +4710,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event) mdiff[0] = opdata->mcenter[0] - event->mval[0]; mdiff[1] = opdata->mcenter[1] - event->mval[1]; - factor = -len_v2(mdiff) / opdata->initial_length + 1.0f; + factor = opdata->initial_length / -len_v2(mdiff) + 1.0f; /* Fake shift-transform... */ if (event->shift) { @@ -5074,9 +5074,9 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event) mdiff[1] = opdata->mcenter[1] - event->mval[1]; if (opdata->modify_depth) - amount = opdata->old_depth + len_v2(mdiff) / opdata->initial_length - 1.0f; + amount = opdata->old_depth + opdata->initial_length / len_v2(mdiff) - 1.0f; else - amount = opdata->old_thickness - len_v2(mdiff) / opdata->initial_length + 1.0f; + amount = opdata->old_thickness - opdata->initial_length / len_v2(mdiff) + 1.0f; /* Fake shift-transform... */ if (opdata->shift)