diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2016-07-31 11:56:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-31 11:57:19 +0300 |
commit | 64d4d6b134d5b36c43aa55e09ad92d8593a18269 (patch) | |
tree | 16f92a4f942ecb8d527093840a079889a1b10c08 /source/blender/blenkernel/intern/library_query.c | |
parent | 710ab5be36cda9cba547502d5327f400f15935bc (diff) |
Support limiting collisions by group for softbody and particles
This feature is extremely useful for layering multiple cloth objects,
and there is no reason there shouldn't be the same kind of feature for softbody.
Diffstat (limited to 'source/blender/blenkernel/intern/library_query.c')
-rw-r--r-- | source/blender/blenkernel/intern/library_query.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index 86602e6d70a..d71e8012e10 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -499,8 +499,12 @@ void BKE_library_foreach_ID_link(ID *id, LibraryIDLinkCallback callback, void *u BKE_particlesystem_id_loop(psys, library_foreach_particlesystemsObjectLooper, &data); } - if (object->soft && object->soft->effector_weights) { - CALLBACK_INVOKE(object->soft->effector_weights->group, IDWALK_NOP); + if (object->soft) { + CALLBACK_INVOKE(object->soft->collision_group, IDWALK_NOP); + + if (object->soft->effector_weights) { + CALLBACK_INVOKE(object->soft->effector_weights->group, IDWALK_NOP); + } } BKE_sca_sensors_id_loop(&object->sensors, library_foreach_sensorsObjectLooper, &data); @@ -715,6 +719,7 @@ void BKE_library_foreach_ID_link(ID *id, LibraryIDLinkCallback callback, void *u CALLBACK_INVOKE(psett->dup_group, IDWALK_NOP); CALLBACK_INVOKE(psett->dup_ob, IDWALK_NOP); CALLBACK_INVOKE(psett->bb_ob, IDWALK_NOP); + CALLBACK_INVOKE(psett->collision_group, IDWALK_NOP); for (i = 0; i < MAX_MTEX; i++) { if (psett->mtex[i]) { |