169 static void rna_ParticleHairKey_location_object_info(
PointerRNA *
ptr,
198 for (md = ob->modifiers.first; md; md = md->
next) {
203 for (i = 0, pa = psys->
particles; i < psys->totpart; i++, pa++) {
218 static void rna_ParticleHairKey_location_object_get(
PointerRNA *
ptr,
float *values)
225 rna_ParticleHairKey_location_object_info(
ptr, &psmd, &pa);
252 static int hair_key_index_get(
HairKey *hair_key,
257 return hair_key - particle->
hair;
269 return hair_key - original_particle->
hair;
281 static void hair_key_location_object_set(
HairKey *hair_key,
285 const float src_co[3])
291 const int hair_key_index = hair_key_index_get(hair_key, modifier, particle);
292 if (hair_key_index == -1) {
312 static void rna_ParticleHairKey_location_object_set(
PointerRNA *
ptr,
const float *values)
319 rna_ParticleHairKey_location_object_info(
ptr, &psmd, &pa);
326 hair_key_location_object_set(hkey, ob, psmd, pa, values);
329 static void rna_ParticleHairKey_co_object(
HairKey *hairkey,
356 static void rna_ParticleHairKey_co_object_set(
ID *
id,
364 if (particle ==
NULL) {
374 hair_key_location_object_set(hair_key,
object, modifier, particle, co);
381 static void rna_Particle_uv_on_emitter(
ParticleData *particle,
388 psmd, part->from, pa->
num, pa->
num_dmcache, pa->
fuv, pa->
foffset, co,
nor, 0, 0, sd.orco, 0);
392 BKE_report(reports,
RPT_ERROR,
"uv_on_emitter() requires a modifier from an evaluated object");
421 if (mface && mtface) {
432 static void rna_ParticleSystem_co_hair(
442 if (particlesystem ==
NULL) {
446 part = particlesystem->
part;
465 if (particle_no < totpart && particlesystem->pathcache) {
466 cache = particlesystem->
pathcache[particle_no];
469 else if (particle_no < totpart + totchild && particlesystem->childcache) {
470 cache = particlesystem->
childcache[particle_no - totpart];
484 if (step >= 0 && step <= max_k) {
503 if (ob && ob->
totcol > 0) {
504 for (i = 1; i <= ob->
totcol; i++) {
507 tmp.
icon = ICON_MATERIAL_DATA;
513 tmp.
name =
"Default Material";
521 tmp.
icon = ICON_MATERIAL_DATA;
522 tmp.
name =
"Default Material";
534 static int rna_ParticleSystem_tessfaceidx_on_emitter(
ParticleSystem *particlesystem,
552 if (!particlesystem || !totface) {
556 part = particlesystem->
part;
567 if (particle_no >= totpart + totchild) {
572 if (particle_no < totpart) {
578 *r_fuv = &particle->
fuv;
586 *r_fuv = &particle->
fuv;
591 for (
int i = 0; i < totface; i++, mface++) {
592 if (
ELEM(num, mface->
v1, mface->
v2, mface->
v3, mface->
v4)) {
621 *r_fuv = &parent->
fuv;
629 *r_fuv = &parent->
fuv;
634 for (
int i = 0; i < totface; i++, mface++) {
635 if (
ELEM(num, mface->
v1, mface->
v2, mface->
v3, mface->
v4)) {
647 static void rna_ParticleSystem_uv_on_emitter(
ParticleSystem *particlesystem,
669 const int num = rna_ParticleSystem_tessfaceidx_on_emitter(
670 particlesystem, modifier, particle, particle_no, &fuv);
686 static void rna_ParticleSystem_mcol_on_emitter(
ParticleSystem *particlesystem,
703 const int num = rna_ParticleSystem_tessfaceidx_on_emitter(
704 particlesystem, modifier, particle, particle_no, &fuv);
716 r_mcol[0] = (
float)mcol.
b / 255.0f;
717 r_mcol[1] = (
float)mcol.
g / 255.0f;
718 r_mcol[2] = (
float)mcol.
r / 255.0f;
747 rna_Particle_redo(bmain,
scene,
ptr);
766 rna_Particle_reset(bmain,
scene,
ptr);
776 if (psys->
part == part) {
853 if (pt->
ob == ob || pt->
ob ==
NULL) {
904 if (psys && !psys->clmd) {
906 psys->clmd->sim_parms->goalspring = 0.0f;
909 rna_Particle_redo(bmain,
scene,
ptr);
962 rna_Particle_redo(bmain,
scene,
ptr);
964 static void rna_PartSettings_start_set(
struct PointerRNA *
ptr,
float value)
969 if (value > settings->
end) {
970 settings->
end = value;
980 settings->
sta = value;
983 static void rna_PartSettings_end_set(
struct PointerRNA *
ptr,
float value)
988 if (value < settings->sta) {
989 settings->
sta = value;
992 settings->
end = value;
995 static void rna_PartSetings_timestep_set(
struct PointerRNA *
ptr,
float value)
1002 static float rna_PartSettings_timestep_get(
struct PointerRNA *
ptr)
1009 static void rna_PartSetting_hairlength_set(
struct PointerRNA *
ptr,
float value)
1012 settings->
normfac = value / 4.0f;
1015 static float rna_PartSetting_hairlength_get(
struct PointerRNA *
ptr)
1018 return settings->
normfac * 4.0f;
1021 static void rna_PartSetting_linelentail_set(
struct PointerRNA *
ptr,
float value)
1027 static float rna_PartSetting_linelentail_get(
struct PointerRNA *
ptr)
1032 static void rna_PartSetting_pathstartend_range(
1046 static void rna_PartSetting_linelenhead_set(
struct PointerRNA *
ptr,
float value)
1052 static float rna_PartSetting_linelenhead_get(
struct PointerRNA *
ptr)
1084 rna_Particle_redo_child(bmain,
scene,
ptr);
1087 static void rna_ParticleSettings_use_roughness_curve_update(
Main *bmain,
1099 rna_Particle_redo_child(bmain,
scene,
ptr);
1112 rna_Particle_redo_child(bmain,
scene,
ptr);
1115 static void rna_ParticleSystem_name_set(
PointerRNA *
ptr,
const char *value)
1125 DATA_(
"ParticleSystem"),
1128 sizeof(part->name));
1136 for (; pt; pt = pt->
next) {
1143 static void rna_ParticleSystem_active_particle_target_index_range(
1151 static int rna_ParticleSystem_active_particle_target_index_get(
PointerRNA *
ptr)
1157 for (; pt; pt = pt->
next, i++) {
1166 static void rna_ParticleSystem_active_particle_target_index_set(
struct PointerRNA *
ptr,
int value)
1172 for (; pt; pt = pt->
next, i++) {
1206 strcpy(
str,
"Invalid target!");
1210 strcpy(
str,
"Invalid target!");
1218 rna_ParticleTarget_name_get(
ptr, tstr);
1220 return strlen(tstr);
1234 if (particle_id_check(
ptr)) {
1244 static bool rna_ParticleSystem_multiple_caches_get(
PointerRNA *
ptr)
1250 static bool rna_ParticleSystem_editable_get(
PointerRNA *
ptr)
1272 for (; dw; dw = dw->next) {
1279 static void rna_ParticleDupliWeight_active_index_range(
1287 static int rna_ParticleDupliWeight_active_index_get(
PointerRNA *
ptr)
1293 for (; dw; dw = dw->next, i++) {
1302 static void rna_ParticleDupliWeight_active_index_set(
struct PointerRNA *
ptr,
int value)
1308 for (; dw; dw = dw->next, i++) {
1329 strcpy(
str,
"No object");
1333 static int rna_ParticleDupliWeight_name_length(
PointerRNA *
ptr)
1337 rna_ParticleDupliWeight_name_get(
ptr, tstr);
1339 return strlen(tstr);
1353 return part_fluid_type_items;
1365 return part_from_items;
1376 return part_hair_dist_items;
1391 return part_hair_draw_as_items;
1406 return part_hair_ren_as_items;
1437 static void psys_vg_name_get__internal(
PointerRNA *
ptr,
char *value,
int index)
1442 if (psys->
vgroup[index] > 0) {
1446 strcpy(value, defGroup->
name);
1453 static int psys_vg_name_len__internal(
PointerRNA *
ptr,
int index)
1458 if (psys->
vgroup[index] > 0) {
1462 return strlen(defGroup->
name);
1467 static void psys_vg_name_set__internal(
PointerRNA *
ptr,
const char *value,
int index)
1472 if (value[0] ==
'\0') {
1478 if (defgrp_index == -1) {
1482 psys->
vgroup[index] = defgrp_index + 1;
1489 char name_esc[
sizeof(psys->
name) * 2];
1492 return BLI_sprintfN(
"particle_systems[\"%s\"]", name_esc);
1510 static void rna_ParticleSettings_active_texture_set(
PointerRNA *
ptr,
1520 static void rna_ParticleVGroup_name_get_0(
PointerRNA *
ptr,
char *value)
1522 psys_vg_name_get__internal(
ptr, value, 0);
1524 static void rna_ParticleVGroup_name_get_1(
PointerRNA *
ptr,
char *value)
1526 psys_vg_name_get__internal(
ptr, value, 1);
1528 static void rna_ParticleVGroup_name_get_2(
PointerRNA *
ptr,
char *value)
1530 psys_vg_name_get__internal(
ptr, value, 2);
1532 static void rna_ParticleVGroup_name_get_3(
PointerRNA *
ptr,
char *value)
1534 psys_vg_name_get__internal(
ptr, value, 3);
1536 static void rna_ParticleVGroup_name_get_4(
PointerRNA *
ptr,
char *value)
1538 psys_vg_name_get__internal(
ptr, value, 4);
1540 static void rna_ParticleVGroup_name_get_5(
PointerRNA *
ptr,
char *value)
1542 psys_vg_name_get__internal(
ptr, value, 5);
1544 static void rna_ParticleVGroup_name_get_6(
PointerRNA *
ptr,
char *value)
1546 psys_vg_name_get__internal(
ptr, value, 6);
1548 static void rna_ParticleVGroup_name_get_7(
PointerRNA *
ptr,
char *value)
1550 psys_vg_name_get__internal(
ptr, value, 7);
1552 static void rna_ParticleVGroup_name_get_8(
PointerRNA *
ptr,
char *value)
1554 psys_vg_name_get__internal(
ptr, value, 8);
1556 static void rna_ParticleVGroup_name_get_9(
PointerRNA *
ptr,
char *value)
1558 psys_vg_name_get__internal(
ptr, value, 9);
1560 static void rna_ParticleVGroup_name_get_10(
PointerRNA *
ptr,
char *value)
1562 psys_vg_name_get__internal(
ptr, value, 10);
1564 static void rna_ParticleVGroup_name_get_11(
PointerRNA *
ptr,
char *value)
1566 psys_vg_name_get__internal(
ptr, value, 11);
1568 static void rna_ParticleVGroup_name_get_12(
PointerRNA *
ptr,
char *value)
1570 psys_vg_name_get__internal(
ptr, value, 12);
1575 return psys_vg_name_len__internal(
ptr, 0);
1579 return psys_vg_name_len__internal(
ptr, 1);
1583 return psys_vg_name_len__internal(
ptr, 2);
1587 return psys_vg_name_len__internal(
ptr, 3);
1591 return psys_vg_name_len__internal(
ptr, 4);
1595 return psys_vg_name_len__internal(
ptr, 5);
1599 return psys_vg_name_len__internal(
ptr, 6);
1603 return psys_vg_name_len__internal(
ptr, 7);
1607 return psys_vg_name_len__internal(
ptr, 8);
1611 return psys_vg_name_len__internal(
ptr, 9);
1615 return psys_vg_name_len__internal(
ptr, 10);
1619 return psys_vg_name_len__internal(
ptr, 11);
1623 return psys_vg_name_len__internal(
ptr, 12);
1626 static void rna_ParticleVGroup_name_set_0(
PointerRNA *
ptr,
const char *value)
1628 psys_vg_name_set__internal(
ptr, value, 0);
1630 static void rna_ParticleVGroup_name_set_1(
PointerRNA *
ptr,
const char *value)
1632 psys_vg_name_set__internal(
ptr, value, 1);
1634 static void rna_ParticleVGroup_name_set_2(
PointerRNA *
ptr,
const char *value)
1636 psys_vg_name_set__internal(
ptr, value, 2);
1638 static void rna_ParticleVGroup_name_set_3(
PointerRNA *
ptr,
const char *value)
1640 psys_vg_name_set__internal(
ptr, value, 3);
1642 static void rna_ParticleVGroup_name_set_4(
PointerRNA *
ptr,
const char *value)
1644 psys_vg_name_set__internal(
ptr, value, 4);
1646 static void rna_ParticleVGroup_name_set_5(
PointerRNA *
ptr,
const char *value)
1648 psys_vg_name_set__internal(
ptr, value, 5);
1650 static void rna_ParticleVGroup_name_set_6(
PointerRNA *
ptr,
const char *value)
1652 psys_vg_name_set__internal(
ptr, value, 6);
1654 static void rna_ParticleVGroup_name_set_7(
PointerRNA *
ptr,
const char *value)
1656 psys_vg_name_set__internal(
ptr, value, 7);
1658 static void rna_ParticleVGroup_name_set_8(
PointerRNA *
ptr,
const char *value)
1660 psys_vg_name_set__internal(
ptr, value, 8);
1662 static void rna_ParticleVGroup_name_set_9(
PointerRNA *
ptr,
const char *value)
1664 psys_vg_name_set__internal(
ptr, value, 9);
1666 static void rna_ParticleVGroup_name_set_10(
PointerRNA *
ptr,
const char *value)
1668 psys_vg_name_set__internal(
ptr, value, 10);
1670 static void rna_ParticleVGroup_name_set_11(
PointerRNA *
ptr,
const char *value)
1672 psys_vg_name_set__internal(
ptr, value, 11);
1674 static void rna_ParticleVGroup_name_set_12(
PointerRNA *
ptr,
const char *value)
1676 psys_vg_name_set__internal(
ptr, value, 12);
1703 prop,
"Location (Object Space)",
"Location of the hair key in object space");
1705 "rna_ParticleHairKey_location_object_get",
1706 "rna_ParticleHairKey_location_object_set",
1713 "Location of the hair key in its local coordinate system, "
1714 "relative to the emitting face");
1717 func =
RNA_def_function(srna,
"co_object",
"rna_ParticleHairKey_co_object");
1721 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
1723 parm =
RNA_def_pointer(func,
"particle",
"Particle",
"",
"hair particle");
1726 func,
"co", 3,
NULL, -FLT_MAX, FLT_MAX,
"Co",
"Exported hairkey location", -1e4, 1e4);
1730 func =
RNA_def_function(srna,
"co_object_set",
"rna_ParticleHairKey_co_object_set");
1735 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
1737 parm =
RNA_def_pointer(func,
"particle",
"Particle",
"",
"hair particle");
1740 func,
"co", 3,
NULL, -FLT_MAX, FLT_MAX,
"Co",
"Specified hairkey location", -1e4, 1e4);
1779 srna,
"Child Particle",
"Child particle interpolated from simulated or edited particles");
1902 func =
RNA_def_function(srna,
"uv_on_emitter",
"rna_Particle_uv_on_emitter");
1904 "Obtain UV coordinates for a particle on an evaluated mesh.");
1908 "ParticleSystemModifier",
1910 "Particle modifier from an evaluated object");
1925 "Particle Instance Object Weight",
1926 "Weight of a particle instance object in a collection");
1931 prop,
"rna_ParticleDupliWeight_name_get",
"rna_ParticleDupliWeight_name_length",
NULL);
1939 prop,
"Count",
"The number of times this object is repeated with respect to other objects");
1953 "An artistic solver with strong surface tension effects (original)"},
1968 prop,
"SPH Solver",
"The code used to calculate internal forces on particles");
1993 prop,
"Viscoelastic Springs",
"Use viscoelastic springs instead of Hooke's springs");
2000 "Initial Rest Length",
2001 "Use the initial length as spring rest length instead of 2 * particle size");
2010 "How much the spring rest length can change after the elastic limit is crossed");
2019 "How much the spring has to be stretched/compressed in order to change its rest length");
2027 "Create springs for this number of frames since particles birth (0 is always)");
2060 "How strongly the fluid tries to keep from clustering (factor of stiffness)");
2078 "Artificial buoyancy force in negative gravity direction based on pressure "
2079 "differences inside the fluid");
2094 "Density is calculated as a factor of default density (depends on particle size)");
2100 prop,
"Factor Radius",
"Interaction radius is a factor of 4 * particle size");
2106 prop,
"Factor Stiff Viscosity",
"Stiff viscosity is a factor of normal viscosity");
2112 prop,
"Factor Rest Length",
"Spring rest length is a factor of 2 * particle size");
2122 {
TEXCO_GLOB,
"GLOBAL", 0,
"Global",
"Use global coordinates for the texture coordinates"},
2127 "Use linked object's coordinates for texture coordinates"},
2128 {
TEXCO_UV,
"UV", 0,
"UV",
"Use UV coordinates for texture coordinates"},
2133 "Use the original undeformed coordinates of the object"},
2137 "Strand / Particle",
2138 "Use normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
2143 {
MTEX_FLAT,
"FLAT", 0,
"Flat",
"Map X and Y coordinates directly"},
2144 {
MTEX_CUBE,
"CUBE", 0,
"Cube",
"Map using the normal vector"},
2145 {
MTEX_TUBE,
"TUBE", 0,
"Tube",
"Map with Z as central axis"},
2146 {
MTEX_SPHERE,
"SPHERE", 0,
"Sphere",
"Map with Z as central axis"},
2151 {0,
"NONE", 0,
"None",
""},
2152 {1,
"X", 0,
"X",
""},
2153 {2,
"Y", 0,
"Y",
""},
2154 {3,
"Z", 0,
"Z",
""},
2159 {0,
"NONE", 0,
"None",
""},
2160 {1,
"X", 0,
"X",
""},
2161 {2,
"Y", 0,
"Y",
""},
2162 {3,
"Z", 0,
"Z",
""},
2167 {0,
"NONE", 0,
"None",
""},
2168 {1,
"X", 0,
"X",
""},
2169 {2,
"Y", 0,
"Y",
""},
2170 {3,
"Z", 0,
"Z",
""},
2174 srna =
RNA_def_struct(brna,
"ParticleSettingsTextureSlot",
"TextureSlot");
2177 "Particle Settings Texture Slot",
2178 "Texture slot for textures in a Particle Settings data-block");
2184 "Texture Coordinates",
2185 "Texture coordinates used to map the texture onto the background");
2194 prop,
"Object",
"Object to use for mapping with Object texture coordinates");
2200 prop,
"UV Map",
"UV map to use for mapping with UV texture coordinates");
2302 prop,
"Emission Time Factor",
"Amount texture affects particle emission time");
2327 prop,
"Velocity Factor",
"Amount texture affects particle initial velocity");
2364 prop,
"Kink Amplitude Factor",
"Amount texture affects child kink amplitude");
2371 prop,
"Kink Frequency Factor",
"Amount texture affects child kink frequency");
2402 {0,
"NONE", 0,
"None",
""},
2416 {0,
"NONE", 0,
"None",
""},
2435 {0,
"NONE", 0,
"None",
""},
2469 {0,
"DUMMY", 0,
"Dummy",
""},
2475 srna,
"Particle Settings",
"Particle settings, reusable by multiple particle systems");
2480 "rna_ParticleSettings_mtex_begin",
2481 "rna_ParticleSettings_active_texture_get",
2482 "rna_ParticleSettings_active_texture_set",
2484 "ParticleSettingsTextureSlot",
2485 "ParticleSettingsTextureSlots",
2486 "rna_Particle_reset_dependency",
2534 "Even Distribution",
2535 "Use even distribution from faces based on face areas or edge lengths");
2542 prop,
"Die on Hit",
"Particles die when they collide with a deflector object");
2561 prop,
"Dynamic",
"Particle rotations are affected by collisions and effectors");
2589 prop,
"Invert Grid",
"Invert what is considered object and what is not");
2638 prop,
"Distribution",
"How to distribute particles on selected element");
2656 "Particle orientation axis (does not affect Explode modifier's results)");
2664 prop,
"Angular Velocity Axis",
"What axis is used to change particle rotation with time");
2734 "Use object's rotation for duplication (global x-axis is aligned "
2735 "particle rotation axis)");
2831 prop,
"Degrees",
"How many degrees path has to curve to make another render segment");
2837 prop,
"Pixel",
"How many pixels path has to cover to make another render segment");
2849 prop,
"Material Index",
"Index of material slot used for rendering particles");
2863 "Algorithm used to calculate physics, from the fastest to the "
2864 "most stable and accurate: Midpoint, Euler, Verlet, RK4");
2917 prop,
"Tweak",
"A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)");
2922 prop,
"rna_PartSettings_timestep_get",
"rna_PartSetings_timestep_set",
NULL);
2926 prop,
"Timestep",
"The simulation timestep per frame (seconds per frame)");
2932 prop,
"Automatic Subframes",
"Automatically set the number of subframes");
2940 "Subframes to simulate for improved stability and finer granularity simulations "
2941 "(dt = timestep / (subframes + 1))");
2948 "Adaptive Subframe Threshold",
2949 "The relative distance a particle can move before requiring more subframes "
2950 "(target Courant number); 0.01 to 0.3 is the recommended range");
3002 prop,
"Effector Number",
"How many particles are effectors (0 is all particles)");
3011 prop,
"Normal",
"Let the surface normal give the particle a starting velocity");
3019 prop,
"Object Velocity",
"Let the object give the particle a starting velocity");
3034 prop,
"Particle",
"Let the target particle give the particle a starting velocity");
3042 prop,
"Tangent",
"Let the surface tangent give the particle a starting velocity");
3057 "Let the vector away from the target particle's location give the particle "
3058 "a starting velocity");
3069 "Let the emitter object orientation give the particle a starting velocity");
3077 prop,
"Angular Velocity",
"Angular velocity amount (in radians per second)");
3096 prop,
"Random Phase",
"Randomize rotation around the chosen orientation axis");
3101 prop,
"rna_PartSetting_hairlength_get",
"rna_PartSetting_hairlength_set",
NULL);
3175 prop,
"Rendered Children",
"Number of children per parent for rendering");
3194 prop,
"Random Child Size",
"Random variation to the size of the child particles");
3288 prop,
"Extra Steps",
"Extra steps for resolution of special kink features");
3329 prop,
"Threshold",
"Amount of particles left untouched by random roughness");
3367 prop,
"Threshold",
"Amount of particles left untouched by child path length");
3375 prop,
"Parting Factor",
"Create parting in the children based on parent strands");
3383 "Minimum root to tip angle (tip distance/root distance for long hair)");
3391 "Maximum root to tip angle (tip distance/root distance for long hair)");
3404 prop,
"rna_PartSetting_linelentail_get",
"rna_PartSetting_linelentail_set",
NULL);
3412 prop,
"rna_PartSetting_linelenhead_get",
"rna_PartSetting_linelenhead_set",
NULL);
3450 "Use Modifier Stack",
3451 "Emit particles from mesh with modifiers applied "
3452 "(must use same subdivision surface level for viewport and render for correct results)");
3462 prop,
"Instance Collection",
"Show objects in this collection in place of particles");
3469 "Instance Collection Weights",
3470 "Weights for all of the objects in the instance collection");
3479 "rna_ParticleDupliWeight_active_index_get",
3480 "rna_ParticleDupliWeight_active_index_set",
3481 "rna_ParticleDupliWeight_active_index_range");
3548 prop, 0,
"rna_Particle_redo");
3554 prop, 0,
"rna_Particle_redo");
3562 prop, 0,
"rna_Particle_redo");
3570 prop, 0,
"rna_Particle_redo");
3578 prop, 0,
"rna_Particle_redo");
3598 prop,
"rna_ParticleTarget_name_get",
"rna_ParticleTarget_name_length",
NULL);
3610 "The object that has the target particle system (empty if same object)");
3617 prop,
"Target Particle System",
"The index of particle system on the target object");
3671 prop,
"rna_particle_settings_get",
"rna_particle_settings_set",
NULL,
NULL);
3686 prop,
"Child Particles",
"Child particles generated by the particle system");
3690 prop,
"Seed",
"Offset in the random number table, to get a different randomized result");
3697 "Offset in the random number table for child particles, to get a different "
3698 "randomized result");
3724 "Reactor Target Object",
3725 "For reactor systems, the object that has the target particle system "
3726 "(empty if same object)");
3733 "Reactor Target Particle System",
3734 "For reactor systems, index of particle system on the target object");
3751 prop,
"rna_ParticleSystem_active_particle_target_get",
NULL,
NULL,
NULL);
3756 "rna_ParticleSystem_active_particle_target_index_get",
3757 "rna_ParticleSystem_active_particle_target_index_set",
3758 "rna_ParticleSystem_active_particle_target_index_range");
3773 "rna_ParticleVGroup_name_get_0",
3774 "rna_ParticleVGroup_name_len_0",
3775 "rna_ParticleVGroup_name_set_0");
3782 prop,
"Vertex Group Density Negate",
"Negate the effect of the density vertex group");
3787 "rna_ParticleVGroup_name_get_1",
3788 "rna_ParticleVGroup_name_len_1",
3789 "rna_ParticleVGroup_name_set_1");
3796 prop,
"Vertex Group Velocity Negate",
"Negate the effect of the velocity vertex group");
3801 "rna_ParticleVGroup_name_get_2",
3802 "rna_ParticleVGroup_name_len_2",
3803 "rna_ParticleVGroup_name_set_2");
3810 prop,
"Vertex Group Length Negate",
"Negate the effect of the length vertex group");
3815 "rna_ParticleVGroup_name_get_3",
3816 "rna_ParticleVGroup_name_len_3",
3817 "rna_ParticleVGroup_name_set_3");
3824 prop,
"Vertex Group Clump Negate",
"Negate the effect of the clump vertex group");
3829 "rna_ParticleVGroup_name_get_4",
3830 "rna_ParticleVGroup_name_len_4",
3831 "rna_ParticleVGroup_name_set_4");
3838 prop,
"Vertex Group Kink Negate",
"Negate the effect of the kink vertex group");
3843 "rna_ParticleVGroup_name_get_5",
3844 "rna_ParticleVGroup_name_len_5",
3845 "rna_ParticleVGroup_name_set_5");
3847 prop,
"Vertex Group Roughness 1",
"Vertex group to control roughness 1");
3853 "Vertex Group Roughness 1 Negate",
3854 "Negate the effect of the roughness 1 vertex group");
3859 "rna_ParticleVGroup_name_get_6",
3860 "rna_ParticleVGroup_name_len_6",
3861 "rna_ParticleVGroup_name_set_6");
3863 prop,
"Vertex Group Roughness 2",
"Vertex group to control roughness 2");
3869 "Vertex Group Roughness 2 Negate",
3870 "Negate the effect of the roughness 2 vertex group");
3875 "rna_ParticleVGroup_name_get_7",
3876 "rna_ParticleVGroup_name_len_7",
3877 "rna_ParticleVGroup_name_set_7");
3879 prop,
"Vertex Group Roughness End",
"Vertex group to control roughness end");
3885 "Vertex Group Roughness End Negate",
3886 "Negate the effect of the roughness end vertex group");
3891 "rna_ParticleVGroup_name_get_8",
3892 "rna_ParticleVGroup_name_len_8",
3893 "rna_ParticleVGroup_name_set_8");
3900 prop,
"Vertex Group Size Negate",
"Negate the effect of the size vertex group");
3905 "rna_ParticleVGroup_name_get_9",
3906 "rna_ParticleVGroup_name_len_9",
3907 "rna_ParticleVGroup_name_set_9");
3914 prop,
"Vertex Group Tangent Negate",
"Negate the effect of the tangent vertex group");
3919 "rna_ParticleVGroup_name_get_10",
3920 "rna_ParticleVGroup_name_len_10",
3921 "rna_ParticleVGroup_name_set_10");
3928 prop,
"Vertex Group Rotation Negate",
"Negate the effect of the rotation vertex group");
3933 "rna_ParticleVGroup_name_get_11",
3934 "rna_ParticleVGroup_name_len_11",
3935 "rna_ParticleVGroup_name_set_11");
3942 prop,
"Vertex Group Field Negate",
"Negate the effect of the field vertex group");
3947 "rna_ParticleVGroup_name_get_12",
3948 "rna_ParticleVGroup_name_len_12",
3949 "rna_ParticleVGroup_name_set_12");
3956 prop,
"Vertex Group Twist Negate",
"Negate the effect of the twist vertex group");
3977 prop,
"Parent",
"Use this object's coordinate system instead of global coordinate system");
3997 prop,
"Timestep",
"The current simulation time step size, as a fraction of a frame");
4009 RNA_def_int(func,
"particle_no", 0, INT_MIN, INT_MAX,
"Particle no",
"", INT_MIN, INT_MAX);
4010 RNA_def_int(func,
"step", 0, INT_MIN, INT_MAX,
"step no",
"", INT_MIN, INT_MAX);
4012 func,
"co", 3,
NULL, -FLT_MAX, FLT_MAX,
"Co",
"Exported hairkey location", -1e4, 1e4);
4017 func =
RNA_def_function(srna,
"uv_on_emitter",
"rna_ParticleSystem_uv_on_emitter");
4020 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
4024 RNA_def_int(func,
"particle_no", 0, INT_MIN, INT_MAX,
"Particle no",
"", INT_MIN, INT_MAX);
4025 RNA_def_int(func,
"uv_no", 0, INT_MIN, INT_MAX,
"UV no",
"", INT_MIN, INT_MAX);
4032 func =
RNA_def_function(srna,
"mcol_on_emitter",
"rna_ParticleSystem_mcol_on_emitter");
4035 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
4039 RNA_def_int(func,
"particle_no", 0, INT_MIN, INT_MAX,
"Particle no",
"", INT_MIN, INT_MAX);
4040 RNA_def_int(func,
"vcol_no", 0, INT_MIN, INT_MAX,
"vcol no",
"", INT_MIN, INT_MAX);
typedef float(TangentPoint)[2]
struct BoidRule * boid_new_rule(int type)
void boid_default_settings(struct BoidSettings *boids)
struct BoidState * boid_new_state(struct BoidSettings *boids)
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
bool CustomData_has_layer(const struct CustomData *data, int type)
void * CustomData_get_layer_n(const struct CustomData *data, int type, int n)
struct PartDeflect * BKE_partdeflect_new(int type)
void id_us_min(struct ID *id)
void id_us_plus(struct ID *id)
General operations, lookup, etc. for materials.
struct Material * BKE_object_material_get(struct Object *ob, short act)
void BKE_mesh_tessface_ensure(struct Mesh *mesh)
struct ModifierData * BKE_modifier_new(int type)
struct ModifierData * BKE_modifier_get_original(struct ModifierData *md)
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_interpolate_uvs(const struct MTFace *tface, int quad, const float w[4], float uvco[2])
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_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, ReportType type, const char *message)
void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex)
struct Tex * give_current_particle_texture(struct ParticleSettings *part)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
bool invert_m4_m4(float R[4][4], const float A[4][4])
void mul_m4_v3(const float M[4][4], float r[3])
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])
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, const size_t dst_maxncpy) ATTR_NONNULL()
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t len)
#define ARRAY_HAS_ITEM(arr_item, arr_start, arr_len)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
#define BOIDSTATE_CURRENT
@ CLOTH_COLLSETTINGS_FLAG_SELF
@ CLOTH_SIMSETTINGS_FLAG_RESIST_SPRING_COMPRESS
@ eModifierType_ParticleSystem
Object is a sort of wrapper for general info.
#define PART_DRAW_COL_MAT
#define PART_CHILD_EFFECT
#define PART_EVENT_COLLIDE
#define PART_INT_MIDPOINT
#define SPH_CURRENT_REST_LENGTH
#define PART_CHILD_PARTICLES
#define PTARGET_MODE_FRIEND
#define SPH_VISCOELASTIC_SPRINGS
#define PART_AVE_GLOBAL_X
#define PART_GRID_HEXAGONAL
#define PSYS_HAIR_DYNAMICS
#define PART_HAIR_BSPLINE
#define SPH_FAC_VISCOSITY
#define PTARGET_MODE_NEUTRAL
#define SPH_FAC_REPULSION
#define SPH_FAC_REST_LENGTH
#define PART_DRAW_COL_NONE
#define PART_DRAW_COL_ACC
#define PART_CHILD_LONG_HAIR
#define PART_AVE_VELOCITY
#define PART_AVE_GLOBAL_Y
#define PART_REACT_MULTIPLE
#define PART_HIDE_ADVANCED_HAIR
#define PART_DRAW_COL_VEL
#define PART_AVE_HORIZONTAL
#define PART_DUPLIW_CURRENT
#define PTARGET_MODE_ENEMY
#define PART_AVE_VERTICAL
#define SPH_SOLVER_CLASSICAL
#define PART_AVE_GLOBAL_Z
@ PART_CHILD_USE_TWIST_CURVE
@ PART_CHILD_USE_CLUMP_CURVE
@ PART_CHILD_USE_CLUMP_NOISE
@ PART_CHILD_USE_ROUGH_CURVE
#define PSYS_KEYED_TIMING
@ PART_FLUID_SPRAYFOAMBUBBLE
#define PART_REACT_STA_END
StructRNA RNA_FieldSettings
StructRNA RNA_ParticleSystem
StructRNA RNA_ParticleTarget
StructRNA RNA_ParticleDupliWeight
StructRNA RNA_ParticleSettings
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
return(oflags[bm->toolflag_index].f &oflag) !=0
ccl_device_inline uint particle_index(KernelGlobals *kg, int particle)
void *(* MEM_callocN)(size_t len, const char *str)
static const EnumPropertyItem mode_items[]
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
void rna_def_animdata_common(StructRNA *srna)
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)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
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)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_function_output(FunctionRNA *UNUSED(func), PropertyRNA *ret)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
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)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
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)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
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_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
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)
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(struct BlenderRNA *brna, struct StructRNA *srna, const char *begin, const char *activeget, const char *activeset, const char *activeeditable, const char *structname, const char *structname_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)
struct CustomData pdata ldata
struct CustomData vdata edata fdata
struct ModifierData * next
struct ModifierData * orig_modifier_data
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 ParticleCacheKey ** childcache
struct Mesh * hair_out_mesh
struct ParticleCacheKey ** pathcache
struct ParticleTarget * next
struct PTCacheEdit * edit
void WM_main_add_notifier(unsigned int type, void *reference)