diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-01-04 23:49:42 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-01-04 23:49:42 +0300 |
commit | 05258297356fc2366506ac5dacc3feb74dcbba35 (patch) | |
tree | 01b62c502525b0f673230875ce5b7c604e05e685 /source/blender/editors/transform/transform_ops.c | |
parent | a325b8b3b9c68b0c554ce91211280c640b50e981 (diff) |
transform:
Rotation operator now saves axis of rotation (when not using a constraint). Better for operator redo and tweak (would use a Z axis because of matrix init)
Also fix crash in Translation operator redo and tweak (rv3d is not always available).
Diffstat (limited to 'source/blender/editors/transform/transform_ops.c')
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 4c118aa2625..1ef0bdb0e05 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -385,6 +385,15 @@ void Properties_Proportional(struct wmOperatorType *ot) RNA_def_float(ot->srna, "proportional_size", 1, 0, FLT_MAX, "Proportional Size", "", 0, 100); } +void Properties_Axis(struct wmOperatorType *ot) +{ + PropertyRNA *prop; + + prop= RNA_def_property(ot->srna, "axis", PROP_FLOAT, PROP_DIRECTION); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Axis", "The axis around which the transformation occurs."); +} + void Properties_Snapping(struct wmOperatorType *ot, short fullsnap, short align) { RNA_def_boolean(ot->srna, "snap", 0, "Use Snapping Options", ""); @@ -504,6 +513,8 @@ void TRANSFORM_OT_rotate(struct wmOperatorType *ot) RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI*2, M_PI*2); + Properties_Axis(ot); + Properties_Proportional(ot); RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); @@ -757,6 +768,8 @@ void TRANSFORM_OT_transform(struct wmOperatorType *ot) RNA_def_float_vector(ot->srna, "value", 4, NULL, -FLT_MAX, FLT_MAX, "Values", "", -FLT_MAX, FLT_MAX); + Properties_Axis(ot); + Properties_Proportional(ot); RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); |