Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/fluid.c
| Show First 20 Lines • Show All 491 Lines • ▼ Show 20 Lines | if (scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) { | ||||
| /* Convert gravity to domain space. */ | /* Convert gravity to domain space. */ | ||||
| gravity_mag = len_v3(gravity); | gravity_mag = len_v3(gravity); | ||||
| mul_mat3_m4_v3(mds->imat, gravity); | mul_mat3_m4_v3(mds->imat, gravity); | ||||
| normalize_v3(gravity); | normalize_v3(gravity); | ||||
| mul_v3_fl(gravity, gravity_mag); | mul_v3_fl(gravity, gravity_mag); | ||||
| copy_v3_v3(mds->gravity, gravity); | copy_v3_v3(mds->gravity, gravity); | ||||
| } | } | ||||
| mul_v3_fl(mds->gravity, mds->effector_weights->global_gravity); | |||||
| } | } | ||||
| static bool BKE_fluid_modifier_init( | static bool BKE_fluid_modifier_init( | ||||
| FluidModifierData *mmd, Depsgraph *depsgraph, Object *ob, Scene *scene, Mesh *me) | FluidModifierData *mmd, Depsgraph *depsgraph, Object *ob, Scene *scene, Mesh *me) | ||||
| { | { | ||||
| int scene_framenr = (int)DEG_get_ctime(depsgraph); | int scene_framenr = (int)DEG_get_ctime(depsgraph); | ||||
| if ((mmd->type & MOD_FLUID_TYPE_DOMAIN) && mmd->domain && !mmd->domain->fluid) { | if ((mmd->type & MOD_FLUID_TYPE_DOMAIN) && mmd->domain && !mmd->domain->fluid) { | ||||
| ▲ Show 20 Lines • Show All 4,701 Lines • Show Last 20 Lines | |||||