From 2249c61d034bf35d26f3508e0397136c66f52da0 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 9 Feb 2009 22:59:26 +0000 Subject: [PATCH] 2.5 Bugfixes: Adjusted ranges for subdivide operators (Mesh + Armature). * The Mesh one was causing lockups as its range started from 0. Now it starts from 1. * Tweaked the soft-limits for subdivide operators to be easier to use (1-10 instead of 0-100) --- source/blender/editors/armature/editarmature.c | 4 ++-- source/blender/editors/mesh/editmesh_tools.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index b82c0d2a6c8..48078a77e85 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -3323,7 +3323,7 @@ void ARMATURE_OT_subdivide_multi(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* Properties */ - RNA_def_int(ot->srna, "number_cuts", 2, 1, 100, "Number of Cuts", "", 1, INT_MAX); + RNA_def_int(ot->srna, "number_cuts", 2, 1, 10, "Number of Cuts", "", 1, INT_MAX); } @@ -3379,7 +3379,7 @@ void ARMATURE_OT_subdivs(wmOperatorType *ot) RNA_def_enum(ot->srna, "type", type_items, 0, "Type", ""); /* this is temp, the ops are different, but they are called from subdivs, so all the possible props should be here as well*/ - RNA_def_int(ot->srna, "number_cuts", 2, 1, 100, "Number of Cuts", "", 1, INT_MAX); + RNA_def_int(ot->srna, "number_cuts", 2, 1, 10, "Number of Cuts", "", 1, INT_MAX); } /* ----------- */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 419971eff10..7830d4d0ae8 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -6611,7 +6611,7 @@ void MESH_OT_subdivide_multi(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "number_cuts", 4, 0, 100, "Number of Cuts", "", 0, INT_MAX); + RNA_def_int(ot->srna, "number_cuts", 4, 1, 100, "Number of Cuts", "", 1, INT_MAX); } static int subdivide_multi_fractal_exec(bContext *C, wmOperator *op) @@ -6641,7 +6641,7 @@ void MESH_OT_subdivide_multi_fractal(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, "number_cuts", 4, 0, 100, "Number of Cuts", "", 0, INT_MAX); + RNA_def_int(ot->srna, "number_cuts", 4, 1, 100, "Number of Cuts", "", 1, INT_MAX); RNA_def_float(ot->srna, "random_factor", 5.0, 0.0f, FLT_MAX, "Random Factor", "", 0.0f, 1000.0f); } @@ -6733,7 +6733,7 @@ void MESH_OT_subdivs(wmOperatorType *ot) RNA_def_enum(ot->srna, "type", type_items, 0, "Type", ""); /* this is temp, the ops are different, but they are called from subdivs, so all the possible props should be here as well*/ - RNA_def_int(ot->srna, "number_cuts", 4, 0, 100, "Number of Cuts", "", 0, INT_MAX); + RNA_def_int(ot->srna, "number_cuts", 4, 1, 10, "Number of Cuts", "", 1, INT_MAX); RNA_def_float(ot->srna, "random_factor", 5.0, 0.0f, FLT_MAX, "Random Factor", "", 0.0f, 1000.0f); RNA_def_float(ot->srna, "smoothness", 5.0f, 0.0f, 1000.0f, "Smoothness", "", 0.0f, FLT_MAX);