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/mesh/loopcut.c | |
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/mesh/loopcut.c')
-rw-r--r-- | source/blender/editors/mesh/loopcut.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index 86469ae5461..6b2a8bad6c1 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -564,6 +564,8 @@ void MESH_OT_edgering_select (wmOperatorType *ot) void MESH_OT_loopcut (wmOperatorType *ot) { + PropertyRNA *prop; + /* description */ ot->name= "Loop Cut"; ot->idname= "MESH_OT_loopcut"; @@ -579,5 +581,7 @@ void MESH_OT_loopcut (wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* properties */ - 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); } |