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_scene.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_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 19 |
1 files changed, 17 insertions, 2 deletions
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); |