diff options
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build.cc | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc index 042cf801e6b..fccb5808711 100644 --- a/source/blender/depsgraph/intern/depsgraph_build.cc +++ b/source/blender/depsgraph/intern/depsgraph_build.cc @@ -43,12 +43,8 @@ extern "C" { #include "DNA_cachefile_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" -#include "DNA_object_force_types.h" #include "BKE_main.h" -#include "BKE_collision.h" -#include "BKE_effect.h" -#include "BKE_modifier.h" #include "BKE_scene.h" } /* extern "C" */ @@ -322,75 +318,3 @@ void DEG_relations_tag_update(Main *bmain) } } } - -void DEG_add_collision_relations(DepsNodeHandle *handle, - Object *object, - Collection *collection, - unsigned int modifier_type, - DEG_CollobjFilterFunction fn, - const char *name) -{ - Depsgraph *depsgraph = DEG_get_graph_from_handle(handle); - DEG::Depsgraph *deg_graph = (DEG::Depsgraph *)depsgraph; - ListBase *relations; - - if (modifier_type == eModifierType_Smoke) { - relations = deg_build_smoke_collision_relations(deg_graph, collection); - } - else { - relations = deg_build_collision_relations(deg_graph, collection); - } - - LISTBASE_FOREACH (CollisionRelation *, relation, relations) { - Object *ob1 = relation->ob; - if (ob1 != object) { - if (!fn || fn(ob1, modifiers_findByType(ob1, (ModifierType)modifier_type))) { - DEG_add_object_relation(handle, ob1, DEG_OB_COMP_TRANSFORM, name); - DEG_add_object_relation(handle, ob1, DEG_OB_COMP_GEOMETRY, name); - } - } - } -} - -void DEG_add_forcefield_relations(DepsNodeHandle *handle, - Object *object, - EffectorWeights *effector_weights, - bool add_absorption, - int skip_forcefield, - const char *name) -{ - Depsgraph *depsgraph = DEG_get_graph_from_handle(handle); - DEG::Depsgraph *deg_graph = (DEG::Depsgraph *)depsgraph; - ListBase *relations = deg_build_effector_relations(deg_graph, effector_weights->group); - - LISTBASE_FOREACH (EffectorRelation *, relation, relations) { - if (relation->ob != object && relation->pd->forcefield != skip_forcefield) { - DEG_add_object_relation(handle, relation->ob, DEG_OB_COMP_TRANSFORM, name); - if (relation->psys) { - DEG_add_object_relation(handle, relation->ob, DEG_OB_COMP_EVAL_PARTICLES, name); - /* TODO: remove this when/if EVAL_PARTICLES is sufficient - * for up to date particles. - */ - DEG_add_object_relation(handle, relation->ob, DEG_OB_COMP_GEOMETRY, name); - } - if (relation->pd->forcefield == PFIELD_SMOKEFLOW && relation->pd->f_source) { - DEG_add_object_relation(handle, - relation->pd->f_source, - DEG_OB_COMP_TRANSFORM, - "Smoke Force Domain"); - DEG_add_object_relation(handle, - relation->pd->f_source, - DEG_OB_COMP_GEOMETRY, - "Smoke Force Domain"); - } - if (add_absorption && (relation->pd->flag & PFIELD_VISIBILITY)) { - DEG_add_collision_relations(handle, - object, - NULL, - eModifierType_Collision, - NULL, - "Force Absorption"); - } - } - } -} |