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:
authorMatt Ebb <matt@mke3.net>2009-12-03 03:17:34 +0300
committerMatt Ebb <matt@mke3.net>2009-12-03 03:17:34 +0300
commit5e5d05b8dd569cd58259ddc7cc33eb062833503c (patch)
treef6952a147b85dfb3892e1b43907cf4c8c994cb1e /source/blender/editors/mesh/editmesh_tools.c
parentae916753128c21763596d19ac8589d32c06f7fdb (diff)
Fix for [#20180] Wrong multiplicator in Random Selection
Also: Added extend select option to select random (off by default) Tweaked 'Select Axis' to use an enum for axes
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index e439968d380..089a35f8402 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -7192,7 +7192,7 @@ static int select_axis_exec(bContext *C, wmOperator *op)
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
- int axis= RNA_int_get(op->ptr, "axis");
+ int axis= RNA_enum_get(op->ptr, "axis");
int mode= RNA_enum_get(op->ptr, "mode"); /* -1==aligned, 0==neg, 1==pos*/
EditSelection *ese = em->selected.last;
@@ -7243,6 +7243,12 @@ void MESH_OT_select_axis(wmOperatorType *ot)
{1, "NEGATIVE", 0, "Negative Axis", ""},
{-1, "ALIGNED", 0, "Aligned Axis", ""},
{0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem axis_items[] = {
+ {0, "X_AXIS", 0, "X Axis", ""},
+ {1, "Y_AXIS", 0, "Y Axis", ""},
+ {2, "Z_AXIS", 0, "Z Axis", ""},
+ {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name= "Select Axis";
@@ -7258,6 +7264,6 @@ void MESH_OT_select_axis(wmOperatorType *ot)
/* properties */
RNA_def_enum(ot->srna, "mode", axis_mode_items, 0, "Axis Mode", "Axis side to use when selecting");
- RNA_def_int(ot->srna, "axis", 0, 0, 2, "Axis", "Select the axis to compare each vertex on", 0, 2);
+ RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Select the axis to compare each vertex on");
}