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/armature
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/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 5945d25f3ee..0bc0d214b8b 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -3584,6 +3584,8 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_subdivide(wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
/* identifiers */
ot->name= "Subdivide Multi";
ot->idname= "ARMATURE_OT_subdivide";
@@ -3597,7 +3599,9 @@ void ARMATURE_OT_subdivide(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* 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);
}
/* ----------- */