37 switch (modifier_type) {
54 if (
object ==
nullptr) {
64 if (
hash ==
nullptr) {
70 return hash->lookup_default(collection_orig,
nullptr);
75 unsigned int modifier_type)
80 if (
hash ==
nullptr) {
86 return hash->lookup_default(collection_orig,
nullptr);
94 unsigned int modifier_type,
102 Object *ob1 = relation->ob;
106 if (filter_function ==
nullptr ||
125 if (relation->ob ==
object) {
128 if (relation->pd->forcefield == skip_forcefield) {
144 if (relation->pd->forcefield ==
PFIELD_FLUIDFLOW && relation->pd->f_source !=
nullptr) {
166 if (
hash ==
nullptr) {
175 return hash->lookup_or_add_cb(collection_id, [&]() {
183 unsigned int modifier_type)
187 if (
hash ==
nullptr) {
196 return hash->lookup_or_add_cb(collection_id, [&]() {
struct ListBase * BKE_collision_relations_create(struct Depsgraph *depsgraph, struct Collection *collection, unsigned int modifier_type)
void BKE_collision_relations_free(struct ListBase *relations)
struct ListBase * BKE_effector_relations_create(struct Depsgraph *depsgraph, struct ViewLayer *view_layer, struct Collection *collection)
void BKE_effector_relations_free(struct ListBase *lb)
struct ModifierData * BKE_modifiers_findby_type(const struct Object *ob, ModifierType type)
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH(type, var, list)
struct Depsgraph Depsgraph
void DEG_add_object_pointcache_relation(struct DepsNodeHandle *node_handle, struct Object *object, eDepsObjectComponentType component, const char *description)
struct Depsgraph * DEG_get_graph_from_handle(struct DepsNodeHandle *node_handle)
@ DEG_PHYSICS_DYNAMIC_BRUSH
@ DEG_PHYSICS_SMOKE_COLLISION
@ DEG_PHYSICS_RELATIONS_NUM
bool(* DEG_CollobjFilterFunction)(struct Object *obj, struct ModifierData *md)
struct ID * DEG_get_original_id(struct ID *id)
Object groups, one object can be in many groups at once.
@ eModifierType_Collision
@ eModifierType_DynamicPaint
#define PFIELD_SHAPE_SURFACE
#define PFIELD_VISIBILITY
#define PFIELD_SHAPE_POINTS
Object is a sort of wrapper for general info.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
const Depsgraph * depsgraph
ListBase * DEG_get_collision_relations(const Depsgraph *graph, Collection *collection, unsigned int modifier_type)
static ID * object_id_safe(T *object)
void DEG_add_collision_relations(DepsNodeHandle *handle, Object *object, Collection *collection, unsigned int modifier_type, DEG_CollobjFilterFunction filter_function, const char *name)
void DEG_add_forcefield_relations(DepsNodeHandle *handle, Object *object, EffectorWeights *effector_weights, bool add_absorption, int skip_forcefield, const char *name)
static ePhysicsRelationType modifier_to_relation_type(unsigned int modifier_type)
ListBase * DEG_get_effector_relations(const Depsgraph *graph, Collection *collection)
ListBase * build_collision_relations(Depsgraph *graph, Collection *collection, unsigned int modifier_type)
ListBase * build_effector_relations(Depsgraph *graph, Collection *collection)
void clear_physics_relations(Depsgraph *graph)
struct Collection * group
Map< const ID *, ListBase * > * physics_relations[DEG_PHYSICS_RELATIONS_NUM]