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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-20 19:07:58 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-20 20:15:41 +0300
commit1a0181bb6d94252fb4e4873eca8cdedc69c348be (patch)
tree6f9de01cd421092cf883bc29255bf05ce2ac51fc /source/blender/makesrna/intern/rna_nodetree.c
parentdecc323b4e843c711554ebae632385d52caca113 (diff)
UI: add support for defining any icon as a mono icon.
Previously it was hardcoded to one row. These icons are colored with the text color. Changes include some refactoring.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 3cc8bac13e2..6d72d337a07 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -113,16 +113,6 @@ static const EnumPropertyItem node_chunksize_items[] = {
};
#endif
-#define DEF_ICON_BLANK_SKIP
-#define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""},
-#define DEF_VICO(name)
-const EnumPropertyItem rna_enum_node_icon_items[] = {
-#include "UI_icons.h"
- {0, NULL, 0, NULL, NULL}};
-#undef DEF_ICON_BLANK_SKIP
-#undef DEF_ICON
-#undef DEF_VICO
-
const EnumPropertyItem rna_enum_node_math_items[] = {
{NODE_MATH_ADD, "ADD", 0, "Add", ""},
{NODE_MATH_SUB, "SUBTRACT", 0, "Subtract", ""},
@@ -8021,7 +8011,7 @@ static void rna_def_node(BlenderRNA *brna)
prop = RNA_def_property(srna, "bl_icon", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typeinfo->ui_icon");
- RNA_def_property_enum_items(prop, rna_enum_node_icon_items);
+ RNA_def_property_enum_items(prop, rna_enum_icon_items);
RNA_def_property_enum_default(prop, ICON_NODE);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
RNA_def_property_ui_text(prop, "Icon", "The node icon");
@@ -8409,7 +8399,7 @@ static void rna_def_nodetree(BlenderRNA *brna)
prop = RNA_def_property(srna, "bl_icon", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typeinfo->ui_icon");
- RNA_def_property_enum_items(prop, rna_enum_node_icon_items);
+ RNA_def_property_enum_items(prop, rna_enum_icon_items);
RNA_def_property_enum_default(prop, ICON_NODETREE);
RNA_def_property_flag(prop, PROP_REGISTER);
RNA_def_property_ui_text(prop, "Icon", "The node tree icon");