[Bf-blender-cvs] [cbe1c1474b1] master: Fix T101501: Masks are not visible in Image Editor
Sergey Sharybin
noreply at git.blender.org
Thu Oct 13 12:26:39 CEST 2022
Commit: cbe1c1474b1618c2134303d6ce9a9a1139974f4d
Author: Sergey Sharybin
Date: Thu Oct 13 12:24:47 2022 +0200
Branches: master
https://developer.blender.org/rBcbe1c1474b1618c2134303d6ce9a9a1139974f4d
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/space_image.c
===================================================================
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 71cbcea1c1f..53e1bc0a1e5 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"
@@ -117,6 +118,8 @@ static SpaceLink *image_create(const ScrArea *UNUSED(area), const Scene *UNUSED(
simage->custom_grid_subdiv[0] = 10;
simage->custom_grid_subdiv[1] = 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