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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-21 02:27:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-21 02:27:08 +0400
commit6193c47c39dc72472f4b83b3e3c875103c31e5b6 (patch)
treecba1532bb97c183455b934a2b66e999adb1e6bc8 /source/blender/editors/curve
parent11500a359024470396d7b0b32f5fd00d101e5804 (diff)
disable re-using 'number_cuts' setting on operators, problem was that you could subdiv a plane many times but then go to subdivide a high poly mesh and it would start with really high subdiv value (possibly running out of ram and crashing).
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editcurve.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index b49ea7e5595..afa68ac5597 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -3171,6 +3171,8 @@ static int subdivide_exec(bContext *C, wmOperator *op)
void CURVE_OT_subdivide(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name= "Subdivide";
ot->description= "Subdivide selected segments";
@@ -3183,7 +3185,9 @@ void CURVE_OT_subdivide(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of cuts", "", 1, 10);
+ prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of cuts", "", 1, 10);
+ /* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/******************** find nearest ************************/