diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-21 02:27:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-21 02:27:08 +0400 |
commit | 6193c47c39dc72472f4b83b3e3c875103c31e5b6 (patch) | |
tree | cba1532bb97c183455b934a2b66e999adb1e6bc8 /source/blender/editors/curve | |
parent | 11500a359024470396d7b0b32f5fd00d101e5804 (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.c | 6 |
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 ************************/ |