diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2021-05-18 02:03:01 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2021-06-03 21:17:17 +0300 |
commit | dba3fb9e091acfa7d2144468a220b2b0d577c15d (patch) | |
tree | 817e5c84a1f7319b7ef7811226dabcae615b63ea /source/blender/makesrna/intern/rna_space.c | |
parent | 3e695a27cdfad560d0b28e742cfa069d098200d6 (diff) |
Overlay: Flash on Mode Transfer overlay
This implements T87633
This overlay renders a flash animation on the target object when
transfering the mode to it using the mode transfer operator.
This provides visual feedback when switching between objects without
extra overlays that affect the general color and lighting in the scene.
Differences with the design task:
- This uses just a fade out animation instead of a fade in/out animation.
The code is ready for fade in/out, but as the rest of the overlays
(face sets, masks...) change instantly without animation, having a fade
in/out effect gives the impression that the object flashes twice (once
for the face sets, twice for the peak alpha of the flash animation).
- The rendering uses a flat color without fresnel for now, but this can
be improved in the future to make it look more like the shader in the
prototype.
- Not enabled by default (can be enabled in the overlays panel), maybe
the defaults can change for 3.0 to disable fade inactive and enable this
instead.
Reviewed By: jbakker, JulienKaspar
Differential Revision: https://developer.blender.org/D11055
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 0af2572a4bd..bb356e4b532 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -4129,6 +4129,14 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) prop, "Fade Inactive Objects", "Fade inactive geometry using the viewport background color"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_mode_transfer", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_MODE_TRANSFER); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_ui_text(prop, + "Flash on Mode Transfer", + "Flash the target object when tranfering the active mode to it"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "fade_inactive_alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "overlay.fade_alpha"); RNA_def_property_ui_text(prop, "Opacity", "Strength of the fade effect"); |