Pyblish By Example
Search…
Pyblish By Example
1.8
Introduction
Hello World
Quickstart
Files
Coordination
Architecture
Branching I
Branching II
Branching III
Sharing
Validating I
Validating II
CVEI I
CVEI II
CVEI III
CVEI IV
Data
Report I
Report II
Report III
Report IV
Report V
Callback I
Callback II
Callback III
Logging
Filtering
Next Steps
Powered By
GitBook
Coordination
In the previous example, you might have gotten the reverse output.
1
# hello from plugin2
2
# hello from plugin1
Copied!
That's because plug-ins are sorted by the class attribute
order
, and we didn't change it.
1
import
pyblish
.
api
2
3
class
FirstPlugin
(
pyblish
.
api
.
ContextPlugin
):
4
order
=
0
5
6
def
process
(
self
,
context
):
7
print
(
"hello"
)
8
9
class
SecondPlugin
(
pyblish
.
api
.
ContextPlugin
):
10
order
=
1
11
12
def
process
(
self
,
context
):
13
print
(
"world"
)
14
15
pyblish
.
api
.
register_plugin
(
FirstPlugin
)
16
pyblish
.
api
.
register_plugin
(
SecondPlugin
)
17
18
import
pyblish
.
util
19
pyblish
.
util
.
publish
()
20
# hello
21
# world
Copied!
They now run in the expected order.
Previous
Files
Next
Architecture
Last modified
2yr ago
Copy link