Blender Git Loki
Git Commits -> Revision 7cd6f66
Revision 7cd6f66 by Jeroen Bakker (master) January 5, 2021, 12:53 (GMT) |
Fix T84053: Mask overlay in image editor not working The mask overlay wasn't part of the overlay engine. The reasoning nehind this was that more editors used the mask overlay and most of them used old drawing code. This patch adds the mask overlay drawing to the draw overlay engine. This code path will only be used by the image editor VSE, Compositor and Movie Clip editor will still use the previous method. During this patch some alternatives have been researched: 1. `ED_mask_draw_region`: this would lead to different code paths when drawing in the image editor, and some hacks to retrieve the correct framebuffer. 2. Add mask drawing to image engine: Would lead to incorrect color management when viewing the mask. 3. Add mask drawing to image engine and overlay engine: Would lead to duplicated code. 4. Add mask drawing to overlay engine and for combined overlay select the correct framebuffer. Option 4 was chosen as the exception (switching framebuffers) can be done without hacks. The code stays clean. |
Commit Details:
Full Hash: 7cd6f667e33e60f3d53e465023bb75f90f499b07
Parent Commit: f41de6d
Lines Changed: +143, -23
2 Added Paths:
/source/blender/draw/engines/overlay/shaders/edit_uv_image_mask_frag.glsl (+14, -0) (View)
/source/blender/draw/engines/overlay/shaders/edit_uv_image_vert.glsl (+14, -0) (View)
/source/blender/draw/engines/overlay/shaders/edit_uv_image_vert.glsl (+14, -0) (View)
1 Deleted Path:
/source/blender/draw/engines/overlay/shaders/edit_uv_stencil_image_vert.glsl (+0, -14)
6 Modified Paths:
/source/blender/draw/CMakeLists.txt (+2, -1) (Diff)
/source/blender/draw/engines/overlay/overlay_edit_uv.c (+77, -2) (Diff)
/source/blender/draw/engines/overlay/overlay_private.h (+15, -3) (Diff)
/source/blender/draw/engines/overlay/overlay_shader.c (+18, -2) (Diff)
/source/blender/draw/tests/shaders_test.cc (+1, -0) (Diff)
/source/blender/editors/space_image/space_image.c (+2, -1) (Diff)
/source/blender/draw/engines/overlay/overlay_edit_uv.c (+77, -2) (Diff)
/source/blender/draw/engines/overlay/overlay_private.h (+15, -3) (Diff)
/source/blender/draw/engines/overlay/overlay_shader.c (+18, -2) (Diff)
/source/blender/draw/tests/shaders_test.cc (+1, -0) (Diff)
/source/blender/editors/space_image/space_image.c (+2, -1) (Diff)