Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 0e5780012dd..2a4bc6bae06 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1397,6 +1397,16 @@ static char *rna_View3DOverlay_path(PointerRNA *UNUSED(ptr))
/* Space Image Editor */
+static PointerRNA rna_SpaceImage_overlay_get(PointerRNA *ptr)
+{
+ return rna_pointer_inherit_refine(ptr, &RNA_SpaceImageOverlay, ptr->data);
+}
+
+static char *rna_SpaceImageOverlay_path(PointerRNA *UNUSED(ptr))
+{
+ return BLI_strdup("overlay");
+}
+
static char *rna_SpaceUVEditor_path(PointerRNA *UNUSED(ptr))
{
return BLI_strdup("uv_editor");
@@ -4512,6 +4522,23 @@ static void rna_def_space_properties(BlenderRNA *brna)
prop, NC_SPACE | ND_SPACE_PROPERTIES, "rna_SpaceProperties_search_filter_update");
}
+static void rna_def_space_image_overlay(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "SpaceImageOverlay", NULL);
+ RNA_def_struct_sdna(srna, "SpaceImage");
+ RNA_def_struct_nested(brna, srna, "SpaceImageEditor");
+ RNA_def_struct_path_func(srna, "rna_SpaceImageOverlay_path");
+ RNA_def_struct_ui_text(
+ srna, "Overlay Settings", "Settings for display of overlays in the UV/Image editor");
+
+ prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", SI_OVERLAY_SHOW_OVERLAYS);
+ RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like UV Maps and Metadata");
+}
+
static void rna_def_space_image(BlenderRNA *brna)
{
StructRNA *srna;
@@ -4675,7 +4702,16 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Show Mask Editor", "Show Mask editing related properties");
+ /* Overlays */
+ prop = RNA_def_property(srna, "overlay", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "SpaceImageOverlay");
+ RNA_def_property_pointer_funcs(prop, "rna_SpaceImage_overlay_get", NULL, NULL, NULL);
+ RNA_def_property_ui_text(
+ prop, "Overlay Settings", "Settings for display of overlays in the UV/Image editor");
+
rna_def_space_image_uv(brna);
+ rna_def_space_image_overlay(brna);
/* mask */
rna_def_space_mask_info(srna, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mask_set");