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:
authorJanne Karhu <jhkarh@gmail.com>2010-09-03 11:50:22 +0400
committerJanne Karhu <jhkarh@gmail.com>2010-09-03 11:50:22 +0400
commitb0c4b1216d9f298d688f2bd7ad5336473664c900 (patch)
tree4a1849f809e1c77e6d04985b3e35871eb66cb035 /source/blender/editors/object/object_modifier.c
parentd89d724c461a30a052c55ac9c6ab9616e6cc61c7 (diff)
Fix for [#21101] Switch off collision at collision object is not recognised by falling softbody Object
* When removing a modifier that effects the depsgraph the DAG_scene_sort has to be done after the update call so that dynamic systems can clear the collision surface properly.
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r--source/blender/editors/object/object_modifier.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 5cc6cb9107d..7cf24d5d07d 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -142,6 +142,7 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Object *ob, ModifierData *md)
{
ModifierData *obmd;
+ int sort_depsgraph = 0;
/* It seems on rapid delete it is possible to
* get called twice on same modifier, so make
@@ -174,13 +175,13 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob
if(ob->pd)
ob->pd->deflect= 0;
- DAG_scene_sort(bmain, scene);
+ sort_depsgraph = 1;
}
else if(md->type == eModifierType_Surface) {
if(ob->pd && ob->pd->shape == PFIELD_SHAPE_SURFACE)
ob->pd->shape = PFIELD_SHAPE_PLANE;
- DAG_scene_sort(bmain, scene);
+ sort_depsgraph = 1;
}
else if(md->type == eModifierType_Smoke) {
ob->dt = OB_TEXTURE;
@@ -197,6 +198,10 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ /* sorting has to be done after the update so that dynamic systems can react properly */
+ if(sort_depsgraph)
+ DAG_scene_sort(bmain, scene);
+
return 1;
}