diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-01-31 21:26:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-01-31 21:26:20 +0300 |
commit | f9d09a120910a21d383933c15fd72546772b5e81 (patch) | |
tree | aba43105de416afdf376bbf563002f9fd360188f /source/blender/makesrna | |
parent | 4633bb9939cd11a2429aeb2c0e5e3ede311a3126 (diff) | |
parent | 57801426792c3ca9c126c3c720ca6f337815294c (diff) |
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_fluid.c | 16 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 48 |
2 files changed, 48 insertions, 16 deletions
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index 3c29f8ec8c0..01f240e715b 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -246,7 +246,7 @@ static void rna_Fluid_tracer_parts_update(Main *bmain, Scene *UNUSED(scene), Poi rna_Fluid_parts_create(bmain, ptr, "TracerParticleSettings", - "Tracer Particles", + "Tracers", "Tracer Particle System", PART_FLUID_TRACER); mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_TRACER; @@ -290,7 +290,7 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR rna_Fluid_parts_create(bmain, ptr, "SprayFoamParticleSettings", - "Spray + Foam Particles", + "Spray + Foam", "Spray + Foam Particle System", PART_FLUID_SPRAYFOAM); @@ -316,7 +316,7 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR rna_Fluid_parts_create(bmain, ptr, "SprayBubbleParticleSettings", - "Spray + Bubble Particles", + "Spray + Bubbles", "Spray + Bubble Particle System", PART_FLUID_SPRAYBUBBLE); @@ -369,7 +369,7 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR rna_Fluid_parts_create(bmain, ptr, "SprayFoamBubbleParticleSettings", - "Spray + Foam + Bubble Particles", + "Spray + Foam + Bubbles", "Spray + Foam + Bubble Particle System", PART_FLUID_SPRAYFOAMBUBBLE); @@ -1522,10 +1522,10 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "particle_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 10.0); - RNA_def_property_ui_text( - prop, - "Radius", - "Particle radius factor. Adjust this parameter when the simulation appears to leak volume"); + RNA_def_property_ui_text(prop, + "Radius", + "Particle radius factor. Increase this value if the simulation appears " + "to leak volume, decrease it if the simulation seems to gain volume"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache"); prop = RNA_def_property(srna, "particle_band_width", PROP_FLOAT, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index d914dc3b8dd..4155c453440 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -120,6 +120,29 @@ static const EnumPropertyItem part_hair_ren_as_items[] = { }; #endif +static const EnumPropertyItem part_type_items[] = { + {PART_EMITTER, "EMITTER", 0, "Emitter", ""}, + /*{PART_REACTOR, "REACTOR", 0, "Reactor", ""}, */ + {PART_HAIR, "HAIR", 0, "Hair", ""}, + {0, NULL, 0, NULL, NULL}, +}; + +#ifdef RNA_RUNTIME +static const EnumPropertyItem part_fluid_type_items[] = { + {PART_FLUID, "FLUID", 0, "Fluid", ""}, + {PART_FLUID_FLIP, "FLIP", 0, "Liquid", ""}, + {PART_FLUID_SPRAY, "SPRAY", 0, "Spray", ""}, + {PART_FLUID_BUBBLE, "BUBBLE", 0, "Bubble", ""}, + {PART_FLUID_FOAM, "FOAM", 0, "Foam", ""}, + {PART_FLUID_TRACER, "TRACER", 0, "Tracer", ""}, + {PART_FLUID_SPRAYFOAM, "SPRAYFOAM", 0, "Spray-Foam", ""}, + {PART_FLUID_SPRAYBUBBLE, "SPRAYBUBBLE", 0, "Spray-Bubble", ""}, + {PART_FLUID_FOAMBUBBLE, "FOAMBUBBLE", 0, "Foam-Bubble", ""}, + {PART_FLUID_SPRAYFOAMBUBBLE, "SPRAYFOAMBUBBLE", 0, "Spray-Foam-Bubble", ""}, + {0, NULL, 0, NULL, NULL}, +}; +#endif + #ifdef RNA_RUNTIME # include "BLI_math.h" @@ -1239,6 +1262,21 @@ static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr) return strlen(tstr); } +static const EnumPropertyItem *rna_Particle_type_itemf(bContext *UNUSED(C), + PointerRNA *ptr, + PropertyRNA *UNUSED(prop), + bool *UNUSED(r_free)) +{ + ParticleSettings *part = (ParticleSettings *)ptr->owner_id; + + if (part->type == PART_HAIR || part->type == PART_EMITTER) { + return part_type_items; + } + else { + return part_fluid_type_items; + } +} + static const EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), @@ -2260,13 +2298,6 @@ static void rna_def_particle_settings(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static const EnumPropertyItem type_items[] = { - {PART_EMITTER, "EMITTER", 0, "Emitter", ""}, - /*{PART_REACTOR, "REACTOR", 0, "Reactor", ""}, */ - {PART_HAIR, "HAIR", 0, "Hair", ""}, - {0, NULL, 0, NULL, NULL}, - }; - static const EnumPropertyItem phys_type_items[] = { {PART_PHYS_NO, "NO", 0, "None", ""}, {PART_PHYS_NEWTON, "NEWTON", 0, "Newtonian", ""}, @@ -2493,8 +2524,9 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Particle_reset"); prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, type_items); + RNA_def_property_enum_items(prop, part_type_items); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_type_itemf"); RNA_def_property_ui_text(prop, "Type", "Particle Type"); RNA_def_property_update(prop, 0, "rna_Particle_change_type"); |