Skip to content

Commit b0da185

Browse files
committed
update
1 parent 359748d commit b0da185

47 files changed

Lines changed: 829 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Python_GUI/__init__.py

Whitespace-only changes.

Python_GUI/__init__.pyc

132 Bytes
Binary file not shown.

Python_GUI/autoAlpha/__init__.py

Whitespace-only changes.

Python_GUI/autoAlpha/__init__.pyc

142 Bytes
Binary file not shown.

Python_GUI/autoAlpha/autoAlpha.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#This Source Code Form is subject to the terms of the Mozilla Public
2+
#License, v. 2.0. If a copy of the MPL was not distributed with this
3+
#file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
#Created by Fabrice Fernandez on 17/01/2018.
5+
6+
from NatronEngine import*
7+
from NatronGui import *
8+
from PySide.QtGui import *
9+
10+
11+
# SETS SELECTED READ NODES OUTPUT COMPONENTS TO RGBA #
12+
13+
def autoAlpha():
14+
15+
app = natron.getGuiInstance(0)
16+
selectedNodes = app.getSelectedNodes()
17+
18+
for n in selectedNodes:
19+
myID = n.getPluginID()
20+
21+
if myID == "fr.inria.built-in.Read" :
22+
23+
newComponents = n.getParam("outputComponents")
24+
newComponents.set(0)

Python_GUI/autoAlpha/autoAlpha.pyc

706 Bytes
Binary file not shown.

Python_GUI/diskCache/__init__.py

Whitespace-only changes.

Python_GUI/diskCache/__init__.pyc

142 Bytes
Binary file not shown.

Python_GUI/diskCache/diskCache.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#This Source Code Form is subject to the terms of the Mozilla Public
2+
#License, v. 2.0. If a copy of the MPL was not distributed with this
3+
#file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
#Created by Fabrice Fernandez on 17/01/2018.
5+
6+
from NatronEngine import*
7+
from NatronGui import *
8+
from PySide.QtGui import *
9+
import NatronEngine
10+
11+
12+
# DISK CACHE THE SELECTED NODE #
13+
14+
def diskCache():
15+
16+
# creates dialog window #
17+
app = natron.getGuiInstance(0)
18+
dialog = app.createModalDialog()
19+
20+
# creates UI #
21+
22+
line01 = dialog.createStringParam("sep01","")
23+
line01.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
24+
line02 = dialog.createStringParam("sep02","")
25+
line02.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
26+
27+
sep01 = dialog.createSeparatorParam("line03","Disk Cache")
28+
29+
line03 = dialog.createStringParam("sep03","")
30+
line03.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
31+
line04 = dialog.createStringParam("sep04","")
32+
line04.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
33+
34+
35+
firstFrame = dialog.createIntParam("firstFrame","In :")
36+
lastFrame = dialog.createIntParam("lastFrame","Out :")
37+
lastFrame.setAddNewLine(False)
38+
39+
line05 = dialog.createStringParam("sep05","")
40+
line05.setType(NatronEngine.StringParam.TypeEnum.eStringTypeLabel)
41+
42+
sep02 = dialog.createSeparatorParam("line02","")
43+
44+
# Refresh UI #
45+
dialog.refreshUserParamsGUI()
46+
47+
# code executed when OK button is pressed #
48+
if dialog.exec_():
49+
50+
# retrieves values entered by user #
51+
newFirstFrame = dialog.getParam("firstFrame").getValue()
52+
newLastFrame = dialog.getParam("lastFrame").getValue()
53+
54+
counter = 0
55+
selectedNodes = app.getSelectedNodes()
56+
57+
58+
59+
for n in selectedNodes:
60+
61+
# if more than 1 node have been selected, stop the process #
62+
if len(selectedNodes) != 1 :
63+
break
64+
65+
else :
66+
# creates a DiskCache node #
67+
parentPosition = n.getPosition()
68+
diskCache = app.createNode("fr.inria.built-in.DiskCache")
69+
70+
# connects the Disk Cache node to the selected node, and set graph position. #
71+
diskCache.connectInput(0, n)
72+
diskCache.setPosition(parentPosition[0]+150,parentPosition[1]+75)
73+
74+
# set node color #
75+
diskCache.setColor(0.521,0.51492,0.0003)
76+
77+
# set node name #
78+
parentLabel = n.getLabel()
79+
diskCache.setLabel('DiskCache_' + str(parentLabel))
80+
81+
myFrameRange = diskCache.getParam("frameRange")
82+
myFrameRange.set(2)
83+
84+
myFirstFrame = diskCache.getParam("firstFrame")
85+
myFirstFrame.set(newFirstFrame)
86+
87+
myLastFrame = diskCache.getParam("LastFrame")
88+
myLastFrame.set(newLastFrame)
89+
90+
app.render(diskCache, newFirstFrame, newLastFrame)

Python_GUI/diskCache/diskCache.pyc

2.05 KB
Binary file not shown.

0 commit comments

Comments
 (0)