Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
| Show First 20 Lines • Show All 428 Lines • ▼ Show 20 Lines | if (relation->ob != object) { | ||||
| add_relation(eff_key, key, name); | add_relation(eff_key, key, name); | ||||
| if (ELEM(relation->pd->shape, PFIELD_SHAPE_SURFACE, PFIELD_SHAPE_POINTS) || | if (ELEM(relation->pd->shape, PFIELD_SHAPE_SURFACE, PFIELD_SHAPE_POINTS) || | ||||
| relation->pd->forcefield == PFIELD_GUIDE) { | relation->pd->forcefield == PFIELD_GUIDE) { | ||||
| ComponentKey mod_key(&relation->ob->id, NodeType::GEOMETRY); | ComponentKey mod_key(&relation->ob->id, NodeType::GEOMETRY); | ||||
| add_relation(mod_key, key, name); | add_relation(mod_key, key, name); | ||||
| } | } | ||||
| /* Force field Texture. */ | |||||
| if ((relation->pd != nullptr) && (relation->pd->forcefield == PFIELD_TEXTURE) && | |||||
| (relation->pd->tex != nullptr)) { | |||||
| ComponentKey tex_key(&relation->pd->tex->id, NodeType::GENERIC_DATABLOCK); | |||||
| add_relation(tex_key, key, "Force field Texture"); | |||||
| } | |||||
| /* Smoke flow relations. */ | /* Smoke flow relations. */ | ||||
| if (relation->pd->forcefield == PFIELD_FLUIDFLOW && relation->pd->f_source) { | if (relation->pd->forcefield == PFIELD_FLUIDFLOW && relation->pd->f_source) { | ||||
| ComponentKey trf_key(&relation->pd->f_source->id, NodeType::TRANSFORM); | ComponentKey trf_key(&relation->pd->f_source->id, NodeType::TRANSFORM); | ||||
| add_relation(trf_key, key, "Smoke Force Domain"); | add_relation(trf_key, key, "Smoke Force Domain"); | ||||
| ComponentKey eff_key(&relation->pd->f_source->id, NodeType::GEOMETRY); | ComponentKey eff_key(&relation->pd->f_source->id, NodeType::GEOMETRY); | ||||
| add_relation(eff_key, key, "Smoke Force Domain"); | add_relation(eff_key, key, "Smoke Force Domain"); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | void DepsgraphRelationBuilder::build_object(Object *object) | ||||
| /* Animation data */ | /* Animation data */ | ||||
| build_animdata(&object->id); | build_animdata(&object->id); | ||||
| /* Object data. */ | /* Object data. */ | ||||
| build_object_data(object); | build_object_data(object); | ||||
| /* Particle systems. */ | /* Particle systems. */ | ||||
| if (object->particlesystem.first != nullptr) { | if (object->particlesystem.first != nullptr) { | ||||
| build_particle_systems(object); | build_particle_systems(object); | ||||
| } | } | ||||
| /* Force field Texture. */ | |||||
| if ((object->pd != nullptr) && (object->pd->forcefield == PFIELD_TEXTURE) && | |||||
| (object->pd->tex != nullptr)) { | |||||
| build_texture(object->pd->tex); | |||||
| } | |||||
| /* Proxy object to copy from. */ | /* Proxy object to copy from. */ | ||||
| build_object_proxy_from(object); | build_object_proxy_from(object); | ||||
| build_object_proxy_group(object); | build_object_proxy_group(object); | ||||
| /* Object dupligroup. */ | /* Object dupligroup. */ | ||||
| if (object->instance_collection != nullptr) { | if (object->instance_collection != nullptr) { | ||||
| build_collection(nullptr, object, object->instance_collection); | build_collection(nullptr, object, object->instance_collection); | ||||
| } | } | ||||
| /* Point caches. */ | /* Point caches. */ | ||||
| ▲ Show 20 Lines • Show All 997 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (EffectorRelation *, effector_relation, effector_relations) { | ||||
| ComponentKey effector_transform_key(&effector_relation->ob->id, NodeType::TRANSFORM); | ComponentKey effector_transform_key(&effector_relation->ob->id, NodeType::TRANSFORM); | ||||
| add_relation(effector_transform_key, rb_init_key, "RigidBody Field"); | add_relation(effector_transform_key, rb_init_key, "RigidBody Field"); | ||||
| if (effector_relation->pd != nullptr) { | if (effector_relation->pd != nullptr) { | ||||
| const short shape = effector_relation->pd->shape; | const short shape = effector_relation->pd->shape; | ||||
| if (ELEM(shape, PFIELD_SHAPE_SURFACE, PFIELD_SHAPE_POINTS)) { | if (ELEM(shape, PFIELD_SHAPE_SURFACE, PFIELD_SHAPE_POINTS)) { | ||||
| ComponentKey effector_geometry_key(&effector_relation->ob->id, NodeType::GEOMETRY); | ComponentKey effector_geometry_key(&effector_relation->ob->id, NodeType::GEOMETRY); | ||||
| add_relation(effector_geometry_key, rb_init_key, "RigidBody Field"); | add_relation(effector_geometry_key, rb_init_key, "RigidBody Field"); | ||||
| } | } | ||||
| if ((effector_relation->pd->forcefield == PFIELD_TEXTURE) && | |||||
JacquesLucke: This null check can be skipped, because it is done a few lines above. | |||||
| (effector_relation->pd->tex != nullptr)) { | |||||
| ComponentKey tex_key(&effector_relation->pd->tex->id, NodeType::GENERIC_DATABLOCK); | |||||
| add_relation(tex_key, rb_init_key, "Force field Texture"); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| /* Objects. */ | /* Objects. */ | ||||
| if (rbw->group != nullptr) { | if (rbw->group != nullptr) { | ||||
| build_collection(nullptr, nullptr, rbw->group); | build_collection(nullptr, nullptr, rbw->group); | ||||
| FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (rbw->group, object) { | FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (rbw->group, object) { | ||||
| if (object->type != OB_MESH) { | if (object->type != OB_MESH) { | ||||
| continue; | continue; | ||||
| ▲ Show 20 Lines • Show All 1,215 Lines • Show Last 20 Lines | |||||
This null check can be skipped, because it is done a few lines above.