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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-06-11 15:21:16 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-06-11 15:21:16 +0400
commit568f0c70c13ed8aca358b9b50606c7cd671ce2e2 (patch)
treea7231d02b01017dd5c0dcfd2f45de6a8ba40cf03 /source/blender/makesrna
parente895c8302ea0f89a8a2040157d0f36e6ea978864 (diff)
Fix #35704: Simplify on scene with dupli recursion crashes
Couple of issues here: - User shouldn't be able to run into dupligroup recursion. It was checking already when setting a group for dupli. Added check to operator which adds object to group. - It's still possible files with recursion are hanging around, so made simplify function robust to such kind of crap.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index ec672522a76..0218c188062 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1255,6 +1255,12 @@ static void object_simplify_update(Object *ob)
ModifierData *md;
ParticleSystem *psys;
+ if ((ob->id.flag & LIB_DOIT) == 0) {
+ return;
+ }
+
+ ob->id.flag &= ~LIB_DOIT;
+
for (md = ob->modifiers.first; md; md = md->next) {
if (ELEM3(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem)) {
ob->recalc |= PSYS_RECALC_CHILD;
@@ -1279,6 +1285,7 @@ static void rna_Scene_use_simplify_update(Main *bmain, Scene *UNUSED(scene), Poi
Scene *sce_iter;
Base *base;
+ tag_main_lb(&bmain->object, TRUE);
for (SETLOOPER(sce, sce_iter, base))
object_simplify_update(base->object);