diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 32 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 19 |
2 files changed, 49 insertions, 2 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) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d60c9b2d99b..1530c7fc483 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -4817,7 +4817,11 @@ static void rna_def_scene_render_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - + static const EnumPropertyItem hair_shape_type_items[] = { + {SCE_HAIR_SHAPE_STRAND, "STRAND", 0, "Strand", ""}, + {SCE_HAIR_SHAPE_STRIP, "STRIP", 0, "Strip", ""}, + {0, NULL, 0, NULL, NULL} + }; rna_def_scene_ffmpeg_settings(brna); @@ -5016,7 +5020,18 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "mblur_shutter_curve"); RNA_def_property_struct_type(prop, "CurveMapping"); RNA_def_property_ui_text(prop, "Shutter Curve", "Curve defining the shutter's openness over time"); - + + /* Hairs */ + prop = RNA_def_property(srna, "hair_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, hair_shape_type_items); + RNA_def_property_ui_text(prop, "Hair Shape Type", "Hair shape type"); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); + + prop = RNA_def_property(srna, "hair_subdiv", PROP_INT, PROP_NONE); + RNA_def_property_range(prop, 0, 3); + RNA_def_property_ui_text(prop, "Additional Subdiv", "Additional subdivision along the hair"); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); + /* border */ prop = RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER); |