Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_softbody.c')
-rw-r--r--source/blender/modifiers/intern/MOD_softbody.c81
1 files changed, 43 insertions, 38 deletions
diff --git a/source/blender/modifiers/intern/MOD_softbody.c b/source/blender/modifiers/intern/MOD_softbody.c
index 2ff50ee3977..48ccd9b83ed 100644
--- a/source/blender/modifiers/intern/MOD_softbody.c
+++ b/source/blender/modifiers/intern/MOD_softbody.c
@@ -40,57 +40,62 @@
#include "MOD_modifiertypes.h"
-static void deformVerts(
- ModifierData *UNUSED(md), const ModifierEvalContext *ctx,
- Mesh *UNUSED(derivedData),
- float (*vertexCos)[3],
- int numVerts)
+static void deformVerts(ModifierData *UNUSED(md),
+ const ModifierEvalContext *ctx,
+ Mesh *UNUSED(derivedData),
+ float (*vertexCos)[3],
+ int numVerts)
{
- Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
- sbObjectStep(ctx->depsgraph, scene, ctx->object, DEG_get_ctime(ctx->depsgraph), vertexCos, numVerts);
+ Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
+ sbObjectStep(
+ ctx->depsgraph, scene, ctx->object, DEG_get_ctime(ctx->depsgraph), vertexCos, numVerts);
}
static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return true;
+ return true;
}
static void updateDepsgraph(ModifierData *UNUSED(md), const ModifierUpdateDepsgraphContext *ctx)
{
- if (ctx->object->soft) {
- /* Actual code uses ccd_build_deflector_hash */
- DEG_add_collision_relations(ctx->node, ctx->object, ctx->object->soft->collision_group, eModifierType_Collision, NULL, "Softbody Collision");
- DEG_add_forcefield_relations(ctx->node, ctx->object, ctx->object->soft->effector_weights, true, 0, "Softbody Field");
- }
+ if (ctx->object->soft) {
+ /* Actual code uses ccd_build_deflector_hash */
+ DEG_add_collision_relations(ctx->node,
+ ctx->object,
+ ctx->object->soft->collision_group,
+ eModifierType_Collision,
+ NULL,
+ "Softbody Collision");
+ DEG_add_forcefield_relations(
+ ctx->node, ctx->object, ctx->object->soft->effector_weights, true, 0, "Softbody Field");
+ }
}
ModifierTypeInfo modifierType_Softbody = {
- /* name */ "Softbody",
- /* structName */ "SoftbodyModifierData",
- /* structSize */ sizeof(SoftbodyModifierData),
- /* type */ eModifierTypeType_OnlyDeform,
- /* flags */ eModifierTypeFlag_AcceptsCVs |
- eModifierTypeFlag_AcceptsLattice |
- eModifierTypeFlag_RequiresOriginalData |
- eModifierTypeFlag_Single,
+ /* name */ "Softbody",
+ /* structName */ "SoftbodyModifierData",
+ /* structSize */ sizeof(SoftbodyModifierData),
+ /* type */ eModifierTypeType_OnlyDeform,
+ /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsLattice |
+ eModifierTypeFlag_RequiresOriginalData | eModifierTypeFlag_Single,
- /* copyData */ NULL,
+ /* copyData */ NULL,
- /* deformVerts */ deformVerts,
- /* deformMatrices */ NULL,
- /* deformVertsEM */ NULL,
- /* deformMatricesEM */ NULL,
- /* applyModifier */ NULL,
+ /* deformVerts */ deformVerts,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ NULL,
- /* initData */ NULL,
- /* requiredDataMask */ NULL,
- /* freeData */ NULL,
- /* isDisabled */ NULL,
- /* updateDepsgraph */ updateDepsgraph,
- /* dependsOnTime */ dependsOnTime,
- /* dependsOnNormals */ NULL,
- /* foreachObjectLink */ NULL,
- /* foreachIDLink */ NULL,
- /* foreachTexLink */ NULL,
- /* freeRuntimeData */ NULL,
+ /* initData */ NULL,
+ /* requiredDataMask */ NULL,
+ /* freeData */ NULL,
+ /* isDisabled */ NULL,
+ /* updateDepsgraph */ updateDepsgraph,
+ /* dependsOnTime */ dependsOnTime,
+ /* dependsOnNormals */ NULL,
+ /* foreachObjectLink */ NULL,
+ /* foreachIDLink */ NULL,
+ /* foreachTexLink */ NULL,
+ /* freeRuntimeData */ NULL,
};