Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_particle.c
| Show First 20 Lines • Show All 899 Lines • ▼ Show 20 Lines | |||||
| static bool rna_PartSettings_is_fluid_get(PointerRNA *ptr) | static bool rna_PartSettings_is_fluid_get(PointerRNA *ptr) | ||||
| { | { | ||||
| ParticleSettings *part = (ParticleSettings *)ptr->data; | ParticleSettings *part = (ParticleSettings *)ptr->data; | ||||
| return part->type == PART_FLUID; | return part->type == PART_FLUID; | ||||
| } | } | ||||
| static int rna_PartSettings_is_manta_get(PointerRNA *ptr) | |||||
| { | |||||
| ParticleSettings *part = (ParticleSettings *)ptr->data; | |||||
| return (part->type & (PART_MANTA_FLIP | PART_MANTA_SPRAY | PART_MANTA_BUBBLE | PART_MANTA_FOAM | PART_MANTA_TRACER)); | |||||
| } | |||||
| static void rna_ParticleSettings_use_clump_curve_update(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_ParticleSettings_use_clump_curve_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| ParticleSettings *part = ptr->data; | ParticleSettings *part = ptr->data; | ||||
| if (part->child_flag & PART_CHILD_USE_CLUMP_CURVE) { | if (part->child_flag & PART_CHILD_USE_CLUMP_CURVE) { | ||||
| if (!part->clumpcurve) { | if (!part->clumpcurve) { | ||||
| BKE_particlesettings_clump_curve_init(part); | BKE_particlesettings_clump_curve_init(part); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,168 Lines • ▼ Show 20 Lines | rna_def_mtex_common(brna, srna, "rna_ParticleSettings_mtex_begin", "rna_ParticleSettings_active_texture_get", | ||||
| "ParticleSettingsTextureSlots", "rna_Particle_reset", NULL); | "ParticleSettingsTextureSlots", "rna_Particle_reset", NULL); | ||||
| /* fluid particle type can't be checked from the type value in rna as it's not shown in the menu */ | /* fluid particle type can't be checked from the type value in rna as it's not shown in the menu */ | ||||
| prop = RNA_def_property(srna, "is_fluid", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_fluid", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_PartSettings_is_fluid_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_PartSettings_is_fluid_get", NULL); | ||||
| RNA_def_property_ui_text(prop, "Fluid", "Particles were created by a fluid simulation"); | RNA_def_property_ui_text(prop, "Fluid", "Particles were created by a fluid simulation"); | ||||
| prop = RNA_def_property(srna, "is_manta", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| RNA_def_property_boolean_funcs(prop, "rna_PartSettings_is_manta_get", NULL); | |||||
| RNA_def_property_ui_text(prop, "Fluid", "Particles were created by a fluid simulation"); | |||||
| /* flag */ | /* flag */ | ||||
| prop = RNA_def_property(srna, "use_react_start_end", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_react_start_end", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_STA_END); | RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_STA_END); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_ui_text(prop, "Start/End", "Give birth to unreacted particles eventually"); | RNA_def_property_ui_text(prop, "Start/End", "Give birth to unreacted particles eventually"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "use_react_multiple", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_react_multiple", PROP_BOOLEAN, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 1,444 Lines • Show Last 20 Lines | |||||