[Bf-blender-cvs] [c3a5a0becf7] blender-v3.3-release: Fix T101501: Masks are not visible in Image Editor

Sergey Sharybin noreply at git.blender.org
Fri Jan 13 10:54:12 CET 2023


Commit: c3a5a0becf7cbc68e9b0b94f669509c98ba2d98e
Author: Sergey Sharybin
Date:   Thu Oct 13 12:24:47 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rBc3a5a0becf7cbc68e9b0b94f669509c98ba2d98e

Fix T101501: Masks are not visible in Image Editor

Need to initialize the mask drawing overlays when the new space
is created. Otherwise the new space is configured in a way that
the splines are not visible and overlay opacity is 0.

This change fixes the new masking files created. The currently
saved ones need a manual tweak.

===================================================================

M	source/blender/editors/space_image/CMakeLists.txt
M	source/blender/editors/space_image/space_image.c

===================================================================

diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt
index c6a1a6a77b4..b12aaa64b3a 100644
--- a/source/blender/editors/space_image/CMakeLists.txt
+++ b/source/blender/editors/space_image/CMakeLists.txt
@@ -18,6 +18,8 @@ set(INC
   ../../../../intern/clog
   ../../../../intern/glew-mx
   ../../../../intern/guardedalloc
+  # dna_type_offsets.h
+  ${CMAKE_CURRENT_BINARY_DIR}/../../makesdna/intern
   # RNA_prototypes.h
   ${CMAKE_BINARY_DIR}/source/blender/makesrna
 )
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 785a5419e04..54295085251 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -5,6 +5,7 @@
  * \ingroup spimage
  */
 
+#include "DNA_defaults.h"
 #include "DNA_gpencil_types.h"
 #include "DNA_image_types.h"
 #include "DNA_mask_types.h"
@@ -113,6 +114,8 @@ static SpaceLink *image_create(const ScrArea *UNUSED(area), const Scene *UNUSED(
 
   simage->custom_grid_subdiv = 10;
 
+  simage->mask_info = *DNA_struct_default_get(MaskSpaceInfo);
+
   /* header */
   region = MEM_callocN(sizeof(ARegion), "header for image");



More information about the Bf-blender-cvs mailing list