Fix T58902: error getting tools for Image Editor (modes Paint and Mask)
authorPhilipp Oeser <info@graphics-engineer.com>
Fri, 7 Dec 2018 10:24:09 +0000 (11:24 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Fri, 7 Dec 2018 13:17:17 +0000 (14:17 +0100)
Maniphest Tasks: T58902

Differential Revision: https://developer.blender.org/D4044

source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_workspace.c

index bf6e1d2..6504cf8 100644 (file)
@@ -61,6 +61,7 @@ extern const EnumPropertyItem rna_enum_mesh_delimit_mode_items[];
 extern const EnumPropertyItem rna_enum_space_graph_mode_items[];
 extern const EnumPropertyItem rna_enum_space_type_items[];
 extern const EnumPropertyItem rna_enum_space_image_mode_items[];
+extern const EnumPropertyItem rna_enum_space_image_mode_all_items[];
 extern const EnumPropertyItem rna_enum_space_action_mode_items[];
 extern const EnumPropertyItem rna_enum_region_type_items[];
 extern const EnumPropertyItem rna_enum_object_modifier_type_items[];
index 9bfd1d3..8a792e4 100644 (file)
@@ -177,7 +177,7 @@ const EnumPropertyItem rna_enum_space_action_mode_items[] = {
 #define SI_ITEM_MASK \
        {SI_MODE_MASK, "MASK", ICON_MOD_MASK, "Mask", "Mask editing"}
 
-static const EnumPropertyItem rna_enum_space_image_mode_all_items[] = {
+const EnumPropertyItem rna_enum_space_image_mode_all_items[] = {
        SI_ITEM_VIEW("View", ICON_FILE_IMAGE),
        SI_ITEM_UV,
        SI_ITEM_PAINT,
index a79dc05..f0c00bd 100644 (file)
@@ -301,7 +301,7 @@ static void rna_def_workspace_tools(BlenderRNA *brna, PropertyRNA *cprop)
 
        func = RNA_def_function(srna, "from_space_image_mode", "rna_WorkSpace_tools_from_space_image_mode");
        RNA_def_function_ui_description(func, "");
-       parm = RNA_def_enum(func, "mode", rna_enum_space_image_mode_items, 0, "", "");
+       parm = RNA_def_enum(func, "mode", rna_enum_space_image_mode_all_items, 0, "", "");
        RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
        RNA_def_boolean(func, "create", false, "Create", "");
        /* return type */