diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-01-22 23:38:27 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-01-22 23:38:27 +0300 |
commit | f4598728c409cdbee77f842f581b435bc527959c (patch) | |
tree | 3d948512e6142802ddbf36c80653b6228b39f2a4 /source | |
parent | 29bee35112bcbcdbd40b37f6ddf33a785967602c (diff) |
"Fix" for [#25766] Fluid Particle Bugs
* Argh, particles tab was showing the whole "non applicable settings for fluid particles"-galore as the particle type "fluid" can't be checked from rna using the settings type value. Now the ui is a lot cleaner and only settings that actually effect the fluid particles are shown.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index aa5f69e7164..1fabdb8d21c 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -423,6 +423,14 @@ static float rna_PartSetting_linelenhead_get(struct PointerRNA *ptr) return settings->draw_line[1]; } + +static int rna_PartSettings_is_fluid_get(PointerRNA *ptr) +{ + ParticleSettings *part= (ParticleSettings*)ptr->data; + + return part->type == PART_FLUID; +} + static PointerRNA rna_ParticleSystem_active_particle_target_get(PointerRNA *ptr) { ParticleSystem *psys= (ParticleSystem*)ptr->data; @@ -1199,6 +1207,12 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Particle Settings", "Particle settings, reusable by multiple particle systems"); RNA_def_struct_ui_icon(srna, ICON_PARTICLE_DATA); + /* 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); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + 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"); + /* flag */ 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); |