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>2013-12-12 22:07:16 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-12-12 22:07:40 +0400
commite45a9a3aaa17f585160e1ac7cbab2eead793f84d (patch)
tree06bf024fa6d17e25738b703fc75d1c3f3bacb76a /source/blender/windowmanager
parent700e799ef5efd253a8f7c92e09d94c4272a3c73f (diff)
Radial control operator support for pixel properties
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index ac32d16a23b..f17dc29aeee 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3536,6 +3536,7 @@ static void radial_control_set_initial_mouse(RadialControl *rc, const wmEvent *e
switch (rc->subtype) {
case PROP_NONE:
case PROP_DISTANCE:
+ case PROP_PIXEL:
d[0] = rc->initial_value;
break;
case PROP_FACTOR:
@@ -3636,6 +3637,7 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd
switch (rc->subtype) {
case PROP_NONE:
case PROP_DISTANCE:
+ case PROP_PIXEL:
r1 = rc->current_value;
r2 = rc->initial_value;
tex_radius = r1;
@@ -3880,7 +3882,7 @@ static int radial_control_invoke(bContext *C, wmOperator *op, const wmEvent *eve
/* get subtype of property */
rc->subtype = RNA_property_subtype(rc->prop);
- if (!ELEM4(rc->subtype, PROP_NONE, PROP_DISTANCE, PROP_FACTOR, PROP_ANGLE)) {
+ if (!ELEM5(rc->subtype, PROP_NONE, PROP_DISTANCE, PROP_FACTOR, PROP_ANGLE, PROP_PIXEL)) {
BKE_report(op->reports, RPT_ERROR, "Property must be a none, distance, a factor, or an angle");
MEM_freeN(rc);
return OPERATOR_CANCELLED;
@@ -3965,6 +3967,7 @@ static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *even
switch (rc->subtype) {
case PROP_NONE:
case PROP_DISTANCE:
+ case PROP_PIXEL:
new_value = dist;
if (snap) new_value = ((int)new_value + 5) / 10 * 10;
break;