Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
| Show First 20 Lines • Show All 1,120 Lines • ▼ Show 20 Lines | void DepsgraphNodeBuilder::build_rigidbody(Scene *scene) | ||||
| sim_node->owner->entry_operation = sim_node; | sim_node->owner->entry_operation = sim_node; | ||||
| /* Objects - simulation participants. */ | /* Objects - simulation participants. */ | ||||
| if (rbw->group != nullptr) { | if (rbw->group != nullptr) { | ||||
| build_collection(nullptr, rbw->group); | build_collection(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; | ||||
| } | } | ||||
| if (object->rigidbody_object == nullptr) { | |||||
| continue; | |||||
| } | |||||
| if (object->rigidbody_object->type == RBO_TYPE_PASSIVE) { | |||||
| continue; | |||||
| } | |||||
| /* Create operation for flushing results. */ | /* Create operation for flushing results. */ | ||||
| /* Object's transform component - where the rigidbody operation | /* Object's transform component - where the rigidbody operation | ||||
| * lives. */ | * lives. */ | ||||
| add_operation_node( | add_operation_node( | ||||
| &object->id, | &object->id, | ||||
| NodeType::TRANSFORM, | NodeType::TRANSFORM, | ||||
| OperationCode::RIGIDBODY_TRANSFORM_COPY, | OperationCode::RIGIDBODY_TRANSFORM_COPY, | ||||
| function_bind( | function_bind( | ||||
| ▲ Show 20 Lines • Show All 786 Lines • Show Last 20 Lines | |||||