Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph_physics.cc
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | switch (modifier_type) { | ||||
| case eModifierType_Collision: | case eModifierType_Collision: | ||||
| return DEG_PHYSICS_COLLISION; | return DEG_PHYSICS_COLLISION; | ||||
| case eModifierType_Fluid: | case eModifierType_Fluid: | ||||
| return DEG_PHYSICS_SMOKE_COLLISION; | return DEG_PHYSICS_SMOKE_COLLISION; | ||||
| case eModifierType_DynamicPaint: | case eModifierType_DynamicPaint: | ||||
| return DEG_PHYSICS_DYNAMIC_BRUSH; | return DEG_PHYSICS_DYNAMIC_BRUSH; | ||||
| } | } | ||||
| BLI_assert(!"Unknown collision modifier type"); | BLI_assert_msg(0, "Unknown collision modifier type"); | ||||
| return DEG_PHYSICS_RELATIONS_NUM; | return DEG_PHYSICS_RELATIONS_NUM; | ||||
| } | } | ||||
| /* Get ID from an ID type object, in a safe manner. This means that object can be nullptr, | /* Get ID from an ID type object, in a safe manner. This means that object can be nullptr, | ||||
| * in which case the function returns nullptr. | * in which case the function returns nullptr. | ||||
| */ | */ | ||||
| template<class T> static ID *object_id_safe(T *object) | template<class T> static ID *object_id_safe(T *object) | ||||
| { | { | ||||
| if (object == nullptr) { | if (object == nullptr) { | ||||
| ▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines | |||||