diff options
Diffstat (limited to 'source/blender')
4 files changed, 5 insertions, 40 deletions
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 9598ff190c0..27c3ab813ae 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -163,7 +163,6 @@ void NODE_OT_links_cut(struct wmOperatorType *ot); void NODE_OT_links_detach(struct wmOperatorType *ot); void NODE_OT_parent_set(struct wmOperatorType *ot); -void NODE_OT_parent_clear(struct wmOperatorType *ot); void NODE_OT_join(struct wmOperatorType *ot); void NODE_OT_attach(struct wmOperatorType *ot); void NODE_OT_detach(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c index 7dcbeae4627..a7799e79312 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -111,7 +111,6 @@ void node_operatortypes(void) WM_operatortype_append(NODE_OT_output_file_move_active_socket); WM_operatortype_append(NODE_OT_parent_set); - WM_operatortype_append(NODE_OT_parent_clear); WM_operatortype_append(NODE_OT_join); WM_operatortype_append(NODE_OT_attach); WM_operatortype_append(NODE_OT_detach); @@ -147,6 +146,10 @@ void ED_operatormacros_node(void) RNA_boolean_set(mot->ptr, "release_confirm", true); WM_operatortype_macro_define(ot, "NODE_OT_attach"); + /* Note: Currently not in a default keymap or menu due to messy keymaps + * and tricky invoke functionality. + * Kept around in case users want to make own shortcuts. + */ ot = WM_operatortype_append_macro("NODE_OT_detach_translate_attach", "Detach and Move", "Detach nodes, move and attach to frame", OPTYPE_UNDO | OPTYPE_REGISTER); @@ -267,7 +270,7 @@ void node_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "NODE_OT_duplicate_move_keep_inputs", DKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0); WM_keymap_add_item(keymap, "NODE_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "NODE_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "NODE_OT_detach", PKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "NODE_OT_join", JKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "NODE_OT_hide_toggle", HKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 973ce56857c..8ec5ad1f631 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -1011,40 +1011,6 @@ void NODE_OT_parent_set(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/* ****************** Clear Parent ******************* */ - -static int node_parent_clear_exec(bContext *C, wmOperator *UNUSED(op)) -{ - SpaceNode *snode = CTX_wm_space_node(C); - bNodeTree *ntree = snode->edittree; - bNode *node; - - for (node = ntree->nodes.first; node; node = node->next) { - if (node->flag & NODE_SELECT) { - nodeDetachNode(node); - } - } - - WM_event_add_notifier(C, NC_NODE | ND_DISPLAY, NULL); - - return OPERATOR_FINISHED; -} - -void NODE_OT_parent_clear(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Clear Parent"; - ot->description = "Detach selected nodes"; - ot->idname = "NODE_OT_parent_clear"; - - /* api callbacks */ - ot->exec = node_parent_clear_exec; - ot->poll = ED_operator_node_editable; - - /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; -} - /* ****************** Join Nodes ******************* */ /* tags for depth-first search */ diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 05a147fe0d4..5c607d933c1 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -1106,9 +1106,6 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac /* XXX release_confirm is set in the macro operator definition */ WM_keymap_add_item(keymap, "NODE_OT_move_detach_links_release", EVT_TWEAK_A, KM_ANY, KM_ALT, 0); WM_keymap_add_item(keymap, "NODE_OT_move_detach_links", EVT_TWEAK_S, KM_ANY, KM_ALT, 0); - - /* dettach and translate */ - WM_keymap_add_item(keymap, "NODE_OT_detach_translate_attach", FKEY, KM_PRESS, KM_ALT, 0); break; case SPACE_SEQ: WM_keymap_add_item(keymap, OP_SEQ_SLIDE, GKEY, KM_PRESS, 0, 0); |