155 static void rna_ParticleHairKey_location_object_info(
PointerRNA *
ptr,
184 for (md = ob->modifiers.first; md; md = md->
next) {
189 for (i = 0, pa = psys->
particles; i < psys->totpart; i++, pa++) {
204 static void rna_ParticleHairKey_location_object_get(
PointerRNA *
ptr,
float *values)
211 rna_ParticleHairKey_location_object_info(
ptr, &psmd, &pa);
238 static int hair_key_index_get(
const Object *
object,
244 return hair_key - particle->
hair;
256 return hair_key - original_particle->
hair;
268 static void hair_key_location_object_set(
HairKey *hair_key,
272 const float src_co[3])
278 const int hair_key_index = hair_key_index_get(
object, hair_key, modifier, particle);
279 if (hair_key_index == -1) {
299 static void rna_ParticleHairKey_location_object_set(
PointerRNA *
ptr,
const float *values)
306 rna_ParticleHairKey_location_object_info(
ptr, &psmd, &pa);
313 hair_key_location_object_set(hkey, ob, psmd, pa, values);
316 static void rna_ParticleHairKey_co_object(
HairKey *hairkey,
343 static void rna_ParticleHairKey_co_object_set(
ID *
id,
351 if (particle ==
NULL) {
361 hair_key_location_object_set(hair_key,
object, modifier, particle, co);
368 static void rna_Particle_uv_on_emitter(
ParticleData *particle,
375 psmd, part->from, pa->
num, pa->
num_dmcache, pa->
fuv, pa->
foffset, co,
nor, 0, 0, sd.orco, 0);
379 BKE_report(reports,
RPT_ERROR,
"uv_on_emitter() requires a modifier from an evaluated object");
408 if (mface && mtface) {
419 static void rna_ParticleSystem_co_hair(
429 if (particlesystem ==
NULL) {
433 part = particlesystem->
part;
451 if (particle_no < totpart && particlesystem->pathcache) {
452 cache = particlesystem->
pathcache[particle_no];
455 else if (particle_no < totpart + totchild && particlesystem->childcache) {
456 cache = particlesystem->
childcache[particle_no - totpart];
470 if (step >= 0 && step <= max_k) {
489 if (ob && ob->
totcol > 0) {
490 for (i = 1; i <= ob->
totcol; i++) {
493 tmp.
icon = ICON_MATERIAL_DATA;
499 tmp.
name =
"Default Material";
507 tmp.
icon = ICON_MATERIAL_DATA;
508 tmp.
name =
"Default Material";
520 static int rna_ParticleSystem_tessfaceidx_on_emitter(
ParticleSystem *particlesystem,
538 if (!particlesystem || !totface) {
542 part = particlesystem->
part;
553 if (particle_no >= totpart + totchild) {
558 if (particle_no < totpart) {
564 *r_fuv = &particle->
fuv;
572 *r_fuv = &particle->
fuv;
577 for (
int i = 0; i < totface; i++, mface++) {
578 if (
ELEM(num, mface->
v1, mface->
v2, mface->
v3, mface->
v4)) {
607 *r_fuv = &parent->
fuv;
615 *r_fuv = &parent->
fuv;
620 for (
int i = 0; i < totface; i++, mface++) {
621 if (
ELEM(num, mface->
v1, mface->
v2, mface->
v3, mface->
v4)) {
633 static void rna_ParticleSystem_uv_on_emitter(
ParticleSystem *particlesystem,
655 const int num = rna_ParticleSystem_tessfaceidx_on_emitter(
656 particlesystem, modifier, particle, particle_no, &fuv);
672 static void rna_ParticleSystem_mcol_on_emitter(
ParticleSystem *particlesystem,
689 const int num = rna_ParticleSystem_tessfaceidx_on_emitter(
690 particlesystem, modifier, particle, particle_no, &fuv);
703 r_mcol[0] = (
float)mcol.
b / 255.0f;
704 r_mcol[1] = (
float)mcol.
g / 255.0f;
705 r_mcol[2] = (
float)mcol.
r / 255.0f;
712 if (
ptr->
type == &RNA_ParticleSystem) {
734 rna_Particle_redo(bmain,
scene,
ptr);
753 rna_Particle_reset(bmain,
scene,
ptr);
763 if (psys->
part == part) {
835 if (
ptr->
type == &RNA_ParticleTarget) {
874 if (
ptr->
type == &RNA_ParticleTarget) {
891 if (psys && !psys->clmd) {
893 psys->clmd->sim_parms->goalspring = 0.0f;
896 rna_Particle_redo(bmain,
scene,
ptr);
949 rna_Particle_redo(bmain,
scene,
ptr);
951 static void rna_PartSettings_start_set(
struct PointerRNA *
ptr,
float value)
956 if (value > settings->
end) {
957 settings->
end = value;
961 if (settings->
type==PART_REACTOR && value < 1.0)
969 settings->
sta = value;
972 static void rna_PartSettings_end_set(
struct PointerRNA *
ptr,
float value)
977 if (value < settings->sta) {
978 settings->
sta = value;
981 settings->
end = value;
984 static void rna_PartSetings_timestep_set(
struct PointerRNA *
ptr,
float value)
991 static float rna_PartSettings_timestep_get(
struct PointerRNA *
ptr)
998 static void rna_PartSetting_hairlength_set(
struct PointerRNA *
ptr,
float value)
1001 settings->
normfac = value / 4.0f;
1004 static float rna_PartSetting_hairlength_get(
struct PointerRNA *
ptr)
1007 return settings->
normfac * 4.0f;
1010 static void rna_PartSetting_linelentail_set(
struct PointerRNA *
ptr,
float value)
1016 static float rna_PartSetting_linelentail_get(
struct PointerRNA *
ptr)
1021 static void rna_PartSetting_pathstartend_range(
1035 static void rna_PartSetting_linelenhead_set(
struct PointerRNA *
ptr,
float value)
1041 static float rna_PartSetting_linelenhead_get(
struct PointerRNA *
ptr)
1073 rna_Particle_redo_child(bmain,
scene,
ptr);
1076 static void rna_ParticleSettings_use_roughness_curve_update(
Main *bmain,
1088 rna_Particle_redo_child(bmain,
scene,
ptr);
1101 rna_Particle_redo_child(bmain,
scene,
ptr);
1104 static void rna_ParticleSystem_name_set(
PointerRNA *
ptr,
const char *value)
1114 DATA_(
"ParticleSystem"),
1117 sizeof(part->name));
1125 for (; pt; pt = pt->
next) {
1132 static void rna_ParticleSystem_active_particle_target_index_range(
1140 static int rna_ParticleSystem_active_particle_target_index_get(
PointerRNA *
ptr)
1146 for (; pt; pt = pt->
next, i++) {
1155 static void rna_ParticleSystem_active_particle_target_index_set(
struct PointerRNA *
ptr,
int value)
1161 for (; pt; pt = pt->
next, i++) {
1195 strcpy(
str,
"Invalid target!");
1199 strcpy(
str,
"Invalid target!");
1207 rna_ParticleTarget_name_get(
ptr, tstr);
1209 return strlen(tstr);
1219 static char *rna_SPHFluidSettings_path(
const PointerRNA *
ptr)
1223 if (particle_id_check(
ptr)) {
1233 static bool rna_ParticleSystem_multiple_caches_get(
PointerRNA *
ptr)
1239 static bool rna_ParticleSystem_editable_get(
PointerRNA *
ptr)
1261 for (; dw; dw = dw->next) {
1268 static void rna_ParticleDupliWeight_active_index_range(
1276 static int rna_ParticleDupliWeight_active_index_get(
PointerRNA *
ptr)
1282 for (; dw; dw = dw->next, i++) {
1291 static void rna_ParticleDupliWeight_active_index_set(
struct PointerRNA *
ptr,
int value)
1297 for (; dw; dw = dw->next, i++) {
1318 strcpy(
str,
"No object");
1322 static int rna_ParticleDupliWeight_name_length(
PointerRNA *
ptr)
1326 rna_ParticleDupliWeight_name_get(
ptr, tstr);
1328 return strlen(tstr);
1342 return part_fluid_type_items;
1352 if (part->
type == PART_REACTOR) {
1356 return part_from_items;
1367 return part_hair_dist_items;
1382 return part_hair_draw_as_items;
1397 return part_hair_ren_as_items;
1416 static void psys_vg_name_get__internal(
PointerRNA *
ptr,
char *value,
int index)
1422 if (psys->
vgroup[index] > 0) {
1426 strcpy(value, defGroup->
name);
1433 static int psys_vg_name_len__internal(
PointerRNA *
ptr,
int index)
1438 if (psys->
vgroup[index] > 0) {
1443 return strlen(defGroup->
name);
1448 static void psys_vg_name_set__internal(
PointerRNA *
ptr,
const char *value,
int index)
1453 if (value[0] ==
'\0') {
1459 if (defgrp_index == -1) {
1463 psys->
vgroup[index] = defgrp_index + 1;
1470 char name_esc[
sizeof(psys->
name) * 2];
1473 return BLI_sprintfN(
"particle_systems[\"%s\"]", name_esc);
1491 static void rna_ParticleSettings_active_texture_set(
PointerRNA *
ptr,
1501 static void rna_ParticleVGroup_name_get_0(
PointerRNA *
ptr,
char *value)
1503 psys_vg_name_get__internal(
ptr, value, 0);
1505 static void rna_ParticleVGroup_name_get_1(
PointerRNA *
ptr,
char *value)
1507 psys_vg_name_get__internal(
ptr, value, 1);
1509 static void rna_ParticleVGroup_name_get_2(
PointerRNA *
ptr,
char *value)
1511 psys_vg_name_get__internal(
ptr, value, 2);
1513 static void rna_ParticleVGroup_name_get_3(
PointerRNA *
ptr,
char *value)
1515 psys_vg_name_get__internal(
ptr, value, 3);
1517 static void rna_ParticleVGroup_name_get_4(
PointerRNA *
ptr,
char *value)
1519 psys_vg_name_get__internal(
ptr, value, 4);
1521 static void rna_ParticleVGroup_name_get_5(
PointerRNA *
ptr,
char *value)
1523 psys_vg_name_get__internal(
ptr, value, 5);
1525 static void rna_ParticleVGroup_name_get_6(
PointerRNA *
ptr,
char *value)
1527 psys_vg_name_get__internal(
ptr, value, 6);
1529 static void rna_ParticleVGroup_name_get_7(
PointerRNA *
ptr,
char *value)
1531 psys_vg_name_get__internal(
ptr, value, 7);
1533 static void rna_ParticleVGroup_name_get_8(
PointerRNA *
ptr,
char *value)
1535 psys_vg_name_get__internal(
ptr, value, 8);
1537 static void rna_ParticleVGroup_name_get_9(
PointerRNA *
ptr,
char *value)
1539 psys_vg_name_get__internal(
ptr, value, 9);
1541 static void rna_ParticleVGroup_name_get_10(
PointerRNA *
ptr,
char *value)
1543 psys_vg_name_get__internal(
ptr, value, 10);
1545 static void rna_ParticleVGroup_name_get_11(
PointerRNA *
ptr,
char *value)
1547 psys_vg_name_get__internal(
ptr, value, 11);
1549 static void rna_ParticleVGroup_name_get_12(
PointerRNA *
ptr,
char *value)
1551 psys_vg_name_get__internal(
ptr, value, 12);
1556 return psys_vg_name_len__internal(
ptr, 0);
1560 return psys_vg_name_len__internal(
ptr, 1);
1564 return psys_vg_name_len__internal(
ptr, 2);
1568 return psys_vg_name_len__internal(
ptr, 3);
1572 return psys_vg_name_len__internal(
ptr, 4);
1576 return psys_vg_name_len__internal(
ptr, 5);
1580 return psys_vg_name_len__internal(
ptr, 6);
1584 return psys_vg_name_len__internal(
ptr, 7);
1588 return psys_vg_name_len__internal(
ptr, 8);
1592 return psys_vg_name_len__internal(
ptr, 9);
1596 return psys_vg_name_len__internal(
ptr, 10);
1600 return psys_vg_name_len__internal(
ptr, 11);
1604 return psys_vg_name_len__internal(
ptr, 12);
1607 static void rna_ParticleVGroup_name_set_0(
PointerRNA *
ptr,
const char *value)
1609 psys_vg_name_set__internal(
ptr, value, 0);
1611 static void rna_ParticleVGroup_name_set_1(
PointerRNA *
ptr,
const char *value)
1613 psys_vg_name_set__internal(
ptr, value, 1);
1615 static void rna_ParticleVGroup_name_set_2(
PointerRNA *
ptr,
const char *value)
1617 psys_vg_name_set__internal(
ptr, value, 2);
1619 static void rna_ParticleVGroup_name_set_3(
PointerRNA *
ptr,
const char *value)
1621 psys_vg_name_set__internal(
ptr, value, 3);
1623 static void rna_ParticleVGroup_name_set_4(
PointerRNA *
ptr,
const char *value)
1625 psys_vg_name_set__internal(
ptr, value, 4);
1627 static void rna_ParticleVGroup_name_set_5(
PointerRNA *
ptr,
const char *value)
1629 psys_vg_name_set__internal(
ptr, value, 5);
1631 static void rna_ParticleVGroup_name_set_6(
PointerRNA *
ptr,
const char *value)
1633 psys_vg_name_set__internal(
ptr, value, 6);
1635 static void rna_ParticleVGroup_name_set_7(
PointerRNA *
ptr,
const char *value)
1637 psys_vg_name_set__internal(
ptr, value, 7);
1639 static void rna_ParticleVGroup_name_set_8(
PointerRNA *
ptr,
const char *value)
1641 psys_vg_name_set__internal(
ptr, value, 8);
1643 static void rna_ParticleVGroup_name_set_9(
PointerRNA *
ptr,
const char *value)
1645 psys_vg_name_set__internal(
ptr, value, 9);
1647 static void rna_ParticleVGroup_name_set_10(
PointerRNA *
ptr,
const char *value)
1649 psys_vg_name_set__internal(
ptr, value, 10);
1651 static void rna_ParticleVGroup_name_set_11(
PointerRNA *
ptr,
const char *value)
1653 psys_vg_name_set__internal(
ptr, value, 11);
1655 static void rna_ParticleVGroup_name_set_12(
PointerRNA *
ptr,
const char *value)
1657 psys_vg_name_set__internal(
ptr, value, 12);
1684 prop,
"Location (Object Space)",
"Location of the hair key in object space");
1686 "rna_ParticleHairKey_location_object_get",
1687 "rna_ParticleHairKey_location_object_set",
1694 "Location of the hair key in its local coordinate system, "
1695 "relative to the emitting face");
1698 func =
RNA_def_function(srna,
"co_object",
"rna_ParticleHairKey_co_object");
1702 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
1704 parm =
RNA_def_pointer(func,
"particle",
"Particle",
"",
"hair particle");
1707 func,
"co", 3,
NULL, -FLT_MAX, FLT_MAX,
"Co",
"Exported hairkey location", -1e4, 1e4);
1711 func =
RNA_def_function(srna,
"co_object_set",
"rna_ParticleHairKey_co_object_set");
1716 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
1718 parm =
RNA_def_pointer(func,
"particle",
"Particle",
"",
"hair particle");
1721 func,
"co", 3,
NULL, -FLT_MAX, FLT_MAX,
"Co",
"Specified hairkey location", -1e4, 1e4);
1760 srna,
"Child Particle",
"Child particle interpolated from simulated or edited particles");
1883 func =
RNA_def_function(srna,
"uv_on_emitter",
"rna_Particle_uv_on_emitter");
1885 "Obtain UV coordinates for a particle on an evaluated mesh.");
1889 "ParticleSystemModifier",
1891 "Particle modifier from an evaluated object");
1906 "Particle Instance Object Weight",
1907 "Weight of a particle instance object in a collection");
1912 prop,
"rna_ParticleDupliWeight_name_get",
"rna_ParticleDupliWeight_name_length",
NULL);
1920 prop,
"Count",
"The number of times this object is repeated with respect to other objects");
1934 "An artistic solver with strong surface tension effects (original)"},
1949 prop,
"SPH Solver",
"The code used to calculate internal forces on particles");
1974 prop,
"Viscoelastic Springs",
"Use viscoelastic springs instead of Hooke's springs");
1981 "Initial Rest Length",
1982 "Use the initial length as spring rest length instead of 2 * particle size");
1991 "How much the spring rest length can change after the elastic limit is crossed");
2000 "How much the spring has to be stretched/compressed in order to change its rest length");
2008 "Create springs for this number of frames since particles birth (0 is always)");
2041 "How strongly the fluid tries to keep from clustering (factor of stiffness)");
2059 "Artificial buoyancy force in negative gravity direction based on pressure "
2060 "differences inside the fluid");
2075 "Density is calculated as a factor of default density (depends on particle size)");
2081 prop,
"Factor Radius",
"Interaction radius is a factor of 4 * particle size");
2087 prop,
"Factor Stiff Viscosity",
"Stiff viscosity is a factor of normal viscosity");
2093 prop,
"Factor Rest Length",
"Spring rest length is a factor of 2 * particle size");
2103 {
TEXCO_GLOB,
"GLOBAL", 0,
"Global",
"Use global coordinates for the texture coordinates"},
2108 "Use linked object's coordinates for texture coordinates"},
2109 {
TEXCO_UV,
"UV", 0,
"UV",
"Use UV coordinates for texture coordinates"},
2114 "Use the original undeformed coordinates of the object"},
2118 "Strand / Particle",
2119 "Use normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
2124 {
MTEX_FLAT,
"FLAT", 0,
"Flat",
"Map X and Y coordinates directly"},
2125 {
MTEX_CUBE,
"CUBE", 0,
"Cube",
"Map using the normal vector"},
2126 {
MTEX_TUBE,
"TUBE", 0,
"Tube",
"Map with Z as central axis"},
2127 {
MTEX_SPHERE,
"SPHERE", 0,
"Sphere",
"Map with Z as central axis"},
2132 {0,
"NONE", 0,
"None",
""},
2133 {1,
"X", 0,
"X",
""},
2134 {2,
"Y", 0,
"Y",
""},
2135 {3,
"Z", 0,
"Z",
""},
2140 {0,
"NONE", 0,
"None",
""},
2141 {1,
"X", 0,
"X",
""},
2142 {2,
"Y", 0,
"Y",
""},
2143 {3,
"Z", 0,
"Z",
""},
2148 {0,
"NONE", 0,
"None",
""},
2149 {1,
"X", 0,
"X",
""},
2150 {2,
"Y", 0,
"Y",
""},
2151 {3,
"Z", 0,
"Z",
""},
2155 srna =
RNA_def_struct(brna,
"ParticleSettingsTextureSlot",
"TextureSlot");
2158 "Particle Settings Texture Slot",
2159 "Texture slot for textures in a Particle Settings data-block");
2165 "Texture Coordinates",
2166 "Texture coordinates used to map the texture onto the background");
2175 prop,
"Object",
"Object to use for mapping with Object texture coordinates");
2181 prop,
"UV Map",
"UV map to use for mapping with UV texture coordinates");
2283 prop,
"Emission Time Factor",
"Amount texture affects particle emission time");
2308 prop,
"Velocity Factor",
"Amount texture affects particle initial velocity");
2345 prop,
"Kink Amplitude Factor",
"Amount texture affects child kink amplitude");
2352 prop,
"Kink Frequency Factor",
"Amount texture affects child kink frequency");
2383 {0,
"NONE", 0,
"None",
""},
2397 {0,
"NONE", 0,
"None",
""},
2416 {0,
"NONE", 0,
"None",
""},
2450 {0,
"DUMMY", 0,
"Dummy",
""},
2456 srna,
"Particle Settings",
"Particle settings, reusable by multiple particle systems");
2461 "rna_ParticleSettings_mtex_begin",
2462 "rna_ParticleSettings_active_texture_get",
2463 "rna_ParticleSettings_active_texture_set",
2465 "ParticleSettingsTextureSlot",
2466 "ParticleSettingsTextureSlots",
2467 "rna_Particle_reset_dependency",
2515 "Even Distribution",
2516 "Use even distribution from faces based on face areas or edge lengths");
2523 prop,
"Die on Hit",
"Particles die when they collide with a deflector object");
2542 prop,
"Dynamic",
"Particle rotations are affected by collisions and effectors");
2570 prop,
"Invert Grid",
"Invert what is considered object and what is not");
2619 prop,
"Distribution",
"How to distribute particles on selected element");
2637 "Particle orientation axis (does not affect Explode modifier's results)");
2645 prop,
"Angular Velocity Axis",
"What axis is used to change particle rotation with time");
2716 "Use object's rotation for duplication (global x-axis is aligned "
2717 "particle rotation axis)");
2813 prop,
"Degrees",
"How many degrees path has to curve to make another render segment");
2819 prop,
"Pixel",
"How many pixels path has to cover to make another render segment");
2831 prop,
"Material Index",
"Index of material slot used for rendering particles");
2845 "Algorithm used to calculate physics, from the fastest to the "
2846 "most stable and accurate: Midpoint, Euler, Verlet, RK4");
2899 prop,
"Tweak",
"A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)");
2904 prop,
"rna_PartSettings_timestep_get",
"rna_PartSetings_timestep_set",
NULL);
2908 prop,
"Timestep",
"The simulation timestep per frame (seconds per frame)");
2914 prop,
"Automatic Subframes",
"Automatically set the number of subframes");
2922 "Subframes to simulate for improved stability and finer granularity simulations "
2923 "(dt = timestep / (subframes + 1))");
2930 "Adaptive Subframe Threshold",
2931 "The relative distance a particle can move before requiring more subframes "
2932 "(target Courant number); 0.01 to 0.3 is the recommended range");
2984 prop,
"Effector Number",
"How many particles are effectors (0 is all particles)");
2993 prop,
"Normal",
"Let the surface normal give the particle a starting velocity");
3001 prop,
"Object Velocity",
"Let the object give the particle a starting velocity");
3016 prop,
"Particle",
"Let the target particle give the particle a starting velocity");
3024 prop,
"Tangent",
"Let the surface tangent give the particle a starting velocity");
3039 "Let the vector away from the target particle's location give the particle "
3040 "a starting velocity");
3051 "Let the emitter object orientation give the particle a starting velocity");
3059 prop,
"Angular Velocity",
"Angular velocity amount (in radians per second)");
3078 prop,
"Random Phase",
"Randomize rotation around the chosen orientation axis");
3083 prop,
"rna_PartSetting_hairlength_get",
"rna_PartSetting_hairlength_set",
NULL);
3150 prop,
NULL,
"child_percent");
3161 prop,
"Rendered Children",
"Number of children per parent for rendering");
3180 prop,
"Random Child Size",
"Random variation to the size of the child particles");
3274 prop,
"Extra Steps",
"Extra steps for resolution of special kink features");
3315 prop,
"Threshold",
"Amount of particles left untouched by random roughness");
3353 prop,
"Threshold",
"Amount of particles left untouched by child path length");
3361 prop,
"Parting Factor",
"Create parting in the children based on parent strands");
3369 "Minimum root to tip angle (tip distance/root distance for long hair)");
3377 "Maximum root to tip angle (tip distance/root distance for long hair)");
3390 prop,
"rna_PartSetting_linelentail_get",
"rna_PartSetting_linelentail_set",
NULL);
3398 prop,
"rna_PartSetting_linelenhead_get",
"rna_PartSetting_linelenhead_set",
NULL);
3436 "Use Modifier Stack",
3437 "Emit particles from mesh with modifiers applied "
3438 "(must use same subdivision surface level for viewport and render for correct results)");
3448 prop,
"Instance Collection",
"Show objects in this collection in place of particles");
3455 "Instance Collection Weights",
3456 "Weights for all of the objects in the instance collection");
3465 "rna_ParticleDupliWeight_active_index_get",
3466 "rna_ParticleDupliWeight_active_index_set",
3467 "rna_ParticleDupliWeight_active_index_range");
3537 prop, 0,
"rna_Particle_redo");
3543 prop, 0,
"rna_Particle_redo");
3551 prop, 0,
"rna_Particle_redo");
3559 prop, 0,
"rna_Particle_redo");
3567 prop, 0,
"rna_Particle_redo");
3587 prop,
"rna_ParticleTarget_name_get",
"rna_ParticleTarget_name_length",
NULL);
3599 "The object that has the target particle system (empty if same object)");
3606 prop,
"Target Particle System",
"The index of particle system on the target object");
3660 prop,
"rna_particle_settings_get",
"rna_particle_settings_set",
NULL,
NULL);
3675 prop,
"Child Particles",
"Child particles generated by the particle system");
3679 prop,
"Seed",
"Offset in the random number table, to get a different randomized result");
3686 "Offset in the random number table for child particles, to get a different "
3687 "randomized result");
3713 "Reactor Target Object",
3714 "For reactor systems, the object that has the target particle system "
3715 "(empty if same object)");
3722 "Reactor Target Particle System",
3723 "For reactor systems, index of particle system on the target object");
3740 prop,
"rna_ParticleSystem_active_particle_target_get",
NULL,
NULL,
NULL);
3745 "rna_ParticleSystem_active_particle_target_index_get",
3746 "rna_ParticleSystem_active_particle_target_index_set",
3747 "rna_ParticleSystem_active_particle_target_index_range");
3762 "rna_ParticleVGroup_name_get_0",
3763 "rna_ParticleVGroup_name_len_0",
3764 "rna_ParticleVGroup_name_set_0");
3771 prop,
"Vertex Group Density Negate",
"Negate the effect of the density vertex group");
3776 "rna_ParticleVGroup_name_get_1",
3777 "rna_ParticleVGroup_name_len_1",
3778 "rna_ParticleVGroup_name_set_1");
3785 prop,
"Vertex Group Velocity Negate",
"Negate the effect of the velocity vertex group");
3790 "rna_ParticleVGroup_name_get_2",
3791 "rna_ParticleVGroup_name_len_2",
3792 "rna_ParticleVGroup_name_set_2");
3799 prop,
"Vertex Group Length Negate",
"Negate the effect of the length vertex group");
3804 "rna_ParticleVGroup_name_get_3",
3805 "rna_ParticleVGroup_name_len_3",
3806 "rna_ParticleVGroup_name_set_3");
3813 prop,
"Vertex Group Clump Negate",
"Negate the effect of the clump vertex group");
3818 "rna_ParticleVGroup_name_get_4",
3819 "rna_ParticleVGroup_name_len_4",
3820 "rna_ParticleVGroup_name_set_4");
3827 prop,
"Vertex Group Kink Negate",
"Negate the effect of the kink vertex group");
3832 "rna_ParticleVGroup_name_get_5",
3833 "rna_ParticleVGroup_name_len_5",
3834 "rna_ParticleVGroup_name_set_5");
3836 prop,
"Vertex Group Roughness 1",
"Vertex group to control roughness 1");
3842 "Vertex Group Roughness 1 Negate",
3843 "Negate the effect of the roughness 1 vertex group");
3848 "rna_ParticleVGroup_name_get_6",
3849 "rna_ParticleVGroup_name_len_6",
3850 "rna_ParticleVGroup_name_set_6");
3852 prop,
"Vertex Group Roughness 2",
"Vertex group to control roughness 2");
3858 "Vertex Group Roughness 2 Negate",
3859 "Negate the effect of the roughness 2 vertex group");
3864 "rna_ParticleVGroup_name_get_7",
3865 "rna_ParticleVGroup_name_len_7",
3866 "rna_ParticleVGroup_name_set_7");
3868 prop,
"Vertex Group Roughness End",
"Vertex group to control roughness end");
3874 "Vertex Group Roughness End Negate",
3875 "Negate the effect of the roughness end vertex group");
3880 "rna_ParticleVGroup_name_get_8",
3881 "rna_ParticleVGroup_name_len_8",
3882 "rna_ParticleVGroup_name_set_8");
3889 prop,
"Vertex Group Size Negate",
"Negate the effect of the size vertex group");
3894 "rna_ParticleVGroup_name_get_9",
3895 "rna_ParticleVGroup_name_len_9",
3896 "rna_ParticleVGroup_name_set_9");
3903 prop,
"Vertex Group Tangent Negate",
"Negate the effect of the tangent vertex group");
3908 "rna_ParticleVGroup_name_get_10",
3909 "rna_ParticleVGroup_name_len_10",
3910 "rna_ParticleVGroup_name_set_10");
3917 prop,
"Vertex Group Rotation Negate",
"Negate the effect of the rotation vertex group");
3922 "rna_ParticleVGroup_name_get_11",
3923 "rna_ParticleVGroup_name_len_11",
3924 "rna_ParticleVGroup_name_set_11");
3931 prop,
"Vertex Group Field Negate",
"Negate the effect of the field vertex group");
3936 "rna_ParticleVGroup_name_get_12",
3937 "rna_ParticleVGroup_name_len_12",
3938 "rna_ParticleVGroup_name_set_12");
3945 prop,
"Vertex Group Twist Negate",
"Negate the effect of the twist vertex group");
3966 prop,
"Parent",
"Use this object's coordinate system instead of global coordinate system");
3986 prop,
"Timestep",
"The current simulation time step size, as a fraction of a frame");
3998 RNA_def_int(func,
"particle_no", 0, INT_MIN, INT_MAX,
"Particle no",
"", INT_MIN, INT_MAX);
3999 RNA_def_int(func,
"step", 0, INT_MIN, INT_MAX,
"step no",
"", INT_MIN, INT_MAX);
4001 func,
"co", 3,
NULL, -FLT_MAX, FLT_MAX,
"Co",
"Exported hairkey location", -1e4, 1e4);
4006 func =
RNA_def_function(srna,
"uv_on_emitter",
"rna_ParticleSystem_uv_on_emitter");
4009 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
4013 RNA_def_int(func,
"particle_no", 0, INT_MIN, INT_MAX,
"Particle no",
"", INT_MIN, INT_MAX);
4014 RNA_def_int(func,
"uv_no", 0, INT_MIN, INT_MAX,
"UV no",
"", INT_MIN, INT_MAX);
4021 func =
RNA_def_function(srna,
"mcol_on_emitter",
"rna_ParticleSystem_mcol_on_emitter");
4024 parm =
RNA_def_pointer(func,
"modifier",
"ParticleSystemModifier",
"",
"Particle modifier");
4028 RNA_def_int(func,
"particle_no", 0, INT_MIN, INT_MAX,
"Particle no",
"", INT_MIN, INT_MAX);
4029 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)
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_get_original(const struct Object *object, struct ModifierData *md)
struct 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_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, eReportType 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
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL()
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL(1
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_len)
#define ARRAY_HAS_ITEM(arr_item, arr_start, arr_len)
#define BLT_I18NCONTEXT_ID_PARTICLESETTINGS
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
@ PART_FLUID_SPRAYFOAMBUBBLE
#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
#define PART_REACT_STA_END
@ 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_translation_context(PropertyRNA *prop, const char *context)
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 ModifierData * 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 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)