Skip to content

Commit b53a650

Browse files
committed
update
1 parent 8fc2d42 commit b53a650

File tree

12 files changed

+276
-0
lines changed

12 files changed

+276
-0
lines changed

Python_GUI/fullCircle/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# fullCircle
2+
3+
Create a full frame size circle.
4+
5+
### HOW TO USE IT
6+
7+
* Tools -> Roto -> Full circle
8+
9+
### RESULT
10+
11+
* A Roto node with a full frame size circle is created.
12+
13+
### INSTALLATION
14+
15+
* Copy 'fullCircle' folder in your .Natron folder.
16+
* Add following lines to your 'initGui.py' file, where ``<path>`` is the location of 'fullCircle' folder.
17+
18+
```
19+
from <path>.fullCircle.fullCircle import *
20+
NatronGui.natron.addMenuCommand('Tools/Roto/Full circle','fullCircle()')
21+
```

Python_GUI/fullCircle/__init__.py

Whitespace-only changes.

Python_GUI/fullCircle/fullCircle.py

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 22/07/2019.
5+
6+
import string
7+
import NatronEngine
8+
from NatronGui import *
9+
10+
11+
# TRACKER TO ROTO #
12+
13+
def fullCircle():
14+
15+
# get current Natron instance running in memory
16+
app = natron.getGuiInstance(0)
17+
18+
# create a 'Roto' node
19+
myRoto = app.createNode("fr.inria.built-in.Roto")
20+
21+
# get input image size
22+
imageWidth = myRoto.getOutputFormat().width()
23+
24+
imageHeight = myRoto.getOutputFormat().height()
25+
26+
27+
# set 'Roto' label
28+
myRoto.setLabel('full_Circle')
29+
30+
# get roto context
31+
rotoContext = myRoto.getRotoContext()
32+
33+
# get 'Base Layer'
34+
Layer1_layer = rotoContext.getBaseLayer()
35+
36+
# create square
37+
fullCircle = rotoContext.createEllipse(imageWidth/2,imageHeight/2,imageHeight,True,1)
38+
fullCircle.setLabel('full_Circle')

Python_GUI/fullEllipse/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# fullEllipse
2+
3+
Create a full frame size ellipse.
4+
5+
### HOW TO USE IT
6+
7+
* Tools -> Roto -> Full ellipse
8+
9+
### RESULT
10+
11+
* A Roto node with a full frame size ellipse is created.
12+
13+
### INSTALLATION
14+
15+
* Copy 'fullEllipse' folder in your .Natron folder.
16+
* Add following lines to your 'initGui.py' file, where ``<path>`` is the location of 'fullEllipse' folder.
17+
18+
```
19+
from <path>.fullEllipse.fullEllipse import *
20+
NatronGui.natron.addMenuCommand('Tools/Roto/Full ellipse','fullEllipse()')
21+
```

Python_GUI/fullEllipse/__init__.py

Whitespace-only changes.

Python_GUI/fullEllipse/fullEllipse.py

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 22/07/2019.
5+
6+
import string
7+
import NatronEngine
8+
from NatronGui import *
9+
10+
11+
# TRACKER TO ROTO #
12+
13+
def fullEllipse():
14+
15+
# get current Natron instance running in memory
16+
app = natron.getGuiInstance(0)
17+
18+
# create a 'Roto' node
19+
myRoto = app.createNode("fr.inria.built-in.Roto")
20+
21+
# get input image size
22+
imageWidth = myRoto.getOutputFormat().width()
23+
24+
imageHeight = myRoto.getOutputFormat().height()
25+
26+
27+
# set 'Roto' label
28+
myRoto.setLabel('full_Ellipse')
29+
30+
# get roto context
31+
rotoContext = myRoto.getRotoContext()
32+
33+
# get 'Base Layer'
34+
Layer1_layer = rotoContext.getBaseLayer()
35+
36+
# create ellipse
37+
fullEllipse = rotoContext.createEllipse(imageWidth,imageHeight/2,imageHeight,True,1)
38+
fullEllipse.setLabel('full_Ellipse')

Python_GUI/fullRectangle/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# fullRectangle
2+
3+
Create a full frame size rectangle.
4+
5+
### HOW TO USE IT
6+
7+
* Tools -> Roto -> Full rectangle
8+
9+
### RESULT
10+
11+
* A Roto node with a full frame size rectangle is created.
12+
13+
### INSTALLATION
14+
15+
* Copy 'fullRectangle' folder in your .Natron folder.
16+
* Add following lines to your 'initGui.py' file, where ``<path>`` is the location of 'fullRectangle' folder.
17+
18+
```
19+
from <path>.fullRectangle.fullRectangle import *
20+
NatronGui.natron.addMenuCommand('Tools/Roto/Full rectangle','fullRectangle()')
21+
```

Python_GUI/fullRectangle/__init__.py

Whitespace-only changes.
+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 22/07/2019.
5+
6+
import string
7+
import NatronEngine
8+
from NatronGui import *
9+
10+
11+
# TRACKER TO ROTO #
12+
13+
def fullRectangle():
14+
15+
# get current Natron instance running in memory
16+
app = natron.getGuiInstance(0)
17+
18+
# create a 'Roto' node
19+
myRoto = app.createNode("fr.inria.built-in.Roto")
20+
21+
# get input image size
22+
imageWidth = myRoto.getOutputFormat().width()
23+
24+
imageHeight = myRoto.getOutputFormat().height()
25+
26+
27+
# set 'Roto' label
28+
myRoto.setLabel('full_Rectangle')
29+
30+
# get roto context
31+
rotoContext = myRoto.getRotoContext()
32+
33+
# get 'Base Layer'
34+
Layer1_layer = rotoContext.getBaseLayer()
35+
36+
# create rectangle
37+
# 1st parameter : x position
38+
# 2nd parameter : y position
39+
# 3rd parameter : size
40+
# 4th parameter : frame
41+
fullRectangle = rotoContext.createRectangle(0,0,10,1)
42+
fullRectangle.setLabel('full_Rectangle')
43+
44+
# set 1st point position
45+
fullRectangle.setPointAtIndex(0,1,0,imageHeight,0,imageHeight,0,imageHeight)
46+
fullRectangle.setFeatherPointAtIndex(0,1,0,imageHeight,0,imageHeight,0,imageHeight)
47+
48+
# set 2nd point position
49+
fullRectangle.setPointAtIndex(1,1,imageWidth,imageHeight,imageWidth,imageHeight,imageWidth,imageHeight)
50+
fullRectangle.setFeatherPointAtIndex(1,1,imageWidth,imageHeight,imageWidth,imageHeight,imageWidth,imageHeight)
51+
52+
# set 3rd point position
53+
fullRectangle.setPointAtIndex(2,1,imageWidth,0,imageWidth,0,imageWidth,0)
54+
fullRectangle.setFeatherPointAtIndex(2,1,imageWidth,0,imageWidth,0,imageWidth,0)
55+
56+
# set 4th point position
57+
fullRectangle.setPointAtIndex(3,1,0,0,0,0,0,0)
58+
fullRectangle.setFeatherPointAtIndex(3,1,0,0,0,0,0,0)

Python_GUI/fullSquare/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# fullSquare
2+
3+
Create a full frame size rectangle.
4+
5+
### HOW TO USE IT
6+
7+
* Tools -> Roto -> Full square
8+
9+
### RESULT
10+
11+
* A Roto node with a full frame size square is created.
12+
13+
### INSTALLATION
14+
15+
* Copy 'fullSquare' folder in your .Natron folder.
16+
* Add following lines to your 'initGui.py' file, where ``<path>`` is the location of 'fullSquare' folder.
17+
18+
```
19+
from <path>.fullSquare.fullSquare import *
20+
NatronGui.natron.addMenuCommand('Tools/Roto/Full square','fullSquare()')
21+
```

Python_GUI/fullSquare/__init__.py

Whitespace-only changes.

Python_GUI/fullSquare/fullSquare.py

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 22/07/2019.
5+
6+
import string
7+
import NatronEngine
8+
from NatronGui import *
9+
10+
11+
# TRACKER TO ROTO #
12+
13+
def fullSquare():
14+
15+
# get current Natron instance running in memory
16+
app = natron.getGuiInstance(0)
17+
18+
# create a 'Roto' node
19+
myRoto = app.createNode("fr.inria.built-in.Roto")
20+
21+
# get input image size
22+
imageWidth = myRoto.getOutputFormat().width()
23+
24+
imageHeight = myRoto.getOutputFormat().height()
25+
26+
27+
# set 'Roto' label
28+
myRoto.setLabel('full_Square')
29+
30+
# get roto context
31+
rotoContext = myRoto.getRotoContext()
32+
33+
# get 'Base Layer'
34+
Layer1_layer = rotoContext.getBaseLayer()
35+
36+
# create square
37+
# 1st parameter : x position
38+
# 2nd parameter : y position
39+
# 3rd parameter : size
40+
# 4th parameter : frame
41+
fullSquare = rotoContext.createRectangle(0,0,10,1)
42+
fullSquare.setLabel('full_Square')
43+
44+
# set 1st point position
45+
fullSquare.setPointAtIndex(0,1,(imageWidth/2)-(imageHeight/2),imageHeight,(imageWidth/2)-(imageHeight/2),imageHeight,(imageWidth/2)-(imageHeight/2),imageHeight)
46+
fullSquare.setFeatherPointAtIndex(0,1,(imageWidth/2)-(imageHeight/2),imageHeight,(imageWidth/2)-(imageHeight/2),imageHeight,(imageWidth/2)-(imageHeight/2),imageHeight)
47+
48+
# set 2nd point position
49+
fullSquare.setPointAtIndex(1,1,(imageWidth/2)+(imageHeight/2),imageHeight,(imageWidth/2)+(imageHeight/2),imageHeight,(imageWidth/2)+(imageHeight/2),imageHeight)
50+
fullSquare.setFeatherPointAtIndex(1,1,(imageWidth/2)+(imageHeight/2),imageHeight,(imageWidth/2)+(imageHeight/2),imageHeight,(imageWidth/2)+(imageHeight/2),imageHeight)
51+
52+
# set 3rd point position
53+
fullSquare.setPointAtIndex(2,1,(imageWidth/2)+(imageHeight/2),0,(imageWidth/2)+(imageHeight/2),0,(imageWidth/2)+(imageHeight/2),0)
54+
fullSquare.setFeatherPointAtIndex(2,1,(imageWidth/2)+(imageHeight/2),0,(imageWidth/2)+(imageHeight/2),0,(imageWidth/2)+(imageHeight/2),0)
55+
56+
# set 4th point position
57+
fullSquare.setPointAtIndex(3,1,(imageWidth/2)-(imageHeight/2),0,(imageWidth/2)-(imageHeight/2),0,(imageWidth/2)-(imageHeight/2),0)
58+
fullSquare.setFeatherPointAtIndex(3,1,(imageWidth/2)-(imageHeight/2),0,(imageWidth/2)-(imageHeight/2),0,(imageWidth/2)-(imageHeight/2),0)

0 commit comments

Comments
 (0)