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.
This commit is contained in:
Sergey Sharybin 2022-10-13 12:24:47 +02:00 committed by Philipp Oeser
parent 47868c8a4f
commit c3a5a0becf
Notes: blender-bot 2023-02-14 06:49:57 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
Referenced by issue #101501, Drawing Masks in Image Editor gone?
2 changed files with 5 additions and 0 deletions

View File

@ -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
)

View File

@ -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");