diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-05-29 12:20:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-05-30 13:25:20 +0300 |
commit | e0e3038b1e7aec26da7161defa5a34b5d9373b5c (patch) | |
tree | 39fc5c0137fc7ee6bef28eb84ef0d85964ba99a2 /source/blender/makesrna/intern/rna_particle.c | |
parent | ec6da3d72e61240bfec1c09f1ef75e41873bf6a0 (diff) |
Hair Particles: DNA: Add properties for new GPU hairs.
Hair Particles shape properties are ported from cycles. Thoses properties
have the same defaults and have a do_version of their own. Cycles will use
theses properties instead of its custom ones.
Some realtime engine specific settings are also added to scene->r because
it's much easier to control as global values.
Bumping Version number so cycles can do its own do_version on top of the
default settings.
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 17e9a6604fd..52c97130ada 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -3147,6 +3147,38 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Twist Curve", "Curve defining twist"); RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + + /* hair shape */ + prop = RNA_def_property(srna, "use_close_tip", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "shape_flag", PART_SHAPE_CLOSE_TIP); + RNA_def_property_ui_text(prop, "Close Tip", "Set tip radius to zero"); + RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ + + prop = RNA_def_property(srna, "shape", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_range(prop, -1.0f, 1.0f); + RNA_def_property_ui_text(prop, "Shape", "Strand shape parameter"); + RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ + + prop = RNA_def_property(srna, "root_radius", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rad_root"); + RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); + RNA_def_property_ui_text(prop, "Root", "Strand width at the root"); + RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ + + prop = RNA_def_property(srna, "tip_radius", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rad_tip"); + RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); + RNA_def_property_ui_text(prop, "Tip", "Strand width at the tip"); + RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ + + prop = RNA_def_property(srna, "radius_scale", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "rad_scale"); + RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); + RNA_def_property_ui_text(prop, "Scaling", "Multiplier of radius properties."); + RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ } static void rna_def_particle_target(BlenderRNA *brna) |