diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-11-05 13:35:48 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-11-05 13:44:53 +0300 |
commit | 3f68a0aea5c973531a23df8e80f15ded79a2f12a (patch) | |
tree | c9fd13b7c7efcf30c30aa5c3b2791cf71fd38ed9 /source/blender/editors/space_node/node_relationships.c | |
parent | 035026f48a2766cd5793f92062c7268bfb02a5c6 (diff) |
Simplify node frame detach operators, based on T34670 by @julien.
* The `NODE_OT_parent_clear` operator has been removed. This was a very
simplistic operator that detached every selected node, which is not very
useful in case of hierarchical frames. The `NODE_OT_detach` operator
only detaches the top parent nodes in the selection, keeping the
hierarchy of selected nodes intact.
* The `ALT+P` shortcut has been reassigned to the `NODE_OT_detach`
operator which replaces the previous `NODE_OT_clear` mapping with
similar behavior (also gives a menu entry shortcut now).
* Shortcuts for `NODE_OT_detach_translate_attach` have been removed, due
to crowded and messy keymap and unintuitive shortcut `ALT+F`. This macro
operator is still registered, in case hardcore users want to make their
own keymaps, but not mapped by default. Node keymaps may need some
redesign in the future for these things.
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r-- | source/blender/editors/space_node/node_relationships.c | 34 |
1 files changed, 0 insertions, 34 deletions
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 */ |