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:
authorHans Goudey <h.goudey@me.com>2021-02-24 23:53:37 +0300
committerHans Goudey <h.goudey@me.com>2021-02-24 23:53:37 +0300
commit01e13e2c95132c92d37c832cbe9e814fae2007a2 (patch)
tree9b3f89e61149c1a565b319995811cae5ca925571
parenta50f6bc40b65b72381546d4ca0f3b617798577cf (diff)
Cleanup: Remove unused node editor button event defines
These defines seem to be left over from the initial implementation of the node editor. In a few places the values were used in button creation, but the callbacks never checked the value anyway. Node uiBlocks also had a callback what would never do anything since the value it checked for was never used.
-rw-r--r--source/blender/editors/space_node/node_draw.cc19
-rw-r--r--source/blender/editors/space_node/node_intern.h20
2 files changed, 4 insertions, 35 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 83c7dd8eea5..162f3878f7e 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -302,16 +302,6 @@ void ED_node_sort(bNodeTree *ntree)
}
}
-static void do_node_internal_buttons(bContext *C, void *UNUSED(node_v), int event)
-{
- if (event == B_NODE_EXEC) {
- SpaceNode *snode = CTX_wm_space_node(C);
- if (snode && snode->id) {
- ED_node_tag_update_id(snode->id);
- }
- }
-}
-
static void node_uiblocks_init(const bContext *C, bNodeTree *ntree)
{
/* Add node uiBlocks in drawing order - prevents events going to overlapping nodes. */
@@ -321,7 +311,6 @@ static void node_uiblocks_init(const bContext *C, bNodeTree *ntree)
char uiblockstr[32];
BLI_snprintf(uiblockstr, sizeof(uiblockstr), "node buttons %p", (void *)node);
node->block = UI_block_begin(C, CTX_wm_region(C), uiblockstr, UI_EMBOSS);
- UI_block_func_handle_set(node->block, do_node_internal_buttons, node);
/* this cancels events for background nodes */
UI_block_flag_enable(node->block, UI_BLOCK_CLIP_EVENTS);
@@ -1354,7 +1343,7 @@ static void node_draw_basis(const bContext *C,
UI_block_emboss_set(node->block, UI_EMBOSS_NONE);
uiBut *but = uiDefIconBut(node->block,
UI_BTYPE_BUT_TOGGLE,
- B_REDR,
+ 0,
ICON_MATERIAL,
iconofs,
rct->ymax - NODE_DY,
@@ -1380,7 +1369,7 @@ static void node_draw_basis(const bContext *C,
UI_block_emboss_set(node->block, UI_EMBOSS_NONE);
uiBut *but = uiDefIconBut(node->block,
UI_BTYPE_BUT_TOGGLE,
- B_REDR,
+ 0,
ICON_NODETREE,
iconofs,
rct->ymax - NODE_DY,
@@ -1432,7 +1421,7 @@ static void node_draw_basis(const bContext *C,
UI_block_emboss_set(node->block, UI_EMBOSS_NONE);
uiBut *but = uiDefBut(node->block,
UI_BTYPE_BUT_TOGGLE,
- B_REDR,
+ 0,
"",
rct->xmin + 0.35f * U.widget_unit,
rct->ymax - NODE_DY / 2.2f - but_size / 2,
@@ -1607,7 +1596,7 @@ static void node_draw_hidden(const bContext *C,
UI_block_emboss_set(node->block, UI_EMBOSS_NONE);
uiBut *but = uiDefBut(node->block,
UI_BTYPE_BUT_TOGGLE,
- B_REDR,
+ 0,
"",
rct->xmin + 0.35f * U.widget_unit,
centy - but_size / 2,
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 1566c1e8571..5973d59e68f 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -307,26 +307,6 @@ extern const char *node_context_dir[];
#define NODE_RESIZE_MARGIN (0.20f * U.widget_unit)
#define NODE_LINK_RESOL 12
-/* Button events (butspace) */
-enum eNodeSpace_ButEvents {
- B_NOP = 0,
- B_REDR = 1,
- B_NODE_USEMAT,
- B_NODE_USESCENE,
- B_NODE_USETEX,
- B_TEXBROWSE,
- B_TEXALONE,
- B_TEXLOCAL,
- B_TEXDELETE,
- B_TEXPRV,
- B_AUTOTEXNAME,
- B_KEEPDATA,
- B_NODE_EXEC,
- B_MATPRV,
- B_NODE_LOADIMAGE,
- B_NODE_SETIMAGE,
-};
-
#ifdef __cplusplus
}
#endif