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:
authorAntony Riakiotakis <kalast@gmail.com>2014-03-25 01:46:30 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-03-25 01:46:30 +0400
commitb701c92588f16b25c773b1d7ba6d71a0122bbb64 (patch)
tree1bd1b38657dfaa227b481fb3c99a0d7482c5633d /source/blender/windowmanager
parent1c22ba1e0e728655462725127f19010387456b3b (diff)
Code cleanup:
* Separate some common code for sculpt raycasting * Cleanup to radial operator commit
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 8b06a4037cc..50db23303ff 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3779,6 +3779,9 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd
case PROP_ANGLE:
r1 = r2 = tex_radius = WM_RADIAL_CONTROL_DISPLAY_SIZE;
alpha = 0.75;
+ rmin = WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE;
+ BLI_snprintf(str, WM_RADIAL_MAX_STR, "%3f", RAD2DEGF(rc->current_value));
+ strdrawlen = BLI_strlen_utf8(str);
break;
default:
tex_radius = WM_RADIAL_CONTROL_DISPLAY_SIZE; /* note, this is a dummy value */
@@ -3822,14 +3825,8 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd
glRotatef(RAD2DEGF(rc->current_value - rc->initial_value), 0, 0, 1);
fdrawline((float)WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE, 0.0f, (float)WM_RADIAL_CONTROL_DISPLAY_SIZE, 0.0f);
glPopMatrix();
- rmin = WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE;
- BLI_snprintf(str, WM_RADIAL_MAX_STR, "%3f", RAD2DEGF(rc->current_value));
- strdrawlen = BLI_strlen_utf8(str);
}
- /* adjust dpi for rmin here to account for angle */
- rmin *= U.pixelsize;
-
/* draw circles on top */
glutil_draw_lined_arc(0.0, (float)(M_PI * 2.0), r1, 40);
glutil_draw_lined_arc(0.0, (float)(M_PI * 2.0), r2, 40);