-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathmergeBlendingUp.py
More file actions
31 lines (20 loc) · 851 Bytes
/
mergeBlendingUp.py
File metadata and controls
31 lines (20 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#This Source Code Form is subject to the terms of the Mozilla Public
#License, v. 2.0. If a copy of the MPL was not distributed with this
#file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#Created by Fabrice Fernandez on 28/06/2019.
from NatronGui import *
# CYCLES THROUGH MERGE BELNDING MODES UPWARD #
def mergeBlendingUp():
# get current Natron instance running in memory #
app = natron.getGuiInstance(0)
# we store selected node(s) in a list #
selectedNodes = app.getSelectedNodes()
# cycle every selected node #
for node in selectedNodes :
# get node type #
nodeID = node.getPluginID()
# check if selected node is a 'Merge' node #
if nodeID == "net.sf.openfx.MergePlugin":
oldOperation = node.getParam('operation').get()
newOperation = oldOperation - 1
node.getParam('operation').set(newOperation)