31# include <fmt/format.h>
54 Object *ob = id_cast<Object *>(ptr->owner_id);
60 rna_Fluid_update(bmain, scene, ptr);
68 if (settings->fmd && settings->fmd->domain) {
86 if (settings->fmd && settings->fmd->domain) {
98 if (settings->fmd && settings->fmd->domain) {
110 if (settings->fmd && settings->fmd->domain) {
122 if (settings->fmd && settings->fmd->domain) {
140 rna_Fluid_update(bmain, scene, ptr);
150 rna_Fluid_update(bmain, scene, ptr);
160 rna_Fluid_datacache_reset(bmain, scene, ptr);
161 rna_Fluid_update(bmain, scene, ptr);
171 rna_Fluid_noisecache_reset(bmain, scene, ptr);
172 rna_Fluid_update(bmain, scene, ptr);
182 rna_Fluid_meshcache_reset(bmain, scene, ptr);
183 rna_Fluid_update(bmain, scene, ptr);
193 rna_Fluid_particlescache_reset(bmain, scene, ptr);
194 rna_Fluid_update(bmain, scene, ptr);
204 rna_Fluid_dependency_update(bmain, scene, ptr);
207static void rna_Fluid_parts_create(
Main *bmain,
209 const char *pset_name,
210 const char *parts_name,
211 const char *psys_name,
215 UNUSED_VARS(bmain, ptr, pset_name, parts_name, psys_name, psys_type);
219 bmain, ob, pset_name, parts_name, psys_name,
eParticleType(psys_type));
226static void rna_Fluid_parts_delete(
Main *bmain,
PointerRNA *ptr,
int ptype)
239static bool rna_Fluid_parts_exists(
PointerRNA *ptr,
int ptype)
241 Object *ob = id_cast<Object *>(ptr->owner_id);
244 for (psys = ob->particlesystem.first(); psys; psys = psys->next) {
245 if (psys->part->
type == ptype) {
254 Object *ob = id_cast<Object *>(ptr->owner_id);
264 rna_Fluid_domain_data_reset(bmain, scene, ptr);
269 rna_Fluid_parts_create(
270 bmain, ptr,
"LiquidParticleSettings",
"Liquid",
"Liquid Particle System",
PART_FLUID_FLIP);
277 rna_Fluid_update(bmain, scene, ptr);
282 Object *ob = id_cast<Object *>(ptr->owner_id);
288 rna_Fluid_parts_create(
289 bmain, ptr,
"SprayParticleSettings",
"Spray",
"Spray Particle System",
PART_FLUID_SPRAY);
300 Object *ob = id_cast<Object *>(ptr->owner_id);
306 rna_Fluid_parts_create(bmain,
308 "BubbleParticleSettings",
310 "Bubble Particle System",
322 Object *ob = id_cast<Object *>(ptr->owner_id);
328 rna_Fluid_parts_create(
329 bmain, ptr,
"FoamParticleSettings",
"Foam",
"Foam Particle System",
PART_FLUID_FOAM);
340 Object *ob = id_cast<Object *>(ptr->owner_id);
346 rna_Fluid_parts_create(bmain,
348 "TracerParticleSettings",
350 "Tracer Particle System",
362 Object *ob = id_cast<Object *>(ptr->owner_id);
378 rna_Fluid_spray_parts_update(bmain, scene, ptr);
381 rna_Fluid_foam_parts_update(bmain, scene, ptr);
384 rna_Fluid_bubble_parts_update(bmain, scene, ptr);
390 rna_Fluid_parts_create(bmain,
392 "SprayFoamParticleSettings",
394 "Spray + Foam Particle System",
409 rna_Fluid_bubble_parts_update(bmain, scene, ptr);
416 rna_Fluid_parts_create(bmain,
418 "SprayBubbleParticleSettings",
420 "Spray + Bubble Particle System",
435 rna_Fluid_foam_parts_update(bmain, scene, ptr);
442 rna_Fluid_parts_create(bmain,
444 "FoamBubbleParticleSettings",
445 "Foam + Bubble Particles",
446 "Foam + Bubble Particle System",
461 rna_Fluid_spray_parts_update(bmain, scene, ptr);
465 else if (fmd->domain->sndparticle_combined_export ==
470 rna_Fluid_parts_create(bmain,
472 "SprayFoamBubbleParticleSettings",
473 "Spray + Foam + Bubbles",
474 "Spray + Foam + Bubble Particle System",
491 printf(
"ERROR: Unexpected combined export setting encountered!");
495static void rna_Fluid_cache_startframe_set(
PointerRNA *ptr,
int value)
501static void rna_Fluid_cache_endframe_set(
PointerRNA *ptr,
int value)
507static void rna_Fluid_cachetype_mesh_set(
PointerRNA *ptr,
int value)
513static void rna_Fluid_cachetype_data_set(
PointerRNA *ptr,
int value)
519static void rna_Fluid_cachetype_particle_set(
PointerRNA *ptr,
int value)
525static void rna_Fluid_cachetype_noise_set(
PointerRNA *ptr,
int value)
531static void rna_Fluid_cachetype_set(
PointerRNA *ptr,
int value)
535 if (value != settings->cache_type) {
537 settings->cache_flag = {};
548 if (par !=
nullptr) {
551 if (fmd_par && fmd_par->domain) {
552 fds->guide_parent =
static_cast<Object *
>(value.data);
557 fds->guide_parent =
nullptr;
571 tmp.identifier =
"BOBJECT";
572 tmp.name =
N_(
"Binary Object");
573 tmp.description =
N_(
"Binary object file format (.bobj.gz)");
577 tmp.identifier =
"OBJECT";
578 tmp.name =
N_(
"Object");
579 tmp.description =
N_(
"Object file format (.obj)");
598 tmp.identifier =
"UNI";
599 tmp.name =
N_(
"Uni Cache");
600 tmp.description =
N_(
"Uni file format (.uni)");
605 tmp.identifier =
"OPENVDB";
606 tmp.name =
N_(
"OpenVDB");
607 tmp.description =
N_(
"OpenVDB file format (.vdb)");
617 tmp.identifier =
"RAW";
618 tmp.name =
N_(
"Raw Cache");
619 tmp.description =
N_(
"Raw file format (.raw)");
639 tmp.identifier =
"UNI";
640 tmp.name =
N_(
"Uni Cache");
641 tmp.description =
N_(
"Uni file format");
650static void rna_Fluid_cache_directory_set(
PointerRNA *ptr,
const char *value)
654 if (
STREQ(settings->cache_directory, value)) {
658 STRNCPY(settings->cache_directory, value);
677 tmp.identifier =
"FLAGS";
679 tmp.name =
N_(
"Flags");
680 tmp.description =
N_(
"Flag grid of the fluid domain");
684 tmp.identifier =
"PRESSURE";
686 tmp.name =
N_(
"Pressure");
687 tmp.description =
N_(
"Pressure field of the fluid domain");
691 tmp.identifier =
"VELOCITY_X";
693 tmp.name =
N_(
"X Velocity");
694 tmp.description =
N_(
"X component of the velocity field");
698 tmp.identifier =
"VELOCITY_Y";
700 tmp.name =
N_(
"Y Velocity");
701 tmp.description =
N_(
"Y component of the velocity field");
705 tmp.identifier =
"VELOCITY_Z";
707 tmp.name =
N_(
"Z Velocity");
708 tmp.description =
N_(
"Z component of the velocity field");
712 tmp.identifier =
"FORCE_X";
714 tmp.name =
N_(
"X Force");
715 tmp.description =
N_(
"X component of the force field");
719 tmp.identifier =
"FORCE_Y";
721 tmp.name =
N_(
"Y Force");
722 tmp.description =
N_(
"Y component of the force field");
726 tmp.identifier =
"FORCE_Z";
728 tmp.name =
N_(
"Z Force");
729 tmp.description =
N_(
"Z component of the force field");
734 tmp.identifier =
"COLOR_R";
736 tmp.name =
N_(
"Red");
737 tmp.description =
N_(
"Red component of the color field");
741 tmp.identifier =
"COLOR_G";
743 tmp.name =
N_(
"Green");
744 tmp.description =
N_(
"Green component of the color field");
748 tmp.identifier =
"COLOR_B";
750 tmp.name =
N_(
"Blue");
751 tmp.description =
N_(
"Blue component of the color field");
755 tmp.identifier =
"DENSITY";
757 tmp.name =
N_(
"Density");
758 tmp.description =
N_(
"Quantity of soot in the fluid");
762 tmp.identifier =
"FLAME";
764 tmp.name =
N_(
"Flame");
765 tmp.description =
N_(
"Flame field");
769 tmp.identifier =
"FUEL";
771 tmp.name =
N_(
"Fuel");
772 tmp.description =
N_(
"Fuel field");
776 tmp.identifier =
"HEAT";
778 tmp.name =
N_(
"Heat");
779 tmp.description =
N_(
"Temperature of the fluid");
784 tmp.identifier =
"PHI";
786 tmp.name =
N_(
"Fluid Level Set");
787 tmp.description =
N_(
"Level set representation of the fluid");
791 tmp.identifier =
"PHI_IN";
793 tmp.name =
N_(
"Inflow Level Set");
794 tmp.description =
N_(
"Level set representation of the inflow");
798 tmp.identifier =
"PHI_OUT";
800 tmp.name =
N_(
"Outflow Level Set");
801 tmp.description =
N_(
"Level set representation of the outflow");
805 tmp.identifier =
"PHI_OBSTACLE";
807 tmp.name =
N_(
"Obstacle Level Set");
808 tmp.description =
N_(
"Level set representation of the obstacles");
830 tmp.identifier =
"32";
832 tmp.name =
N_(
"Full");
833 tmp.description =
N_(
"Use 32-bit floating-point numbers for all data");
837 tmp.identifier =
"16";
839 tmp.name =
N_(
"Half");
840 tmp.description =
N_(
"Use 16-bit floating-point numbers for all data");
845 tmp.identifier =
"8";
847 tmp.name =
N_(
"Mini");
848 tmp.description =
N_(
"Use 8-bit floating-point numbers where possible, otherwise use 16-bit");
858static void rna_Fluid_domaintype_set(
PointerRNA *ptr,
int value)
861 Object *ob = id_cast<Object *>(ptr->owner_id);
866static std::optional<std::string> rna_FluidDomainSettings_path(
const PointerRNA *ptr)
870 char name_esc[
sizeof(md->name) * 2];
873 return fmt::format(
"modifiers[\"{}\"].domain_settings", name_esc);
876static std::optional<std::string> rna_FluidFlowSettings_path(
const PointerRNA *ptr)
880 char name_esc[
sizeof(md->name) * 2];
883 return fmt::format(
"modifiers[\"{}\"].flow_settings", name_esc);
886static std::optional<std::string> rna_FluidEffectorSettings_path(
const PointerRNA *ptr)
890 char name_esc[
sizeof(md->name) * 2];
893 return fmt::format(
"modifiers[\"{}\"].effector_settings", name_esc);
902static int rna_FluidModifier_grid_get_length(
const PointerRNA *ptr,
906 float *density =
nullptr;
914 size = res[0] * res[1] * res[2];
918 else if (fds->fluid) {
920 size = fds->res[0] * fds->res[1] * fds->res[2];
924 length[0] = (density) ? size : 0;
928static int rna_FluidModifier_color_grid_get_length(
const PointerRNA *ptr,
931 rna_FluidModifier_grid_get_length(ptr,
length);
937static int rna_FluidModifier_velocity_grid_get_length(
const PointerRNA *ptr,
948 size = 3 * fds->res[0] * fds->res[1] * fds->res[2];
954 length[0] = (vx && vy && vz) ? size : 0;
958static int rna_FluidModifier_heat_grid_get_length(
const PointerRNA *ptr,
962 float *heat =
nullptr;
967 size = fds->res[0] * fds->res[1] * fds->res[2];
971 length[0] = (heat) ? size : 0;
975static void rna_FluidModifier_density_grid_get(
PointerRNA *ptr,
float *values)
979 int size = rna_FluidModifier_grid_get_length(ptr,
length);
995 memcpy(values, density, size *
sizeof(
float));
1000static void rna_FluidModifier_velocity_grid_get(
PointerRNA *ptr,
float *values)
1004 int size = rna_FluidModifier_velocity_grid_get_length(ptr,
length);
1005 float *vx, *vy, *vz;
1018 for (i = 0; i <
size; i += 3) {
1019 *(values++) = *(vx++);
1020 *(values++) = *(vy++);
1021 *(values++) = *(vz++);
1027static void rna_FluidModifier_color_grid_get(
PointerRNA *ptr,
float *values)
1031 int size = rna_FluidModifier_grid_get_length(ptr,
length);
1040 memset(values, 0, size *
sizeof(
float));
1064static void rna_FluidModifier_flame_grid_get(
PointerRNA *ptr,
float *values)
1068 int size = rna_FluidModifier_grid_get_length(ptr,
length);
1085 memcpy(values, flame, size *
sizeof(
float));
1088 memset(values, 0, size *
sizeof(
float));
1094static void rna_FluidModifier_heat_grid_get(
PointerRNA *ptr,
float *values)
1098 int size = rna_FluidModifier_heat_grid_get_length(ptr,
length);
1109 if (heat !=
nullptr) {
1111 for (
int i = 0; i <
size; i++) {
1112 values[i] = heat[i] * 0.5f;
1116 memset(values, 0, size *
sizeof(
float));
1122static void rna_FluidModifier_temperature_grid_get(
PointerRNA *ptr,
float *values)
1126 int size = rna_FluidModifier_grid_get_length(ptr,
length);
1144 float offset = fds->flame_ignition;
1145 float scale = fds->flame_max_temp - fds->flame_ignition;
1147 for (
int i = 0; i <
size; i++) {
1148 values[i] = (flame[i] > 0.01f) ? offset + flame[i] *
scale : 0.0f;
1152 memset(values, 0, size *
sizeof(
float));
1161static void rna_FluidFlow_density_vgroup_get(
PointerRNA *ptr,
char *value)
1167static int rna_FluidFlow_density_vgroup_length(
PointerRNA *ptr)
1173static void rna_FluidFlow_density_vgroup_set(
PointerRNA *ptr,
const char *value)
1179static void rna_FluidFlow_uvlayer_set(
PointerRNA *ptr,
const char *value)
1185static void rna_Fluid_use_color_ramp_set(
PointerRNA *ptr,
bool value)
1191 if (value && fds->coba ==
nullptr) {
1196static void rna_Fluid_flowsource_set(
PointerRNA *ptr,
int value)
1200 if (value != settings->source) {
1217 tmp.identifier =
"MESH";
1218 tmp.icon = ICON_META_CUBE;
1219 tmp.name =
N_(
"Mesh");
1220 tmp.description =
N_(
"Emit fluid from mesh surface or volume");
1225 tmp.identifier =
"PARTICLES";
1226 tmp.icon = ICON_PARTICLES;
1227 tmp.name =
N_(
"Particle System");
1228 tmp.description =
N_(
"Emit smoke from particles");
1238static void rna_Fluid_flowtype_set(
PointerRNA *ptr,
int value)
1242 if (value != settings->type) {
1250 settings->surface_distance = 0.0f;
1255 settings->surface_distance = 1.0f;
1274 {0,
nullptr, 0,
nullptr,
nullptr}};
1278# ifdef WITH_OPENVDB_BLOSC
1283 "Multithreaded compression, similar in size and quality as 'Zip'"},
1286 {0,
nullptr, 0,
nullptr,
nullptr}};
1292 {0,
nullptr, 0,
nullptr,
nullptr},
1301 "Bake every stage of the simulation separately"},
1303 {0,
nullptr, 0,
nullptr,
nullptr}};
1307 {0,
"NONE", 0,
"",
""},
1308 {0,
nullptr, 0,
nullptr,
nullptr},
1316 "Use improved particle level set (slower but more precise and with mesh smoothening "
1322 "Use union particle level set (faster but lower quality)"},
1323 {0,
nullptr, 0,
nullptr,
nullptr},
1331 "Use a fluid domain for guiding (domain needs to be baked already so that velocities can "
1332 "be extracted). Guiding domain can be of any type (i.e. gas or liquid)."},
1337 "Use guiding (effector) objects to create fluid guiding (guiding objects should be "
1338 "animated and baked once set up completely)"},
1339 {0,
nullptr, 0,
nullptr,
nullptr},
1347 {0,
nullptr, 0,
nullptr,
nullptr},
1356 "Smoothed high quality interpolation, but slower"},
1358 {0,
nullptr, 0,
nullptr,
nullptr},
1366 "Adjust slice direction according to the view direction"},
1370 {0,
nullptr, 0,
nullptr,
nullptr},
1376 {
VECTOR_DRAW_MAC,
"MAC", 0,
"MAC Grid",
"Display vector field as MAC grid"},
1377 {0,
nullptr, 0,
nullptr,
nullptr},
1385 "Velocity field of the fluid domain"},
1390 "Guide velocity field of the fluid domain"},
1392 {0,
nullptr, 0,
nullptr,
nullptr},
1402 "Highlight the voxels with values of the color mapped field within the range"},
1403 {0,
nullptr, 0,
nullptr,
nullptr},
1413 "Highlight only the cells of type Obstacle"},
1420 "Highlight only the cells of type Outflow"},
1421 {0,
nullptr, 0,
nullptr,
nullptr},
1429 "Delete secondary particles that are inside obstacles or left the domain"},
1434 "Push secondary particles that left the domain back into the domain"},
1435 {0,
nullptr, 0,
nullptr,
nullptr}};
1442 "Create a separate particle system for every secondary particle type"},
1447 "Spray and foam particles are saved in the same particle system"},
1452 "Spray and bubble particles are saved in the same particle system"},
1457 "Foam and bubbles particles are saved in the same particle system"},
1459 "SPRAY_FOAM_BUBBLES",
1461 "Spray + Foam + Bubbles",
1462 "Create one particle system that contains all three secondary particle types"},
1463 {0,
nullptr, 0,
nullptr,
nullptr}};
1470 "Use FLIP as the simulation method (more splashy behavior)"},
1475 "Use APIC as the simulation method (more energetic and stable behavior)"},
1476 {0,
nullptr, 0,
nullptr,
nullptr},
1563 prop,
"Temperature Grid",
"Smoke temperature grid, range 0 to 1 represents 0 to 1000K");
1584 "domain_resolution",
1603 prop,
"Margin",
"Margin added around fluid to minimize boundary interference");
1611 "Minimum amount of fluid grid values (smoke density, fuel and heat) a "
1612 "cell can contain, before it is considered empty");
1618 prop,
"Adaptive Domain",
"Adapt simulation resolution and size to fluid");
1630 "Maximum Resolution",
1631 "Resolution used for the fluid domain. Value corresponds to the longest domain side "
1632 "(resolution for other domain sides is calculated automatically).");
1695 "Buoyant force based on smoke density (higher value results in faster rising smoke)");
1705 "Buoyant force based on smoke heat (higher value results in faster rising smoke)");
1715 "Determine how quickly the smoke dissolves (lower value makes smoke disappear faster)");
1738 "Logarithmic Dissolve",
1739 "Dissolve smoke in a logarithmic fashion. Dissolves quickly at first, but lingers longer.");
1748 prop,
"Speed",
"Speed of the burning reaction (higher value results in smaller flames)");
1769 "Minimum temperature of the flames (higher value results in faster rising flames)");
1778 "Maximum temperature of the flames (higher value results in faster rising flames)");
1800 prop,
"Scale",
"Scale of noise (higher value results in larger vortices)");
1815 "The noise simulation is scaled up by this factor (compared to the "
1816 "base resolution of the domain)");
1840 "PIC/FLIP Ratio. A value of 1.0 will result in a completely FLIP based simulation. Use a "
1841 "lower value for simulations which should produce smaller splashes.");
1852 prop,
"Number",
"Particle number factor (higher value results in more particles)");
1861 "Minimum number of particles per cell (ensures that each cell has at "
1862 "least this amount of particles)");
1870 "Maximum number of particles per cell (ensures that each cell has at "
1871 "most this amount of particles)");
1878 "Particle radius factor. Increase this value if the simulation appears "
1879 "to leak volume, decrease it if the simulation seems to gain volume.");
1887 "Particle (narrow) band width (higher value results in thicker band and more particles)");
1900 "Fractional Obstacles",
1901 "Fractional obstacles improve and smoothen the fluid-obstacle boundary");
1909 "Obstacle Threshold",
1910 "Determines how much fluid is allowed in an obstacle cell "
1911 "(higher values will tag a boundary cell as an obstacle easier "
1912 "and reduce the boundary smoothening effect)");
1919 "Obstacle Distance",
1920 "Determines how far apart fluid and obstacle are (higher values will "
1921 "result in fluid being further away from obstacles, smaller values "
1922 "will let fluid move towards the inside of obstacles)");
1931 "Maximum number of fluid particles that are allowed in this simulation");
1939 prop,
"Use Viscosity",
"Simulate fluids with high viscosity using a special solver");
1947 "Viscosity of liquid (higher values result in more viscous fluids, a "
1948 "value of 0 will still apply some viscosity)");
1957 prop,
"Use Diffusion",
"Enable fluid diffusion settings (e.g. viscosity, surface tension)");
1966 "Surface tension of liquid (higher value results in greater hydrophobic behavior)");
1975 "Viscosity setting: value that is multiplied by 10 to the power of (exponent*-1)");
1983 "Viscosity Exponent",
1984 "Negative exponent for the viscosity value (to simplify entering small values "
1995 "Upper mesh concavity bound (high values tend to smoothen and fill out concave regions)");
2003 "Lower mesh concavity bound (high values tend to smoothen and fill out concave regions)");
2022 "The mesh simulation is scaled up by this factor (compared to the base "
2023 "resolution of the domain). For best meshing, it is recommended to "
2024 "adjust the mesh particle radius alongside this value.");
2044 "Caches velocities of mesh vertices. These will be used "
2045 "(automatically) when rendering with motion blur enabled.");
2053 "Particle radius factor (higher value results in larger (meshed) "
2054 "particles). Needs to be adjusted after changing the mesh scale.");
2064 "Minimum Wave Crest Potential",
2065 "Lower clamping threshold for marking fluid cells as wave crests "
2066 "(lower value results in more marked cells)");
2074 "Maximum Wave Crest Potential",
2075 "Upper clamping threshold for marking fluid cells as wave crests "
2076 "(higher value results in less marked cells)");
2084 "Minimum Trapped Air Potential",
2085 "Lower clamping threshold for marking fluid cells where air is trapped "
2086 "(lower value results in more marked cells)");
2094 "Maximum Trapped Air Potential",
2095 "Upper clamping threshold for marking fluid cells where air is trapped "
2096 "(higher value results in less marked cells)");
2105 "Minimum Kinetic Energy Potential",
2106 "Lower clamping threshold that indicates the fluid speed where cells start to emit "
2107 "particles (lower values result in generally more particles)");
2116 "Maximum Kinetic Energy Potential",
2117 "Upper clamping threshold that indicates the fluid speed where cells no longer emit more "
2118 "particles (higher value results in generally less particles)");
2126 "Wave Crest Sampling",
2127 "Maximum number of particles generated per wave crest cell per frame");
2135 "Trapped Air Sampling",
2136 "Maximum number of particles generated per trapped air cell per frame");
2145 "Amount of buoyancy force that rises bubbles (high value results in "
2146 "bubble movement mainly upwards)");
2155 "Amount of drag force that moves bubbles along with the fluid (high "
2156 "value results in bubble movement mainly along with the fluid)");
2177 prop,
"Particles in Boundary",
"How particles that left the domain are treated");
2186 "Determines which particle systems are created from secondary particles");
2195 "Radius to compute potential for each cell (higher values are slower "
2196 "but create smoother potential grids)");
2205 "Radius to compute position update for each particle (higher values "
2206 "are slower but particles move less chaotic)");
2215 "The particle simulation is scaled up by this factor (compared to the "
2216 "base resolution of the domain)");
2264 "Guiding velocity factor (higher value results in greater guiding velocities)");
2280 "Use velocities from this object for the guiding effect (object needs "
2281 "to have fluid modifier and be of type domain))");
2297 prop,
"Start",
"Frame on which the simulation starts (first frame baked)");
2313 "Frame offset that is used when loading the simulation from the cache. It is not considered "
2314 "when baking the simulation, only when loading it.");
2336 prop,
nullptr,
"rna_Fluid_cachetype_mesh_set",
"rna_Fluid_cachetype_mesh_itemf");
2338 prop,
"File Format",
"Select the file format to be used for caching surface data");
2346 prop,
nullptr,
"rna_Fluid_cachetype_data_set",
"rna_Fluid_cachetype_volume_itemf");
2348 prop,
"File Format",
"Select the file format to be used for caching volumetric data");
2356 prop,
nullptr,
"rna_Fluid_cachetype_particle_set",
"rna_Fluid_cachetype_particle_itemf");
2358 prop,
"File Format",
"Select the file format to be used for caching particle data");
2366 prop,
nullptr,
"rna_Fluid_cachetype_noise_set",
"rna_Fluid_cachetype_volume_itemf");
2368 prop,
"File Format",
"Select the file format to be used for caching noise data");
2385 "Additional data will be saved so that the bake jobs can be resumed after pausing. Because "
2386 "more data will be written to disk it is recommended to avoid enabling this option when "
2387 "baking at high resolutions.");
2452 "Export Mantaflow Script",
2453 "Generate and export Mantaflow script from current domain settings during bake. This is "
2454 "only needed if you plan to analyze the cache (e.g. view grids, velocity vectors, "
2455 "particles) in Mantaflow directly (outside of Blender) after baking the simulation.");
2472 "Bit depth for fluid particles and grids (lower bit values reduce file size)");
2487 "Adaptive Time Steps",
2488 "Automatically decide when to perform multiple simulation steps per frame");
2496 "Maximal velocity per cell (greater CFL numbers will minimize the "
2497 "number of simulation steps and the computation time.)");
2505 prop,
"Minimum",
"Minimum number of simulation steps to perform for one frame");
2513 prop,
"Maximum",
"Maximum number of simulation steps to perform for one frame");
2534 prop,
"Slice Per Voxel",
"How many slices per voxel should be generated");
2555 prop,
"Interpolation",
"Interpolation method to use for smoke/fire volumes in solid mode");
2614 "Render a simulation field while mapping its voxels values to the "
2615 "colors of a ramp or using a predefined color code");
2620 {0,
"NONE", 0,
"",
""},
2621 {0,
nullptr, 0,
nullptr,
nullptr},
2636 prop,
"Scale",
"Multiplier for scaling the selected field to color map");
2652 "Value under which voxels are considered empty space to optimize rendering");
2659 prop,
"Color Gridlines",
"Simulation field to color map onto gridlines");
2705 {0,
nullptr, 0,
nullptr,
nullptr},
2715 "Only use given geometry for fluid"},
2716 {0,
nullptr, 0,
nullptr,
nullptr},
2721 {0,
"NONE", 0,
"",
""},
2722 {0,
nullptr, 0,
nullptr,
nullptr},
2730 "Generated coordinates centered to flow object"},
2732 {0,
nullptr, 0,
nullptr,
nullptr},
2764 prop,
"Temperature Difference",
"Temperature difference to ambient temperature");
2791 prop,
nullptr,
"rna_Fluid_flowsource_set",
"rna_Fluid_flowsource_itemf");
2799 "Only allow given density value in emitter area and will not add up");
2805 prop,
"Initial Velocity",
"Fluid has some initial velocity when it is emitted");
2814 "Multiplier of source velocity passed to fluid (source velocity is "
2815 "non-zero only if object is moving)");
2839 "Additional initial velocity in X, Y and Z direction (added to source velocity)");
2847 "Controls fluid emission from within the mesh (higher value results in "
2848 "greater emissions from inside the mesh)");
2857 "Height (in domain grid units) of fluid emission above the mesh surface. Higher values "
2858 "result in emission further away from the mesh surface. If this value and the emitter size "
2859 "are smaller than the domain grid unit, fluid will not be created");
2867 "Treat this object as a planar and unclosed mesh. Fluid will only be emitted from the mesh "
2868 "surface and based on the surface emission value.");
2880 prop,
"Set Size",
"Set particle size in simulation cells or use nearest cell");
2893 "Number of additional samples to take between frames to improve "
2894 "quality of fast moving flows");
2899 "rna_FluidFlow_density_vgroup_get",
2900 "rna_FluidFlow_density_vgroup_length",
2901 "rna_FluidFlow_density_vgroup_set");
2903 prop,
"Vertex Group",
"Name of vertex group which determines surface emission rate");
2947 {0,
nullptr, 0,
nullptr,
nullptr},
2955 "Compare velocities from previous frame with new velocities from current frame and keep "
2961 "Compare velocities from previous frame with new velocities from current frame and keep "
2967 "Always write new guide velocities for every frame (each frame only contains current "
2968 "velocities from guiding objects)"},
2973 "Take average of velocities from previous frame and new velocities from current frame"},
2974 {0,
nullptr, 0,
nullptr,
nullptr},
2995 prop,
"Surface",
"Additional distance around mesh surface to consider as effector");
3025 "Number of additional samples to take between frames to improve "
3026 "quality of fast moving effector objects");
#define BLT_I18NCONTEXT_AMOUNT
#define BLT_I18NCONTEXT_ID_TEXTURE
#define FLUID_DOMAIN_BAKED_ALL
#define FLUID_DOMAIN_BAKING_ALL
#define RNA_MAX_ARRAY_DIMENSION
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
float3x3 scale(float3x3 mat, float2 scale)
int size(const AssetLibraryReference *library_reference)
@ FLUID_DOMAIN_FIELD_COLOR_G
@ FLUID_DOMAIN_FIELD_FLAGS
@ FLUID_DOMAIN_FIELD_FUEL
@ FLUID_DOMAIN_FIELD_FORCE_Y
@ FLUID_DOMAIN_FIELD_PHI_OBSTACLE
@ FLUID_DOMAIN_FIELD_PHI_IN
@ FLUID_DOMAIN_FIELD_FLAME
@ FLUID_DOMAIN_FIELD_COLOR_B
@ FLUID_DOMAIN_FIELD_PRESSURE
@ FLUID_DOMAIN_FIELD_VELOCITY_Z
@ FLUID_DOMAIN_FIELD_FORCE_X
@ FLUID_DOMAIN_FIELD_FORCE_Z
@ FLUID_DOMAIN_FIELD_DENSITY
@ FLUID_DOMAIN_FIELD_VELOCITY_Y
@ FLUID_DOMAIN_FIELD_COLOR_R
@ FLUID_DOMAIN_FIELD_VELOCITY_X
@ FLUID_DOMAIN_FIELD_PHI_OUT
@ FLUID_DOMAIN_FIELD_HEAT
void BKE_fluid_cachetype_data_set(struct FluidDomainSettings *settings, eFluidDomain_FileFormat cache_data_format)
void WM_main_add_notifier(uint type, void *reference)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void BKE_fluid_modifier_reset(struct FluidModifierData *fmd)
@ FLUID_GRIDLINE_COLOR_TYPE_NONE
@ FLUID_GRIDLINE_COLOR_TYPE_RANGE
@ FLUID_GRIDLINE_COLOR_TYPE_FLAGS
static void rna_def_fluid_domain_settings(BlenderRNA *brna)
@ VDB_PRECISION_HALF_FLOAT
@ VDB_PRECISION_MINI_FLOAT
@ VDB_PRECISION_FULL_FLOAT
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
char * STRNCPY(char(&dst)[N], const char *src)
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void BKE_fluid_cachetype_noise_set(struct FluidDomainSettings *settings, eFluidDomain_FileFormat cache_noise_format)
@ FLUID_FLOW_BEHAVIOR_GEOMETRY
@ FLUID_FLOW_BEHAVIOR_OUTFLOW
@ FLUID_FLOW_BEHAVIOR_INFLOW
void BKE_fluid_cache_endframe_set(struct FluidDomainSettings *settings, int value)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
@ FLUID_DOMAIN_BORDER_BACK
@ FLUID_DOMAIN_BORDER_LEFT
@ FLUID_DOMAIN_BORDER_TOP
@ FLUID_DOMAIN_BORDER_RIGHT
@ FLUID_DOMAIN_BORDER_FRONT
@ FLUID_DOMAIN_BORDER_BOTTOM
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
@ FLUID_EFFECTOR_GUIDE_MIN
@ FLUID_EFFECTOR_GUIDE_AVERAGED
@ FLUID_EFFECTOR_GUIDE_MAX
@ FLUID_EFFECTOR_GUIDE_OVERRIDE
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void manta_smoke_get_rgba(struct MANTA *smoke, float *data, int sequential)
void manta_smoke_get_rgba_fixed_color(struct MANTA *smoke, float color[3], float *data, int sequential)
@ FLUID_DOMAIN_MESH_IMPROVED
@ FLUID_DOMAIN_MESH_UNION
MINLINE void copy_v3_v3_int(int r[3], const int a[3])
float * manta_smoke_get_heat(struct MANTA *smoke)
ColorBand * BKE_colorband_add(bool rangetype)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
@ PART_FLUID_SPRAYFOAMBUBBLE
@ FLUID_DOMAIN_VECTOR_FIELD_VELOCITY
@ FLUID_DOMAIN_VECTOR_FIELD_FORCE
@ FLUID_DOMAIN_VECTOR_FIELD_GUIDE_VELOCITY
void BKE_fluid_fields_sanitize(struct FluidDomainSettings *settings)
void BKE_fluid_domain_type_set(struct Object *object, struct FluidDomainSettings *settings, eFluidDomain_Type type)
void BLI_rw_mutex_lock(ThreadRWMutex *mutex, int mode)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
@ FLUID_DOMAIN_USE_ADAPTIVE_TIME
@ FLUID_DOMAIN_USE_DISSOLVE_LOG
@ FLUID_DOMAIN_USE_DISSOLVE
@ FLUID_DOMAIN_USE_DIFFUSION
@ FLUID_DOMAIN_DELETE_IN_OBSTACLE
@ FLUID_DOMAIN_USE_RESUMABLE_CACHE
@ FLUID_DOMAIN_USE_FRACTIONS
@ FLUID_DOMAIN_USE_VISCOSITY
@ FLUID_DOMAIN_USE_SPEED_VECTORS
@ FLUID_DOMAIN_EXPORT_MANTA_SCRIPT
@ FLUID_DOMAIN_USE_ADAPTIVE_DOMAIN
float * manta_noise_get_density(struct MANTA *smoke)
bool manta_smoke_has_colors(struct MANTA *smoke)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
int rna_object_vgroup_name_index_length(PointerRNA *ptr, int index)
@ FLUID_CELL_TYPE_OUTFLOW
@ FLUID_CELL_TYPE_OBSTACLE
@ FLUID_DOMAIN_CACHE_MODULAR
@ FLUID_DOMAIN_CACHE_REPLAY
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
static void rna_def_fluid_flow_settings(BlenderRNA *brna)
float * manta_get_velocity_z(struct MANTA *fluid)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
@ FLUID_EFFECTOR_USE_PLANE_INIT
@ FLUID_EFFECTOR_USE_EFFEC
@ FLUID_EFFECTOR_NEEDS_UPDATE
void BLI_rw_mutex_unlock(ThreadRWMutex *mutex)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void DEG_id_tag_update(ID *id, unsigned int flags)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void rna_object_uvlayer_name_set(PointerRNA *ptr, const char *value, char *result, int result_maxncpy)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
char char size_t BLI_str_escape(char *__restrict dst, StringRef src, size_t dst_maxncpy) ATTR_NONNULL(1)
@ SNDPARTICLE_BOUNDARY_PUSHOUT
@ SNDPARTICLE_BOUNDARY_DELETE
void BKE_fluid_cachetype_particle_set(struct FluidDomainSettings *settings, eFluidDomain_FileFormat cache_particle_format)
@ FLUID_DOMAIN_FILE_OBJECT
@ FLUID_DOMAIN_FILE_OPENVDB
@ FLUID_DOMAIN_FILE_BIN_OBJECT
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void manta_noise_get_res(struct MANTA *smoke, int *res)
void BKE_fluid_cache_startframe_set(struct FluidDomainSettings *settings, int value)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
@ SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM
@ SNDPARTICLE_COMBINED_EXPORT_SPRAY_BUBBLE
@ SNDPARTICLE_COMBINED_EXPORT_FOAM_BUBBLE
@ SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM_BUBBLE
@ SNDPARTICLE_COMBINED_EXPORT_OFF
void BKE_fluid_cachetype_mesh_set(struct FluidDomainSettings *settings, eFluidDomain_FileFormat cache_mesh_format)
void RNA_def_fluid(BlenderRNA *brna)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
float * manta_smoke_get_density(struct MANTA *smoke)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void BKE_fluid_cache_free(struct FluidDomainSettings *fds, struct Object *ob, int cache_map)
@ FLUID_DOMAIN_BAKED_PARTICLES
@ FLUID_DOMAIN_BAKED_GUIDE
@ FLUID_DOMAIN_BAKED_NOISE
@ FLUID_DOMAIN_OUTDATED_MESH
@ FLUID_DOMAIN_BAKED_DATA
@ FLUID_DOMAIN_OUTDATED_NOISE
@ FLUID_DOMAIN_BAKING_NOISE
@ FLUID_DOMAIN_BAKING_MESH
@ FLUID_DOMAIN_OUTDATED_GUIDE
@ FLUID_DOMAIN_BAKED_MESH
@ FLUID_DOMAIN_OUTDATED_PARTICLES
@ FLUID_DOMAIN_BAKING_PARTICLES
@ FLUID_DOMAIN_BAKING_DATA
@ FLUID_DOMAIN_OUTDATED_DATA
@ FLUID_DOMAIN_BAKING_GUIDE
ModifierData * BKE_modifiers_findby_type(const Object *ob, ModifierType type)
@ FLUID_DISPLAY_INTERP_CUBIC
@ FLUID_DISPLAY_INTERP_LINEAR
@ FLUID_DISPLAY_INTERP_CLOSEST
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
float * manta_noise_get_flame(struct MANTA *smoke)
void rna_object_vgroup_name_index_set(PointerRNA *ptr, const char *value, short *index)
void BKE_fluid_particle_system_destroy(struct Object *ob, int particle_type)
float * manta_smoke_get_flame(struct MANTA *smoke)
@ FLUID_FLOW_TYPE_SMOKEFIRE
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
@ FLUID_DOMAIN_GUIDE_SRC_DOMAIN
@ FLUID_DOMAIN_GUIDE_SRC_EFFECTOR
@ PROP_PATH_SUPPORTS_BLEND_RELATIVE
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void manta_noise_get_rgba(struct MANTA *smoke, float *data, int sequential)
float * manta_get_velocity_x(struct MANTA *fluid)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
void DEG_relations_tag_update(Main *bmain)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
@ FLUID_FLOW_SOURCE_PARTICLES
float * manta_get_velocity_y(struct MANTA *fluid)
@ FLUID_FLOW_USE_PLANE_INIT
@ FLUID_FLOW_INITVELOCITY
@ FLUID_FLOW_NEEDS_UPDATE
@ FLUID_FLOW_USE_PART_SIZE
@ FLUID_DOMAIN_METHOD_FLIP
@ FLUID_DOMAIN_METHOD_APIC
pthread_rwlock_t ThreadRWMutex
void BKE_fluid_particle_system_create(struct Main *bmain, struct Object *ob, const char *pset_name, const char *parts_name, const char *psys_name, eParticleType psys_type)
void RNA_def_property_array(PropertyRNA *prop, int length)
@ FLUID_EFFECTOR_TYPE_COLLISION
@ FLUID_EFFECTOR_TYPE_GUIDE
void manta_noise_get_rgba_fixed_color(struct MANTA *smoke, float color[3], float *data, int sequential)
@ FLUID_DOMAIN_TYPE_LIQUID
@ FLUID_FLOW_TEXTURE_MAP_UV
@ FLUID_FLOW_TEXTURE_MAP_AUTO
static void rna_def_fluid_effector_settings(BlenderRNA *brna)
void rna_object_vgroup_name_index_get(PointerRNA *ptr, char *value, int index)
@ FLUID_DOMAIN_PARTICLE_FLIP
@ FLUID_DOMAIN_PARTICLE_TRACER
@ FLUID_DOMAIN_PARTICLE_FOAM
@ FLUID_DOMAIN_PARTICLE_SPRAY
@ FLUID_DOMAIN_PARTICLE_BUBBLE
bool manta_noise_has_colors(struct MANTA *smoke)