diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-03-07 13:28:08 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-03-07 13:28:08 +0300 |
commit | d7479f99b06c351343237e3939f469e9323cd6a7 (patch) | |
tree | 8cd97ce272a56f79abefa07aad0fe1f83ae0a5da /source | |
parent | dfe94557a926f79fbfbf476318ea21528c15b381 (diff) |
Share enum types with rna and small bugfix because Ton needs to make keymodifier bitflag work.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform.c | 14 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 4 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 3 |
3 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 08d2b1fcb5e..c721c30d974 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -764,15 +764,15 @@ void transformEvent(TransInfo *t, wmEvent *event) } break; case OKEY: - if (t->flag & T_PROP_EDIT && event->keymodifier == KM_SHIFT) { - t->scene->prop_mode = (t->scene->prop_mode+1)%6; + if (t->flag & T_PROP_EDIT && event->shift) { + t->prop_mode = (t->prop_mode + 1) % 6; calculatePropRatio(t); - t->redraw= 1; + t->redraw = 1; } break; case PADPLUSKEY: - if(event->keymodifier & KM_ALT && t->flag & T_PROP_EDIT) { - t->prop_size*= 1.1f; + if(event->alt && t->flag & T_PROP_EDIT) { + t->prop_size *= 1.1f; calculatePropRatio(t); } t->redraw= 1; @@ -790,7 +790,7 @@ void transformEvent(TransInfo *t, wmEvent *event) t->redraw= 1; break; case PADMINUS: - if(event->keymodifier & KM_ALT && t->flag & T_PROP_EDIT) { + if(event->alt && t->flag & T_PROP_EDIT) { t->prop_size*= 0.90909090f; calculatePropRatio(t); } @@ -974,7 +974,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) if (RNA_struct_find_property(op->ptr, "proportional")) { RNA_enum_set(op->ptr, "proportional", proportional); - RNA_enum_set(op->ptr, "proportional_mode", t->prop_mode); + RNA_enum_set(op->ptr, "proportional_editing_falloff", t->prop_mode); RNA_float_set(op->ptr, "proportional_size", t->prop_size); } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 712c35dce9f..501afd6381d 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -810,9 +810,9 @@ void initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) t->prop_size = sce->toolsettings->proportional_size; } - if (op && RNA_struct_find_property(op->ptr, "proportional_falloff") && RNA_property_is_set(op->ptr, "proportional_falloff")) + if (op && RNA_struct_find_property(op->ptr, "proportional_editing_falloff") && RNA_property_is_set(op->ptr, "proportional_editing_falloff")) { - t->prop_mode = RNA_enum_get(op->ptr, "proportional_falloff"); + t->prop_mode = RNA_enum_get(op->ptr, "proportional_editing_falloff"); } else { diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index f3cfbcc882d..1228ba1a6dd 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -30,6 +30,7 @@ #include "RNA_access.h" #include "RNA_define.h" +#include "RNA_enum_types.h" #include "BLI_arithb.h" @@ -250,7 +251,7 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event) void Properties_Proportional(struct wmOperatorType *ot) { RNA_def_enum(ot->srna, "proportional", proportional_mode_types, 0, "Proportional Edition", ""); - RNA_def_enum(ot->srna, "proportional_falloff", proportional_falloff_types, 0, "Proportional Falloff", ""); + RNA_def_enum(ot->srna, "proportional_editing_falloff", prop_mode_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode."); RNA_def_float(ot->srna, "proportional_size", 1, 0, FLT_MAX, "Proportional Size", "", 0, 100); } |