Skip to content

Commit f7e497a

Browse files
committed
update
1 parent d272470 commit f7e497a

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

Diff for: Python_GUI/removeInput/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# removeInput
2+
3+
Disconnect nodes in the Node Graph.
4+
5+
### HOW TO USE IT
6+
7+
* Select node(s).
8+
* Edit -> Remove input
9+
10+
### RESULT
11+
12+
* Selected nodes get disconnected in the Node Graph.
13+
14+
### SHORTCUT
15+
16+
* Ctrl+D
17+
18+
### INSTALLATION
19+
20+
* Copy 'removeInput' folder in your .Natron folder.
21+
* Add following lines to your 'initGui.py' file, where ``<path>`` is the location of 'removeInput' folder.
22+
23+
```
24+
from <path>.removeInput.removeInput import *
25+
NatronGui.natron.addMenuCommand('Edit/Remove input','removeInput', QtCore.Qt.Key.Key_D, QtCore.Qt.KeyboardModifier.ControlModifier)
26+
```

Diff for: Python_GUI/removeInput/__init__.py

Whitespace-only changes.

Diff for: Python_GUI/removeInput/removeInput.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from NatronEngine import *
2+
from NatronGui import *
3+
4+
5+
def removeInput():
6+
7+
# get current Natron instance running in memory #
8+
app = natron.getGuiInstance(0)
9+
10+
# get selected nodes #
11+
selectedNodes = app.getSelectedNodes()
12+
13+
for currentNode in selectedNodes:
14+
15+
currentNode.disconnectInput(0)

Diff for: initGui.py

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
from Python_GUI.nodeBold_HTML.nodeBold_HTML import *
4040
from Python_GUI.nodeItalic_HTML.nodeItalic_HTML import *
4141
from Python_GUI.openLocation.openLocation import *
42+
from Python_GUI.removeInput.removeInput import *
4243
from Python_GUI.selectSimilar.selectSimilar import *
4344

4445
# Tools -> Other
@@ -79,6 +80,7 @@
7980
NatronGui.natron.addMenuCommand('Edit/Italic nodes <HTML>','nodeItalic_HTML')
8081
NatronGui.natron.addMenuCommand('Edit/Open location','openLocation', QtCore.Qt.Key.Key_O, QtCore.Qt.KeyboardModifier.AltModifier)
8182
NatronGui.natron.addMenuCommand('Edit/Select similar','selectSimilar')
83+
NatronGui.natron.addMenuCommand('Edit/Remove input','removeInput', QtCore.Qt.Key.Key_D, QtCore.Qt.KeyboardModifier.ControlModifier)
8284

8385
NatronGui.natron.addMenuCommand('Tools/Other/Blending mode+','mergeBlendingDown', QtCore.Qt.Key.Key_Down, QtCore.Qt.KeyboardModifier)
8486
NatronGui.natron.addMenuCommand('Tools/Other/Blending mode-','mergeBlendingUp', QtCore.Qt.Key.Key_Up, QtCore.Qt.KeyboardModifier)
@@ -119,6 +121,7 @@
119121
print ' + Edit/Italic nodes <HTML>'
120122
print ' + Edit/Open location'
121123
print ' + Edit/Select similar'
124+
print ' + Edit/Remove input'
122125
print ' +'
123126
print ' + Tools/Other/Blending mode+'
124127
print ' + Tools/Other/Blending mode-'

0 commit comments

Comments
 (0)