diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-10-13 17:55:19 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-10-13 19:09:07 +0300 |
commit | b7afcdff7b068f668a3bfb032cf659693c8879f0 (patch) | |
tree | 97772bd3dc38764178699e529d077d22af3b690f /source/blender/makesrna/intern/rna_scene.c | |
parent | ed96c59c20fb5f69edc9671b4efbcd4bf7f61ffb (diff) |
EEVEE: Motion Blur: Add shutter position option
This makes it easier to generate motion trail effect with EEVEE.
This just mimics the cycles option as described here:
https://docs.blender.org/manual/en/latest/render/cycles/render_settings/motion_blur.html
This fix T80070
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index b909885b006..24cff501b59 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -6851,6 +6851,17 @@ static void rna_def_scene_eevee(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; + static const EnumPropertyItem eevee_motion_blur_position_items[] = { + {SCE_EEVEE_MB_START, "START", 0, "Start on Frame", "The shutter opens at the current frame"}, + {SCE_EEVEE_MB_CENTER, + "CENTER", + 0, + "Center on Frame", + "The shutter is open during the current frame"}, + {SCE_EEVEE_MB_END, "END", 0, "End on Frame", "The shutter closes at the current frame"}, + {0, NULL, 0, NULL, NULL}, + }; + srna = RNA_def_struct(brna, "SceneEEVEE", NULL); RNA_def_struct_path_func(srna, "rna_SceneEEVEE_path"); RNA_def_struct_ui_text(srna, "Scene Display", "Scene display settings for 3d viewport"); @@ -7240,6 +7251,15 @@ static void rna_def_scene_eevee(BlenderRNA *brna) RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + prop = RNA_def_property(srna, "motion_blur_position", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, eevee_motion_blur_position_items); + RNA_def_property_ui_text(prop, + "Motion Blur Position", + "Offset for the shutter's time interval, " + "allows to change the motion blur trails"); + RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + /* Shadows */ prop = RNA_def_property(srna, "shadow_cube_size", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, eevee_shadow_size_items); |