32 {0,
nullptr, 0,
nullptr,
nullptr},
41 {0,
nullptr, 0,
nullptr,
nullptr},
49 {0,
nullptr, 0,
nullptr,
nullptr},
56 {0,
nullptr, 0,
nullptr,
nullptr},
67 {0,
nullptr, 0,
nullptr,
nullptr},
75 {0,
nullptr, 0,
nullptr,
nullptr},
86 {0,
nullptr, 0,
nullptr,
nullptr},
95 {0,
nullptr, 0,
nullptr,
nullptr},
103 {0,
nullptr, 0,
nullptr,
nullptr},
118 {0,
nullptr, 0,
nullptr,
nullptr},
124# include <fmt/format.h>
153static void rna_ParticleHairKey_location_object_info(
PointerRNA *
ptr,
191 if ((hkey >= pa->
hair) && (hkey < pa->hair + pa->
totkey)) {
202static void rna_ParticleHairKey_location_object_get(
PointerRNA *
ptr,
float *values)
209 rna_ParticleHairKey_location_object_info(
ptr, &psmd, &pa);
236static int hair_key_index_get(
const Object *
object,
242 return hair_key - particle->
hair;
254 return hair_key - original_particle->
hair;
266static void hair_key_location_object_set(
HairKey *hair_key,
270 const float src_co[3])
275 if (hair_mesh !=
nullptr) {
276 const int hair_key_index = hair_key_index_get(
object, hair_key, modifier, particle);
277 if (hair_key_index == -1) {
296static void rna_ParticleHairKey_location_object_set(
PointerRNA *
ptr,
const float *values)
303 rna_ParticleHairKey_location_object_info(
ptr, &psmd, &pa);
310 hair_key_location_object_set(hkey, ob, psmd, pa, values);
313static void rna_ParticleHairKey_co_object(
HairKey *hairkey,
340static void rna_ParticleHairKey_co_object_set(
ID *
id,
348 if (particle ==
nullptr) {
358 hair_key_location_object_set(hair_key,
object, modifier, particle, co);
365static void rna_Particle_uv_on_emitter(
ParticleData *particle,
372 psmd, part->from, pa->
num, pa->
num_dmcache, pa->
fuv, pa->
foffset, co,
nor, 0, 0, sd.orco, 0);
376 BKE_report(reports,
RPT_ERROR,
"uv_on_emitter() requires a modifier from an evaluated object");
402 const MFace *mface =
static_cast<const MFace *
>(
407 if (mface && mtface) {
418static void rna_ParticleSystem_co_hair(
428 if (particlesystem ==
nullptr) {
432 part = particlesystem->
part;
437 if (part ==
nullptr || pars ==
nullptr) {
450 if (particle_no < totpart && particlesystem->pathcache) {
451 cache = particlesystem->
pathcache[particle_no];
454 else if (particle_no < totpart + totchild && particlesystem->childcache) {
455 cache = particlesystem->
childcache[particle_no - totpart];
472 mul_m4_v3(object->object_to_world().ptr(), n_co);
485 Object *ob_found =
nullptr;
489 if (psys->
part == part) {
490 ob_found = ob_context;
496 if (ob_found ==
nullptr) {
499 ob && (ob_found ==
nullptr);
503 if (psys->
part == part) {
517 if (ob_found && ob_found->
totcol > 0) {
518 for (
i = 1;
i <= ob_found->
totcol;
i++) {
521 tmp.
icon = ICON_MATERIAL_DATA;
527 tmp.
name =
"Default Material";
535 tmp.
icon = ICON_MATERIAL_DATA;
536 tmp.
name =
"Default Material";
548static int rna_ParticleSystem_tessfaceidx_on_emitter(
ParticleSystem *particlesystem,
566 if (!particlesystem || !totface) {
570 part = particlesystem->
part;
581 if (particle_no >= totpart + totchild) {
586 if (particle_no < totpart) {
588 particle->num_dmcache;
592 *r_fuv = &particle->
fuv;
598 const MFace *mface =
static_cast<const MFace *
>(
601 *r_fuv = &particle->
fuv;
606 for (
int i = 0;
i < totface;
i++, mface++) {
636 *r_fuv = &parent->
fuv;
642 const MFace *mface =
static_cast<const MFace *
>(
645 *r_fuv = &parent->
fuv;
650 for (
int i = 0;
i < totface;
i++, mface++) {
663static void rna_ParticleSystem_uv_on_emitter(
ParticleSystem *particlesystem,
685 const int num = rna_ParticleSystem_tessfaceidx_on_emitter(
686 particlesystem, modifier, particle, particle_no, &fuv);
693 const MFace *mfaces =
static_cast<const MFace *
>(
704static void rna_ParticleSystem_mcol_on_emitter(
ParticleSystem *particlesystem,
721 const int num = rna_ParticleSystem_tessfaceidx_on_emitter(
722 particlesystem, modifier, particle, particle_no, &fuv);
729 const MFace *mfaces =
static_cast<const MFace *
>(
737 r_mcol[0] =
float(mcol.
b) / 255.0f;
738 r_mcol[1] =
float(mcol.
g) / 255.0f;
739 r_mcol[2] =
float(mcol.
r) / 255.0f;
746 if (
ptr->type == &RNA_ParticleSystem) {
768 rna_Particle_redo(bmain, scene,
ptr);
787 rna_Particle_reset(bmain, scene,
ptr);
795 for (
Object *ob =
static_cast<Object *
>(bmain->objects.first); ob;
799 if (psys->
part == part) {
871 if (
ptr->type == &RNA_ParticleTarget) {
874 ParticleSystem *kpsys =
nullptr, *psys = rna_particle_system_for_target(ob, pt);
876 if (
ELEM(pt->
ob, ob,
nullptr)) {
910 if (
ptr->type == &RNA_ParticleTarget) {
927 if (psys && !psys->
clmd) {
932 rna_Particle_redo(bmain, scene,
ptr);
974 float delta = settings->end + settings->lifetime - settings->sta;
976 settings->path_start = settings->sta + settings->path_start * delta;
977 settings->path_end = settings->sta + settings->path_end * delta;
980 settings->path_start = (settings->path_start - settings->sta) / delta;
981 settings->path_end = (settings->path_end - settings->sta) / delta;
983 rna_Particle_redo(bmain, scene,
ptr);
985static void rna_PartSettings_start_set(
PointerRNA *
ptr,
float value)
990 if (value > settings->end) {
991 settings->end = value;
995 if (settings->type == PART_REACTOR && value < 1.0) {
1004 settings->sta = value;
1007static void rna_PartSettings_end_set(
PointerRNA *
ptr,
float value)
1012 if (value < settings->sta) {
1013 settings->sta = value;
1016 settings->end = value;
1019static void rna_PartSetings_timestep_set(
PointerRNA *
ptr,
float value)
1023 settings->timetweak = value / 0.04f;
1030 return settings->timetweak * 0.04f;
1033static void rna_PartSetting_hairlength_set(
PointerRNA *
ptr,
float value)
1036 settings->normfac = value / 4.0f;
1042 return settings->normfac * 4.0f;
1045static void rna_PartSetting_linelentail_set(
PointerRNA *
ptr,
float value)
1048 settings->draw_line[0] = value;
1051static float rna_PartSetting_linelentail_get(
PointerRNA *
ptr)
1054 return settings->draw_line[0];
1056static void rna_PartSetting_pathstartend_range(
1070static void rna_PartSetting_linelenhead_set(
PointerRNA *
ptr,
float value)
1073 settings->draw_line[1] = value;
1076static float rna_PartSetting_linelenhead_get(
PointerRNA *
ptr)
1079 return settings->draw_line[1];
1108 rna_Particle_redo_child(bmain, scene,
ptr);
1111static void rna_ParticleSettings_use_roughness_curve_update(
Main *bmain,
1123 rna_Particle_redo_child(bmain, scene,
ptr);
1136 rna_Particle_redo_child(bmain, scene,
ptr);
1139static void rna_ParticleSystem_name_set(
PointerRNA *
ptr,
const char *value)
1149 DATA_(
"ParticleSystem"),
1152 sizeof(part->name));
1160 for (; pt; pt = pt->
next) {
1167static void rna_ParticleSystem_active_particle_target_index_range(
1175static int rna_ParticleSystem_active_particle_target_index_get(
PointerRNA *
ptr)
1181 for (; pt; pt = pt->
next,
i++) {
1190static void rna_ParticleSystem_active_particle_target_index_set(
PointerRNA *
ptr,
int value)
1196 for (; pt; pt = pt->
next,
i++) {
1206static size_t rna_ParticleTarget_name_get_impl(
PointerRNA *
ptr,
1208 const size_t value_maxncpy)
1227 value, value_maxncpy,
"%s: %s", pt->
ob->
id.
name + 2, psys->
name);
1239static void rna_ParticleTarget_name_get(
PointerRNA *
ptr,
char *value)
1242 const size_t value_buf_len = rna_ParticleTarget_name_get_impl(
ptr, value_buf,
sizeof(value_buf));
1243 memcpy(value, value_buf, value_buf_len + 1);
1249 return rna_ParticleTarget_name_get_impl(
ptr, value_buf,
sizeof(value_buf));
1254 const ID *
id =
ptr->owner_id;
1259static std::optional<std::string> rna_SPHFluidSettings_path(
const PointerRNA *
ptr)
1263 if (particle_id_check(
ptr)) {
1266 if (part->
fluid == fluid) {
1270 return std::nullopt;
1273static bool rna_ParticleSystem_multiple_caches_get(
PointerRNA *
ptr)
1301 for (; dw; dw = dw->
next) {
1308static void rna_ParticleDupliWeight_active_index_range(
1316static int rna_ParticleDupliWeight_active_index_get(
PointerRNA *
ptr)
1322 for (; dw; dw = dw->
next,
i++) {
1331static void rna_ParticleDupliWeight_active_index_set(
PointerRNA *
ptr,
int value)
1337 for (; dw; dw = dw->
next,
i++) {
1347static size_t rna_ParticleDupliWeight_name_get_impl(
PointerRNA *
ptr,
1349 const size_t value_maxncpy)
1363static void rna_ParticleDupliWeight_name_get(
PointerRNA *
ptr,
char *value)
1366 const size_t value_buf_len = rna_ParticleDupliWeight_name_get_impl(
1367 ptr, value_buf,
sizeof(value_buf));
1368 memcpy(value, value_buf, value_buf_len + 1);
1371static int rna_ParticleDupliWeight_name_length(
PointerRNA *
ptr)
1374 return rna_ParticleDupliWeight_name_get_impl(
ptr, value_buf,
sizeof(value_buf));
1388 return part_fluid_type_items;
1398 if (part->
type == PART_REACTOR) {
1402 return part_from_items;
1413 return part_hair_dist_items;
1428 return part_hair_draw_as_items;
1443 return part_hair_ren_as_items;
1462static void psys_vg_name_get__internal(
PointerRNA *
ptr,
char *value,
int index)
1468 if (psys->
vgroup[index] > 0) {
1473 strcpy(value, defGroup->
name);
1480static int psys_vg_name_len__internal(
PointerRNA *
ptr,
int index)
1485 if (psys->
vgroup[index] > 0) {
1491 return strlen(defGroup->
name);
1496static void psys_vg_name_set__internal(
PointerRNA *
ptr,
const char *value,
int index)
1501 if (value[0] ==
'\0') {
1507 if (defgrp_index == -1) {
1511 psys->
vgroup[index] = defgrp_index + 1;
1515static std::optional<std::string> rna_ParticleSystem_path(
const PointerRNA *
ptr)
1518 char name_esc[
sizeof(psys->
name) * 2];
1521 return fmt::format(
"particle_systems[\"{}\"]", name_esc);
1539static void rna_ParticleSettings_active_texture_set(
PointerRNA *
ptr,
1549static void rna_ParticleVGroup_name_get_0(
PointerRNA *
ptr,
char *value)
1551 psys_vg_name_get__internal(
ptr, value, 0);
1553static void rna_ParticleVGroup_name_get_1(
PointerRNA *
ptr,
char *value)
1555 psys_vg_name_get__internal(
ptr, value, 1);
1557static void rna_ParticleVGroup_name_get_2(
PointerRNA *
ptr,
char *value)
1559 psys_vg_name_get__internal(
ptr, value, 2);
1561static void rna_ParticleVGroup_name_get_3(
PointerRNA *
ptr,
char *value)
1563 psys_vg_name_get__internal(
ptr, value, 3);
1565static void rna_ParticleVGroup_name_get_4(
PointerRNA *
ptr,
char *value)
1567 psys_vg_name_get__internal(
ptr, value, 4);
1569static void rna_ParticleVGroup_name_get_5(
PointerRNA *
ptr,
char *value)
1571 psys_vg_name_get__internal(
ptr, value, 5);
1573static void rna_ParticleVGroup_name_get_6(
PointerRNA *
ptr,
char *value)
1575 psys_vg_name_get__internal(
ptr, value, 6);
1577static void rna_ParticleVGroup_name_get_7(
PointerRNA *
ptr,
char *value)
1579 psys_vg_name_get__internal(
ptr, value, 7);
1581static void rna_ParticleVGroup_name_get_8(
PointerRNA *
ptr,
char *value)
1583 psys_vg_name_get__internal(
ptr, value, 8);
1585static void rna_ParticleVGroup_name_get_9(
PointerRNA *
ptr,
char *value)
1587 psys_vg_name_get__internal(
ptr, value, 9);
1589static void rna_ParticleVGroup_name_get_10(
PointerRNA *
ptr,
char *value)
1591 psys_vg_name_get__internal(
ptr, value, 10);
1593static void rna_ParticleVGroup_name_get_11(
PointerRNA *
ptr,
char *value)
1595 psys_vg_name_get__internal(
ptr, value, 11);
1597static void rna_ParticleVGroup_name_get_12(
PointerRNA *
ptr,
char *value)
1599 psys_vg_name_get__internal(
ptr, value, 12);
1604 return psys_vg_name_len__internal(
ptr, 0);
1608 return psys_vg_name_len__internal(
ptr, 1);
1612 return psys_vg_name_len__internal(
ptr, 2);
1616 return psys_vg_name_len__internal(
ptr, 3);
1620 return psys_vg_name_len__internal(
ptr, 4);
1624 return psys_vg_name_len__internal(
ptr, 5);
1628 return psys_vg_name_len__internal(
ptr, 6);
1632 return psys_vg_name_len__internal(
ptr, 7);
1636 return psys_vg_name_len__internal(
ptr, 8);
1640 return psys_vg_name_len__internal(
ptr, 9);
1644 return psys_vg_name_len__internal(
ptr, 10);
1648 return psys_vg_name_len__internal(
ptr, 11);
1652 return psys_vg_name_len__internal(
ptr, 12);
1655static void rna_ParticleVGroup_name_set_0(
PointerRNA *
ptr,
const char *value)
1657 psys_vg_name_set__internal(
ptr, value, 0);
1659static void rna_ParticleVGroup_name_set_1(
PointerRNA *
ptr,
const char *value)
1661 psys_vg_name_set__internal(
ptr, value, 1);
1663static void rna_ParticleVGroup_name_set_2(
PointerRNA *
ptr,
const char *value)
1665 psys_vg_name_set__internal(
ptr, value, 2);
1667static void rna_ParticleVGroup_name_set_3(
PointerRNA *
ptr,
const char *value)
1669 psys_vg_name_set__internal(
ptr, value, 3);
1671static void rna_ParticleVGroup_name_set_4(
PointerRNA *
ptr,
const char *value)
1673 psys_vg_name_set__internal(
ptr, value, 4);
1675static void rna_ParticleVGroup_name_set_5(
PointerRNA *
ptr,
const char *value)
1677 psys_vg_name_set__internal(
ptr, value, 5);
1679static void rna_ParticleVGroup_name_set_6(
PointerRNA *
ptr,
const char *value)
1681 psys_vg_name_set__internal(
ptr, value, 6);
1683static void rna_ParticleVGroup_name_set_7(
PointerRNA *
ptr,
const char *value)
1685 psys_vg_name_set__internal(
ptr, value, 7);
1687static void rna_ParticleVGroup_name_set_8(
PointerRNA *
ptr,
const char *value)
1689 psys_vg_name_set__internal(
ptr, value, 8);
1691static void rna_ParticleVGroup_name_set_9(
PointerRNA *
ptr,
const char *value)
1693 psys_vg_name_set__internal(
ptr, value, 9);
1695static void rna_ParticleVGroup_name_set_10(
PointerRNA *
ptr,
const char *value)
1697 psys_vg_name_set__internal(
ptr, value, 10);
1699static void rna_ParticleVGroup_name_set_11(
PointerRNA *
ptr,
const char *value)
1701 psys_vg_name_set__internal(
ptr, value, 11);
1703static void rna_ParticleVGroup_name_set_12(
PointerRNA *
ptr,
const char *value)
1705 psys_vg_name_set__internal(
ptr, value, 12);
1732 prop,
"Location (Object Space)",
"Location of the hair key in object space");
1734 "rna_ParticleHairKey_location_object_get",
1735 "rna_ParticleHairKey_location_object_set",
1742 "Location of the hair key in its local coordinate system, "
1743 "relative to the emitting face");
1746 func =
RNA_def_function(srna,
"co_object",
"rna_ParticleHairKey_co_object");
1750 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
1752 parm =
RNA_def_pointer(func,
"particle",
"Particle",
"",
"hair particle");
1755 func,
"co", 3,
nullptr, -
FLT_MAX,
FLT_MAX,
"Co",
"Exported hairkey location", -1e4, 1e4);
1759 func =
RNA_def_function(srna,
"co_object_set",
"rna_ParticleHairKey_co_object_set");
1764 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
1766 parm =
RNA_def_pointer(func,
"particle",
"Particle",
"",
"hair particle");
1769 func,
"co", 3,
nullptr, -
FLT_MAX,
FLT_MAX,
"Co",
"Specified hairkey location", -1e4, 1e4);
1808 srna,
"Child Particle",
"Child particle interpolated from simulated or edited particles");
1832 {0,
nullptr, 0,
nullptr,
nullptr},
1929 func =
RNA_def_function(srna,
"uv_on_emitter",
"rna_Particle_uv_on_emitter");
1931 "Obtain UV coordinates for a particle on an evaluated mesh.");
1935 "ParticleSystemModifier",
1937 "Particle modifier from an evaluated object");
1952 "Particle Instance Object Weight",
1953 "Weight of a particle instance object in a collection");
1958 prop,
"rna_ParticleDupliWeight_name_get",
"rna_ParticleDupliWeight_name_length",
nullptr);
1966 prop,
"Count",
"The number of times this object is repeated with respect to other objects");
1980 "An artistic solver with strong surface tension effects (original)"},
1982 {0,
nullptr, 0,
nullptr,
nullptr},
1995 prop,
"SPH Solver",
"The code used to calculate internal forces on particles");
2020 prop,
"Viscoelastic Springs",
"Use viscoelastic springs instead of Hooke's springs");
2027 "Initial Rest Length",
2028 "Use the initial length as spring rest length instead of 2 * particle size");
2037 "How much the spring rest length can change after the elastic limit is crossed");
2046 "How much the spring has to be stretched/compressed in order to change its rest length");
2054 "Create springs for this number of frames since particles birth (0 is always)");
2087 "How strongly the fluid tries to keep from clustering (factor of stiffness)");
2105 "Artificial buoyancy force in negative gravity direction based on pressure "
2106 "differences inside the fluid");
2121 "Density is calculated as a factor of default density (depends on particle size)");
2127 prop,
"Factor Radius",
"Interaction radius is a factor of 4 * particle size");
2133 prop,
"Factor Stiff Viscosity",
"Stiff viscosity is a factor of normal viscosity");
2139 prop,
"Factor Rest Length",
"Spring rest length is a factor of 2 * particle size");
2149 {
TEXCO_GLOB,
"GLOBAL", 0,
"Global",
"Use global coordinates for the texture coordinates"},
2154 "Use linked object's coordinates for texture coordinates"},
2155 {
TEXCO_UV,
"UV", 0,
"UV",
"Use UV coordinates for texture coordinates"},
2160 "Use the original undeformed coordinates of the object"},
2164 "Strand / Particle",
2165 "Use normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
2166 {0,
nullptr, 0,
nullptr,
nullptr},
2170 {
MTEX_FLAT,
"FLAT", 0,
"Flat",
"Map X and Y coordinates directly"},
2171 {
MTEX_CUBE,
"CUBE", 0,
"Cube",
"Map using the normal vector"},
2172 {
MTEX_TUBE,
"TUBE", 0,
"Tube",
"Map with Z as central axis"},
2173 {
MTEX_SPHERE,
"SPHERE", 0,
"Sphere",
"Map with Z as central axis"},
2174 {0,
nullptr, 0,
nullptr,
nullptr},
2178 {0,
"NONE", 0,
"None",
""},
2179 {1,
"X", 0,
"X",
""},
2180 {2,
"Y", 0,
"Y",
""},
2181 {3,
"Z", 0,
"Z",
""},
2182 {0,
nullptr, 0,
nullptr,
nullptr},
2186 {0,
"NONE", 0,
"None",
""},
2187 {1,
"X", 0,
"X",
""},
2188 {2,
"Y", 0,
"Y",
""},
2189 {3,
"Z", 0,
"Z",
""},
2190 {0,
nullptr, 0,
nullptr,
nullptr},
2194 {0,
"NONE", 0,
"None",
""},
2195 {1,
"X", 0,
"X",
""},
2196 {2,
"Y", 0,
"Y",
""},
2197 {3,
"Z", 0,
"Z",
""},
2198 {0,
nullptr, 0,
nullptr,
nullptr},
2201 srna =
RNA_def_struct(brna,
"ParticleSettingsTextureSlot",
"TextureSlot");
2204 "Particle Settings Texture Slot",
2205 "Texture slot for textures in a Particle Settings data-block");
2212 "Texture Coordinates",
2213 "Texture coordinates used to map the texture onto the background");
2222 prop,
"Object",
"Object to use for mapping with Object texture coordinates");
2228 prop,
"UV Map",
"UV map to use for mapping with UV texture coordinates");
2331 prop,
"Emission Time Factor",
"Amount texture affects particle emission time");
2356 prop,
"Velocity Factor",
"Amount texture affects particle initial velocity");
2393 prop,
"Kink Amplitude Factor",
"Amount texture affects child kink amplitude");
2400 prop,
"Kink Frequency Factor",
"Amount texture affects child kink frequency");
2427 {0,
nullptr, 0,
nullptr,
nullptr},
2431 {0,
"NONE", 0,
"None",
""},
2441 {0,
nullptr, 0,
nullptr,
nullptr},
2445 {0,
"NONE", 0,
"None",
""},
2453 {0,
nullptr, 0,
nullptr,
nullptr},
2460 {0,
nullptr, 0,
nullptr,
nullptr},
2464 {0,
"NONE", 0,
"None",
""},
2467 {0,
nullptr, 0,
nullptr,
nullptr},
2476 {0,
nullptr, 0,
nullptr,
nullptr},
2486 {0,
nullptr, 0,
nullptr,
nullptr},
2494 {0,
nullptr, 0,
nullptr,
nullptr},
2499 srna,
"Particle Settings",
"Particle settings, reusable by multiple particle systems");
2504 "rna_ParticleSettings_mtex_begin",
2505 "rna_ParticleSettings_active_texture_get",
2506 "rna_ParticleSettings_active_texture_set",
2508 "ParticleSettingsTextureSlot",
2509 "ParticleSettingsTextureSlots",
2510 "rna_Particle_reset_dependency",
2558 "Even Distribution",
2559 "Use even distribution from faces based on face areas or edge lengths");
2566 prop,
"Die on Hit",
"Particles die when they collide with a deflector object");
2585 prop,
"Dynamic",
"Particle rotations are affected by collisions and effectors");
2613 prop,
"Invert Grid",
"Invert what is considered object and what is not");
2662 prop,
"Distribution",
"How to distribute particles on selected element");
2680 "Particle orientation axis (does not affect Explode modifier's results)");
2688 prop,
"Angular Velocity Axis",
"What axis is used to change particle rotation with time");
2759 "Use object's rotation for duplication (global x-axis is aligned "
2760 "particle rotation axis)");
2858 prop,
"Degrees",
"How many degrees path has to curve to make another render segment");
2864 prop,
"Pixel",
"How many pixels path has to cover to make another render segment");
2876 prop,
"Material Index",
"Index of material slot used for rendering particles");
2890 "Algorithm used to calculate physics, from the fastest to the "
2891 "most stable and accurate: Midpoint, Euler, Verlet, RK4");
2945 prop,
"Tweak",
"A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)");
2950 prop,
"rna_PartSettings_timestep_get",
"rna_PartSetings_timestep_set",
nullptr);
2954 prop,
"Timestep",
"The simulation timestep per frame (seconds per frame)");
2960 prop,
"Automatic Subframes",
"Automatically set the number of subframes");
2968 "Subframes to simulate for improved stability and finer granularity simulations "
2969 "(dt = timestep / (subframes + 1))");
2976 "Adaptive Subframe Threshold",
2977 "The relative distance a particle can move before requiring more subframes "
2978 "(target Courant number); 0.01 to 0.3 is the recommended range");
3031 prop,
"Effector Number",
"How many particles are effectors (0 is all particles)");
3040 prop,
"Normal",
"Let the surface normal give the particle a starting velocity");
3048 prop,
"Object Velocity",
"Let the object give the particle a starting velocity");
3063 prop,
"Particle",
"Let the target particle give the particle a starting velocity");
3071 prop,
"Tangent",
"Let the surface tangent give the particle a starting velocity");
3086 "Let the vector away from the target particle's location give the particle "
3087 "a starting velocity");
3098 "Let the emitter object orientation give the particle a starting velocity");
3106 prop,
"Angular Velocity",
"Angular velocity amount (in radians per second)");
3125 prop,
"Random Phase",
"Randomize rotation around the chosen orientation axis");
3130 prop,
"rna_PartSetting_hairlength_get",
"rna_PartSetting_hairlength_set",
nullptr);
3195 prop,
nullptr,
"child_percent");
3206 prop,
"Rendered Children",
"Number of children per parent for rendering");
3225 prop,
"Random Child Size",
"Random variation to the size of the child particles");
3319 prop,
"Extra Steps",
"Extra steps for resolution of special kink features");
3360 prop,
"Threshold",
"Amount of particles left untouched by random roughness");
3398 prop,
"Threshold",
"Amount of particles left untouched by child path length");
3406 prop,
"Parting Factor",
"Create parting in the children based on parent strands");
3414 "Minimum root to tip angle (tip distance/root distance for long hair)");
3422 "Maximum root to tip angle (tip distance/root distance for long hair)");
3435 prop,
"rna_PartSetting_linelentail_get",
"rna_PartSetting_linelentail_set",
nullptr);
3443 prop,
"rna_PartSetting_linelenhead_get",
"rna_PartSetting_linelenhead_set",
nullptr);
3481 "Use Modifier Stack",
3482 "Emit particles from mesh with modifiers applied "
3483 "(must use same subdivision surface level for viewport and render for correct results)");
3493 prop,
"Instance Collection",
"Show objects in this collection in place of particles");
3500 "Instance Collection Weights",
3501 "Weights for all of the objects in the instance collection");
3506 prop,
"rna_ParticleDupliWeight_active_get",
nullptr,
nullptr,
nullptr);
3511 "rna_ParticleDupliWeight_active_index_get",
3512 "rna_ParticleDupliWeight_active_index_set",
3513 "rna_ParticleDupliWeight_active_index_range");
3583 prop, 0,
"rna_Particle_redo");
3589 prop, 0,
"rna_Particle_redo");
3597 prop, 0,
"rna_Particle_redo");
3605 prop, 0,
"rna_Particle_redo");
3613 prop, 0,
"rna_Particle_redo");
3625 {0,
nullptr, 0,
nullptr,
nullptr},
3633 prop,
"rna_ParticleTarget_name_get",
"rna_ParticleTarget_name_length",
nullptr);
3645 "The object that has the target particle system (empty if same object)");
3652 prop,
"Target Particle System",
"The index of particle system on the target object");
3706 prop,
"rna_particle_settings_get",
"rna_particle_settings_set",
nullptr,
nullptr);
3721 prop,
"Child Particles",
"Child particles generated by the particle system");
3725 prop,
"Seed",
"Offset in the random number table, to get a different randomized result");
3732 "Offset in the random number table for child particles, to get a different "
3733 "randomized result");
3759 "Reactor Target Object",
3760 "For reactor systems, the object that has the target particle system "
3761 "(empty if same object)");
3768 "Reactor Target Particle System",
3769 "For reactor systems, index of particle system on the target object");
3786 prop,
"rna_ParticleSystem_active_particle_target_get",
nullptr,
nullptr,
nullptr);
3791 "rna_ParticleSystem_active_particle_target_index_get",
3792 "rna_ParticleSystem_active_particle_target_index_set",
3793 "rna_ParticleSystem_active_particle_target_index_range");
3808 "rna_ParticleVGroup_name_get_0",
3809 "rna_ParticleVGroup_name_len_0",
3810 "rna_ParticleVGroup_name_set_0");
3817 prop,
"Vertex Group Density Negate",
"Negate the effect of the density vertex group");
3822 "rna_ParticleVGroup_name_get_1",
3823 "rna_ParticleVGroup_name_len_1",
3824 "rna_ParticleVGroup_name_set_1");
3831 prop,
"Vertex Group Velocity Negate",
"Negate the effect of the velocity vertex group");
3836 "rna_ParticleVGroup_name_get_2",
3837 "rna_ParticleVGroup_name_len_2",
3838 "rna_ParticleVGroup_name_set_2");
3845 prop,
"Vertex Group Length Negate",
"Negate the effect of the length vertex group");
3850 "rna_ParticleVGroup_name_get_3",
3851 "rna_ParticleVGroup_name_len_3",
3852 "rna_ParticleVGroup_name_set_3");
3859 prop,
"Vertex Group Clump Negate",
"Negate the effect of the clump vertex group");
3864 "rna_ParticleVGroup_name_get_4",
3865 "rna_ParticleVGroup_name_len_4",
3866 "rna_ParticleVGroup_name_set_4");
3873 prop,
"Vertex Group Kink Negate",
"Negate the effect of the kink vertex group");
3878 "rna_ParticleVGroup_name_get_5",
3879 "rna_ParticleVGroup_name_len_5",
3880 "rna_ParticleVGroup_name_set_5");
3882 prop,
"Vertex Group Roughness 1",
"Vertex group to control roughness 1");
3888 "Vertex Group Roughness 1 Negate",
3889 "Negate the effect of the roughness 1 vertex group");
3894 "rna_ParticleVGroup_name_get_6",
3895 "rna_ParticleVGroup_name_len_6",
3896 "rna_ParticleVGroup_name_set_6");
3898 prop,
"Vertex Group Roughness 2",
"Vertex group to control roughness 2");
3904 "Vertex Group Roughness 2 Negate",
3905 "Negate the effect of the roughness 2 vertex group");
3910 "rna_ParticleVGroup_name_get_7",
3911 "rna_ParticleVGroup_name_len_7",
3912 "rna_ParticleVGroup_name_set_7");
3914 prop,
"Vertex Group Roughness End",
"Vertex group to control roughness end");
3920 "Vertex Group Roughness End Negate",
3921 "Negate the effect of the roughness end vertex group");
3926 "rna_ParticleVGroup_name_get_8",
3927 "rna_ParticleVGroup_name_len_8",
3928 "rna_ParticleVGroup_name_set_8");
3935 prop,
"Vertex Group Size Negate",
"Negate the effect of the size vertex group");
3940 "rna_ParticleVGroup_name_get_9",
3941 "rna_ParticleVGroup_name_len_9",
3942 "rna_ParticleVGroup_name_set_9");
3949 prop,
"Vertex Group Tangent Negate",
"Negate the effect of the tangent vertex group");
3954 "rna_ParticleVGroup_name_get_10",
3955 "rna_ParticleVGroup_name_len_10",
3956 "rna_ParticleVGroup_name_set_10");
3963 prop,
"Vertex Group Rotation Negate",
"Negate the effect of the rotation vertex group");
3968 "rna_ParticleVGroup_name_get_11",
3969 "rna_ParticleVGroup_name_len_11",
3970 "rna_ParticleVGroup_name_set_11");
3977 prop,
"Vertex Group Field Negate",
"Negate the effect of the field vertex group");
3982 "rna_ParticleVGroup_name_get_12",
3983 "rna_ParticleVGroup_name_len_12",
3984 "rna_ParticleVGroup_name_set_12");
3991 prop,
"Vertex Group Twist Negate",
"Negate the effect of the twist vertex group");
4012 prop,
"Parent",
"Use this object's coordinate system instead of global coordinate system");
4032 prop,
"Timestep",
"The current simulation time step size, as a fraction of a frame");
4044 RNA_def_int(func,
"particle_no", 0, INT_MIN, INT_MAX,
"Particle no",
"", INT_MIN, INT_MAX);
4045 RNA_def_int(func,
"step", 0, INT_MIN, INT_MAX,
"step no",
"", INT_MIN, INT_MAX);
4047 func,
"co", 3,
nullptr, -
FLT_MAX,
FLT_MAX,
"Co",
"Exported hairkey location", -1e4, 1e4);
4052 func =
RNA_def_function(srna,
"uv_on_emitter",
"rna_ParticleSystem_uv_on_emitter");
4055 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
4059 RNA_def_int(func,
"particle_no", 0, INT_MIN, INT_MAX,
"Particle no",
"", INT_MIN, INT_MAX);
4060 RNA_def_int(func,
"uv_no", 0, INT_MIN, INT_MAX,
"UV no",
"", INT_MIN, INT_MAX);
4067 func =
RNA_def_function(srna,
"mcol_on_emitter",
"rna_ParticleSystem_mcol_on_emitter");
4070 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
4074 RNA_def_int(func,
"particle_no", 0, INT_MIN, INT_MAX,
"Particle no",
"", INT_MIN, INT_MAX);
4075 RNA_def_int(func,
"vcol_no", 0, INT_MIN, INT_MAX,
"vcol no",
"", INT_MIN, INT_MAX);
void boid_default_settings(struct BoidSettings *boids)
struct BoidRule * boid_new_rule(int type)
struct BoidState * boid_new_state(struct BoidSettings *boids)
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
Main * CTX_data_main(const bContext *C)
CustomData interface, see also DNA_customdata_types.h.
const void * CustomData_get_layer_n(const CustomData *data, eCustomDataType type, int n)
const void * CustomData_get_layer(const CustomData *data, eCustomDataType type)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
General operations, lookup, etc. for materials.
Material * BKE_object_material_get(Object *ob, short act)
void BKE_mesh_tessface_ensure(Mesh *mesh)
ModifierData * BKE_modifier_get_original(const Object *object, ModifierData *md)
ModifierData * BKE_modifier_new(int type)
void BKE_particlesettings_fluid_default_settings(struct ParticleSettings *part)
void BKE_particlesettings_rough_curve_init(struct ParticleSettings *part)
bool psys_check_edited(struct ParticleSystem *psys)
void BKE_particlesettings_twist_curve_init(struct ParticleSettings *part)
void psys_check_group_weights(struct ParticleSettings *part)
void BKE_particlesettings_clump_curve_init(struct ParticleSettings *part)
void psys_mat_hair_to_object(struct Object *ob, struct Mesh *mesh, short from, struct ParticleData *pa, float hairmat[4][4])
void psys_particle_on_emitter(struct ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float fuv[4], float foffset, float vec[3], float nor[3], float utan[3], float vtan[3], float orco[3])
void psys_interpolate_uvs(const struct MTFace *tface, int quad, const float w[4], float r_uv[2])
void psys_check_boid_data(struct ParticleSystem *psys)
void psys_changed_type(struct Object *ob, struct ParticleSystem *psys)
void psys_find_group_weights(struct ParticleSettings *part)
void psys_interpolate_mcol(const struct MCol *mcol, int quad, const float w[4], struct MCol *mc)
void BKE_report(ReportList *reports, eReportType type, const char *message)
struct Tex * give_current_particle_texture(struct ParticleSettings *part)
void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
void mul_m4_v3(const float M[4][4], float r[3])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void zero_v2(float r[2])
MINLINE void zero_v3(float r[3])
ATTR_WARN_UNUSED_RESULT const size_t num
size_t BLI_snprintf_rlen(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char char size_t BLI_strncpy_rlen(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
char size_t BLI_strncpy_utf8_rlen(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
size_t BLI_snprintf_utf8_rlen(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define STRNCPY_UTF8(dst, src)
void BLI_uniquename(const struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_maxncpy) ATTR_NONNULL(1
#define ARRAY_HAS_ITEM(arr_item, arr_start, arr_len)
#define BLT_I18NCONTEXT_AMOUNT
#define BLT_I18NCONTEXT_ID_IMAGE
#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS
#define BLT_I18NCONTEXT_ID_TEXTURE
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
#define BOIDSTATE_CURRENT
@ CLOTH_COLLSETTINGS_FLAG_SELF
@ CLOTH_SIMSETTINGS_FLAG_RESIST_SPRING_COMPRESS
@ eModifierType_ParticleSystem
@ SPH_CURRENT_REST_LENGTH
@ SPH_VISCOELASTIC_SPRINGS
@ PART_HIDE_ADVANCED_HAIR
@ PART_FLUID_SPRAYFOAMBUBBLE
@ PART_CHILD_USE_TWIST_CURVE
@ PART_CHILD_USE_CLUMP_CURVE
@ PART_CHILD_USE_CLUMP_NOISE
@ PART_CHILD_USE_ROUGH_CURVE
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
BMesh const char void * data
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
ccl_device_inline uint particle_index(KernelGlobals kg, const int particle)
void * MEM_callocN(size_t len, const char *str)
const PointerRNA PointerRNA_NULL
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, size_t itemsize, int64_t length, bool free_ptr, IteratorSkipFunc skip)
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
PointerRNA RNA_id_pointer_create(ID *id)
void rna_def_animdata_common(StructRNA *srna)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_define_lib_overridable(const bool make_overridable)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin, const char *activeget, const char *activeset, const char *activeeditable, const char *name, const char *name_slots, const char *update, const char *update_index)
const EnumPropertyItem rna_enum_axis_xyz_items[]
static void rna_def_particle_settings(BlenderRNA *brna)
static void rna_def_fluid_settings(BlenderRNA *brna)
static void rna_def_particle_settings_mtex(BlenderRNA *brna)
static const EnumPropertyItem part_type_items[]
static void rna_def_particle_dupliweight(BlenderRNA *brna)
static const EnumPropertyItem part_draw_as_items[]
void RNA_def_particle(BlenderRNA *brna)
static void rna_def_particle_target(BlenderRNA *brna)
static void rna_def_particle_system(BlenderRNA *brna)
static void rna_def_particle(BlenderRNA *brna)
static void rna_def_particle_hair_key(BlenderRNA *brna)
static const EnumPropertyItem part_reactor_from_items[]
static const EnumPropertyItem part_dist_items[]
static void rna_def_particle_key(BlenderRNA *brna)
static const EnumPropertyItem part_ren_as_items[]
static void rna_def_child_particle(BlenderRNA *brna)
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
struct ClothSimSettings * sim_parms
struct ClothCollSettings * coll_parms
struct ModifierData * next
struct ParticleDupliWeight * next
struct CurveMapping * clumpcurve
struct CurveMapping * roughcurve
struct CurveMapping * twistcurve
struct BoidSettings * boids
struct ListBase instance_weights
struct SPHFluidSettings * fluid
struct ParticleSystem * psys
struct PTCacheEdit * edit
struct ParticleSystem * next
struct PointCache * pointcache
struct ClothModifierData * clmd
struct ParticleCacheKey ** childcache
struct Mesh * hair_out_mesh
struct ParticleCacheKey ** pathcache
struct ParticleTarget * next
struct PTCacheEdit * edit
void WM_main_add_notifier(uint type, void *reference)