Add delete with reconnect feature.

this will reconnect nodes as if the deleted node is muted.
Operation is added to the space_node node menu and to the keymap as CTRL-X

to test this just add some nodes to the space_node
select one or multiple nodes and press CTRL-X

It should reconnect the nodes as they were muted

limitations:
1. it performs a delete and reconnect per node. It does not evaluate all selected nodes as one whole
2. mute only supports Value, Vector and Color data types, so does this feature
3. not usable for nodes where input and output does not match (like colorToBW)

Where reconnect could not be preformed the links will be removed from the model.

Undo works with this delete with reconnect.
This commit is contained in:
Jeroen Bakker
2011-07-12 18:59:54 +00:00
parent 9eb1b26312
commit b724c7f27e
6 changed files with 120 additions and 5 deletions

View File

@@ -135,9 +135,10 @@ class NODE_MT_node(bpy.types.Menu):
layout.operator("transform.resize")
layout.separator()
layout.operator("node.duplicate_move")
layout.operator("node.delete")
layout.operator("node.delete_reconnect")
layout.separator()
layout.operator("node.link_make")