forked from NatronGitHub/natron-python-scripting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoAlpha.py
More file actions
24 lines (16 loc) · 676 Bytes
/
Copy pathautoAlpha.py
File metadata and controls
24 lines (16 loc) · 676 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
#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 25/01/2018.
from NatronEngine import*
from NatronGui import *
from PySide.QtGui import *
# SETS SELECTED READ NODES OUTPUT COMPONENTS TO RGBA #
def autoAlpha():
app = natron.getGuiInstance(0)
selectedNodes = app.getSelectedNodes()
for n in selectedNodes:
myID = n.getPluginID()
if myID == "fr.inria.built-in.Read" or nodeID == 'fr.inria.openfx.ReadOIIO':
newComponents = n.getParam("outputComponents")
newComponents.set(0)