2022-02-11 09:07:11 +11:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
2023-02-22 10:16:42 +01:00
|
|
|
* Copyright 2005 Blender Foundation */
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup modifiers
|
2011-02-25 13:57:17 +00:00
|
|
|
*/
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
#include <cstddef>
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2010-05-14 07:09:15 +00:00
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
|
2021-10-27 14:40:18 +02:00
|
|
|
#include "BLI_task.h"
|
2019-02-25 11:39:14 +01:00
|
|
|
#include "BLI_utildefines.h"
|
|
|
|
|
|
2020-06-05 10:41:03 -04:00
|
|
|
#include "BLT_translation.h"
|
|
|
|
|
|
2018-08-29 15:32:50 +02:00
|
|
|
#include "DNA_collection_types.h"
|
2019-12-16 15:50:14 +01:00
|
|
|
#include "DNA_fluid_types.h"
|
2018-09-20 12:04:17 +02:00
|
|
|
#include "DNA_mesh_types.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "DNA_object_force_types.h"
|
|
|
|
|
#include "DNA_object_types.h"
|
|
|
|
|
#include "DNA_scene_types.h"
|
2020-06-05 10:41:03 -04:00
|
|
|
#include "DNA_screen_types.h"
|
2010-08-04 04:01:27 +00:00
|
|
|
|
2020-06-05 10:41:03 -04:00
|
|
|
#include "BKE_context.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "BKE_fluid.h"
|
2017-04-21 14:28:23 +02:00
|
|
|
#include "BKE_layer.h"
|
2020-02-10 12:58:59 +01:00
|
|
|
#include "BKE_lib_query.h"
|
2010-04-11 22:12:30 +00:00
|
|
|
#include "BKE_modifier.h"
|
2020-06-05 10:41:03 -04:00
|
|
|
#include "BKE_screen.h"
|
|
|
|
|
|
|
|
|
|
#include "UI_interface.h"
|
|
|
|
|
#include "UI_resources.h"
|
|
|
|
|
|
|
|
|
|
#include "RNA_access.h"
|
2022-03-14 16:54:46 +01:00
|
|
|
#include "RNA_prototypes.h"
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2017-07-21 11:53:13 +02:00
|
|
|
#include "DEG_depsgraph.h"
|
Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:
- More granular dependency relation nature, which solves issues with fake cycles
in the dependencies.
- Move towards all-animatable, by better integration of drivers into the system.
- Lay down some basis for upcoming copy-on-write, overrides and so on.
The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.
It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.
There are number of assorted documents related on the design of the new system:
* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph
There are also some user-related information online:
* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/
Kudos to everyone who was involved into the project:
- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 15:05:57 +05:00
|
|
|
#include "DEG_depsgraph_build.h"
|
2018-06-25 16:04:56 +02:00
|
|
|
#include "DEG_depsgraph_physics.h"
|
2018-06-22 15:03:42 +02:00
|
|
|
#include "DEG_depsgraph_query.h"
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
#include "MOD_modifiertypes.hh"
|
|
|
|
|
#include "MOD_ui_common.hh"
|
2017-08-01 09:06:34 +10:00
|
|
|
|
2018-06-17 17:04:27 +02:00
|
|
|
static void initData(ModifierData *md)
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2020-07-03 11:51:15 +02:00
|
|
|
FluidModifierData *fmd = (FluidModifierData *)md;
|
2018-06-17 17:04:27 +02:00
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
fmd->domain = nullptr;
|
|
|
|
|
fmd->flow = nullptr;
|
|
|
|
|
fmd->effector = nullptr;
|
2020-07-03 11:51:15 +02:00
|
|
|
fmd->type = 0;
|
|
|
|
|
fmd->time = -1;
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2018-09-20 14:41:47 +02:00
|
|
|
static void copyData(const ModifierData *md, ModifierData *target, const int flag)
|
2010-05-14 07:09:15 +00:00
|
|
|
{
|
2019-12-17 08:38:08 +11:00
|
|
|
#ifndef WITH_FLUID
|
|
|
|
|
UNUSED_VARS(md, target, flag);
|
|
|
|
|
#else
|
2020-07-03 11:51:15 +02:00
|
|
|
const FluidModifierData *fmd = (const FluidModifierData *)md;
|
|
|
|
|
FluidModifierData *tfmd = (FluidModifierData *)target;
|
2018-06-17 17:04:27 +02:00
|
|
|
|
2020-07-03 11:51:15 +02:00
|
|
|
BKE_fluid_modifier_free(tfmd);
|
|
|
|
|
BKE_fluid_modifier_copy(fmd, tfmd, flag);
|
2019-12-17 08:38:08 +11:00
|
|
|
#endif /* WITH_FLUID */
|
2010-05-14 07:09:15 +00:00
|
|
|
}
|
|
|
|
|
|
2010-04-11 22:12:30 +00:00
|
|
|
static void freeData(ModifierData *md)
|
|
|
|
|
{
|
2019-12-17 08:38:08 +11:00
|
|
|
#ifndef WITH_FLUID
|
|
|
|
|
UNUSED_VARS(md);
|
|
|
|
|
#else
|
2020-07-03 11:51:15 +02:00
|
|
|
FluidModifierData *fmd = (FluidModifierData *)md;
|
2018-06-17 17:04:27 +02:00
|
|
|
|
2020-07-03 11:51:15 +02:00
|
|
|
BKE_fluid_modifier_free(fmd);
|
2019-12-17 08:38:08 +11:00
|
|
|
#endif /* WITH_FLUID */
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2022-09-14 14:49:40 -05:00
|
|
|
static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_masks)
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2020-07-03 11:51:15 +02:00
|
|
|
FluidModifierData *fmd = (FluidModifierData *)md;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-07-03 11:51:15 +02:00
|
|
|
if (fmd && (fmd->type & MOD_FLUID_TYPE_FLOW) && fmd->flow) {
|
|
|
|
|
if (fmd->flow->source == FLUID_FLOW_SOURCE_MESH) {
|
2012-10-10 13:18:07 +00:00
|
|
|
/* vertex groups */
|
2020-07-03 11:51:15 +02:00
|
|
|
if (fmd->flow->vgroup_density) {
|
Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.
Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!
As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).
Reviewers: brecht, campbellbarton, sergey
Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:13:40 +01:00
|
|
|
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
2012-10-10 13:18:07 +00:00
|
|
|
/* uv layer */
|
2020-07-03 11:51:15 +02:00
|
|
|
if (fmd->flow->texture_type == FLUID_FLOW_TEXTURE_MAP_UV) {
|
Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.
Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!
As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).
Reviewers: brecht, campbellbarton, sergey
Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:13:40 +01:00
|
|
|
r_cddata_masks->fmask |= CD_MASK_MTFACE;
|
2019-04-22 09:15:10 +10:00
|
|
|
}
|
2012-10-10 13:18:07 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
struct FluidIsolationData {
|
2021-10-27 14:40:18 +02:00
|
|
|
Depsgraph *depsgraph;
|
|
|
|
|
Object *object;
|
|
|
|
|
Mesh *mesh;
|
|
|
|
|
FluidModifierData *fmd;
|
|
|
|
|
|
|
|
|
|
Mesh *result;
|
2023-05-04 18:35:37 +02:00
|
|
|
};
|
2021-10-27 14:40:18 +02:00
|
|
|
|
2021-10-28 00:24:22 +11:00
|
|
|
#ifdef WITH_FLUID
|
2021-10-27 14:40:18 +02:00
|
|
|
static void fluid_modifier_do_isolated(void *userdata)
|
|
|
|
|
{
|
|
|
|
|
FluidIsolationData *isolation_data = (FluidIsolationData *)userdata;
|
|
|
|
|
|
|
|
|
|
Scene *scene = DEG_get_evaluated_scene(isolation_data->depsgraph);
|
|
|
|
|
|
|
|
|
|
Mesh *result = BKE_fluid_modifier_do(isolation_data->fmd,
|
|
|
|
|
isolation_data->depsgraph,
|
|
|
|
|
scene,
|
|
|
|
|
isolation_data->object,
|
|
|
|
|
isolation_data->mesh);
|
|
|
|
|
isolation_data->result = result ? result : isolation_data->mesh;
|
|
|
|
|
}
|
2021-10-28 00:24:22 +11:00
|
|
|
#endif /* WITH_FLUID */
|
2021-10-27 14:40:18 +02:00
|
|
|
|
2020-04-21 13:09:41 +02:00
|
|
|
static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *me)
|
2012-10-10 13:18:07 +00:00
|
|
|
{
|
2019-12-17 08:38:08 +11:00
|
|
|
#ifndef WITH_FLUID
|
|
|
|
|
UNUSED_VARS(md, ctx);
|
|
|
|
|
return me;
|
|
|
|
|
#else
|
2020-07-03 11:51:15 +02:00
|
|
|
FluidModifierData *fmd = (FluidModifierData *)md;
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2018-06-22 15:03:42 +02:00
|
|
|
if (ctx->flag & MOD_APPLY_ORCO) {
|
2018-09-20 12:33:45 +02:00
|
|
|
return me;
|
2018-06-22 15:03:42 +02:00
|
|
|
}
|
2013-12-19 18:25:14 +01:00
|
|
|
|
2021-10-27 14:40:18 +02:00
|
|
|
/* Isolate execution of Mantaflow when running from dependency graph. The reason for this is
|
|
|
|
|
* because Mantaflow uses TBB to parallel its own computation which without isolation will start
|
|
|
|
|
* stealing tasks from dependency graph. Stealing tasks from the dependency graph might cause
|
|
|
|
|
* a recursive lock when Python drivers are used (because Mantaflow is interfaced via Python as
|
|
|
|
|
* well. */
|
|
|
|
|
FluidIsolationData isolation_data;
|
|
|
|
|
isolation_data.depsgraph = ctx->depsgraph;
|
|
|
|
|
isolation_data.object = ctx->object;
|
|
|
|
|
isolation_data.mesh = me;
|
|
|
|
|
isolation_data.fmd = fmd;
|
|
|
|
|
BLI_task_isolate(fluid_modifier_do_isolated, &isolation_data);
|
|
|
|
|
|
|
|
|
|
return isolation_data.result;
|
2019-12-17 08:38:08 +11:00
|
|
|
#endif /* WITH_FLUID */
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
static bool dependsOnTime(Scene * /*scene*/, ModifierData * /*md*/)
|
2010-04-11 22:12:30 +00:00
|
|
|
{
|
2013-06-02 03:59:19 +00:00
|
|
|
return true;
|
2010-04-11 22:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
static bool is_flow_cb(Object * /*ob*/, ModifierData *md)
|
2015-03-10 16:51:29 +05:00
|
|
|
{
|
2020-07-03 11:51:15 +02:00
|
|
|
FluidModifierData *fmd = (FluidModifierData *)md;
|
|
|
|
|
return (fmd->type & MOD_FLUID_TYPE_FLOW) && fmd->flow;
|
2015-03-10 16:51:29 +05:00
|
|
|
}
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
static bool is_coll_cb(Object * /*ob*/, ModifierData *md)
|
2015-03-10 16:51:29 +05:00
|
|
|
{
|
2020-07-03 11:51:15 +02:00
|
|
|
FluidModifierData *fmd = (FluidModifierData *)md;
|
|
|
|
|
return (fmd->type & MOD_FLUID_TYPE_EFFEC) && fmd->effector;
|
2015-03-10 16:51:29 +05:00
|
|
|
}
|
|
|
|
|
|
2018-02-22 12:54:06 +01:00
|
|
|
static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
|
Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:
- More granular dependency relation nature, which solves issues with fake cycles
in the dependencies.
- Move towards all-animatable, by better integration of drivers into the system.
- Lay down some basis for upcoming copy-on-write, overrides and so on.
The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.
It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.
There are number of assorted documents related on the design of the new system:
* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph
There are also some user-related information online:
* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/
Kudos to everyone who was involved into the project:
- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 15:05:57 +05:00
|
|
|
{
|
2020-07-03 11:51:15 +02:00
|
|
|
FluidModifierData *fmd = (FluidModifierData *)md;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-07-03 11:51:15 +02:00
|
|
|
if (fmd && (fmd->type & MOD_FLUID_TYPE_DOMAIN) && fmd->domain) {
|
2018-06-22 14:42:03 +02:00
|
|
|
DEG_add_collision_relations(ctx->node,
|
|
|
|
|
ctx->object,
|
2020-07-03 11:51:15 +02:00
|
|
|
fmd->domain->fluid_group,
|
2019-12-16 15:50:14 +01:00
|
|
|
eModifierType_Fluid,
|
2018-06-22 14:42:03 +02:00
|
|
|
is_flow_cb,
|
2019-12-16 15:50:14 +01:00
|
|
|
"Fluid Flow");
|
2018-06-22 14:42:03 +02:00
|
|
|
DEG_add_collision_relations(ctx->node,
|
|
|
|
|
ctx->object,
|
2020-07-03 11:51:15 +02:00
|
|
|
fmd->domain->effector_group,
|
2019-12-16 15:50:14 +01:00
|
|
|
eModifierType_Fluid,
|
2018-06-22 14:42:03 +02:00
|
|
|
is_coll_cb,
|
2019-12-16 15:50:14 +01:00
|
|
|
"Fluid Effector");
|
2018-06-22 14:42:03 +02:00
|
|
|
DEG_add_forcefield_relations(ctx->node,
|
|
|
|
|
ctx->object,
|
2020-07-03 11:51:15 +02:00
|
|
|
fmd->domain->effector_weights,
|
2018-06-22 14:42:03 +02:00
|
|
|
true,
|
2020-05-14 10:30:11 +02:00
|
|
|
PFIELD_FLUIDFLOW,
|
2019-12-16 15:50:14 +01:00
|
|
|
"Fluid Force Field");
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
if (fmd->domain->guide_parent != nullptr) {
|
2019-12-16 15:50:14 +01:00
|
|
|
DEG_add_object_relation(
|
2020-07-03 11:51:15 +02:00
|
|
|
ctx->node, fmd->domain->guide_parent, DEG_OB_COMP_TRANSFORM, "Fluid Guiding Object");
|
2019-12-16 15:50:14 +01:00
|
|
|
DEG_add_object_relation(
|
2020-07-03 11:51:15 +02:00
|
|
|
ctx->node, fmd->domain->guide_parent, DEG_OB_COMP_GEOMETRY, "Fluid Guiding Object");
|
2019-12-16 15:50:14 +01:00
|
|
|
}
|
Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:
- More granular dependency relation nature, which solves issues with fake cycles
in the dependencies.
- Move towards all-animatable, by better integration of drivers into the system.
- Lay down some basis for upcoming copy-on-write, overrides and so on.
The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.
It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.
There are number of assorted documents related on the design of the new system:
* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph
There are also some user-related information online:
* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/
Kudos to everyone who was involved into the project:
- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 15:05:57 +05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-12 08:04:56 +02:00
|
|
|
static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
|
2011-03-31 11:21:21 +00:00
|
|
|
{
|
2020-07-03 11:51:15 +02:00
|
|
|
FluidModifierData *fmd = (FluidModifierData *)md;
|
2011-03-31 11:21:21 +00:00
|
|
|
|
2020-07-03 11:51:15 +02:00
|
|
|
if (fmd->type == MOD_FLUID_TYPE_DOMAIN && fmd->domain) {
|
|
|
|
|
walk(userData, ob, (ID **)&fmd->domain->effector_group, IDWALK_CB_NOP);
|
|
|
|
|
walk(userData, ob, (ID **)&fmd->domain->fluid_group, IDWALK_CB_NOP);
|
|
|
|
|
walk(userData, ob, (ID **)&fmd->domain->force_group, IDWALK_CB_NOP);
|
2019-12-16 15:50:14 +01:00
|
|
|
|
2020-07-03 11:51:15 +02:00
|
|
|
if (fmd->domain->guide_parent) {
|
|
|
|
|
walk(userData, ob, (ID **)&fmd->domain->guide_parent, IDWALK_CB_NOP);
|
2019-12-16 15:50:14 +01:00
|
|
|
}
|
2011-06-08 16:00:52 +00:00
|
|
|
|
2020-07-03 11:51:15 +02:00
|
|
|
if (fmd->domain->effector_weights) {
|
2022-08-25 17:21:39 +02:00
|
|
|
walk(userData, ob, (ID **)&fmd->domain->effector_weights->group, IDWALK_CB_USER);
|
2011-06-08 16:00:52 +00:00
|
|
|
}
|
2011-03-31 11:21:21 +00:00
|
|
|
}
|
2012-10-10 13:18:07 +00:00
|
|
|
|
2020-07-03 11:51:15 +02:00
|
|
|
if (fmd->type == MOD_FLUID_TYPE_FLOW && fmd->flow) {
|
|
|
|
|
walk(userData, ob, (ID **)&fmd->flow->noise_texture, IDWALK_CB_USER);
|
2012-10-10 13:18:07 +00:00
|
|
|
}
|
2011-03-31 11:21:21 +00:00
|
|
|
}
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
static void panel_draw(const bContext * /*C*/, Panel *panel)
|
2020-06-05 10:41:03 -04:00
|
|
|
{
|
|
|
|
|
uiLayout *layout = panel->layout;
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, nullptr);
|
2020-06-05 10:41:03 -04:00
|
|
|
|
2021-11-02 17:50:18 +01:00
|
|
|
uiItemL(layout, TIP_("Settings are inside the Physics tab"), ICON_NONE);
|
2020-06-05 10:41:03 -04:00
|
|
|
|
2020-09-02 14:13:26 -05:00
|
|
|
modifier_panel_end(layout, ptr);
|
2020-06-05 10:41:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void panelRegister(ARegionType *region_type)
|
|
|
|
|
{
|
|
|
|
|
modifier_panel_register(region_type, eModifierType_Fluid, panel_draw);
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-16 15:50:14 +01:00
|
|
|
ModifierTypeInfo modifierType_Fluid = {
|
2023-01-16 12:41:11 +11:00
|
|
|
/*name*/ N_("Fluid"),
|
|
|
|
|
/*structName*/ "FluidModifierData",
|
|
|
|
|
/*structSize*/ sizeof(FluidModifierData),
|
|
|
|
|
/*srna*/ &RNA_FluidModifier,
|
|
|
|
|
/*type*/ eModifierTypeType_Constructive,
|
|
|
|
|
/*flags*/ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_Single,
|
|
|
|
|
/*icon*/ ICON_MOD_FLUIDSIM,
|
|
|
|
|
|
|
|
|
|
/*copyData*/ copyData,
|
|
|
|
|
|
2023-05-04 18:35:37 +02:00
|
|
|
/*deformVerts*/ nullptr,
|
|
|
|
|
/*deformMatrices*/ nullptr,
|
|
|
|
|
/*deformVertsEM*/ nullptr,
|
|
|
|
|
/*deformMatricesEM*/ nullptr,
|
2023-01-16 12:41:11 +11:00
|
|
|
/*modifyMesh*/ modifyMesh,
|
2023-05-04 18:35:37 +02:00
|
|
|
/*modifyGeometrySet*/ nullptr,
|
2023-01-16 12:41:11 +11:00
|
|
|
|
|
|
|
|
/*initData*/ initData,
|
|
|
|
|
/*requiredDataMask*/ requiredDataMask,
|
|
|
|
|
/*freeData*/ freeData,
|
2023-05-04 18:35:37 +02:00
|
|
|
/*isDisabled*/ nullptr,
|
2023-01-16 12:41:11 +11:00
|
|
|
/*updateDepsgraph*/ updateDepsgraph,
|
|
|
|
|
/*dependsOnTime*/ dependsOnTime,
|
2023-05-04 18:35:37 +02:00
|
|
|
/*dependsOnNormals*/ nullptr,
|
2023-01-16 12:41:11 +11:00
|
|
|
/*foreachIDLink*/ foreachIDLink,
|
2023-05-04 18:35:37 +02:00
|
|
|
/*foreachTexLink*/ nullptr,
|
|
|
|
|
/*freeRuntimeData*/ nullptr,
|
2023-01-16 12:41:11 +11:00
|
|
|
/*panelRegister*/ panelRegister,
|
2023-05-04 18:35:37 +02:00
|
|
|
/*blendWrite*/ nullptr,
|
|
|
|
|
/*blendRead*/ nullptr,
|
2010-04-11 22:12:30 +00:00
|
|
|
};
|