CVEI IV
Sometimes you need more control over ordering, and that's when it can be useful to know that you can offset the built-in orders.
1
import pyblish.api
2
3
class PreCollector(pyblish.api.ContextPlugin):
4
order = pyblish.api.CollectorOrder - 0.1
5
6
def process(self, context):
7
context.create_instance("SpecialInstance")
8
9
10
class Collector(pyblish.api.ContextPlugin):
11
order = pyblish.api.CollectorOrder
12
13
def process(self, context):
14
special_instance = context["SpecialInstance"]
15
special_instance.data["specialData"] = 42
Copied!
You can offset any plug-in from negative 0.499.. to positive 0.499.. A value beyond that will inadvertently transition your plug-in into the next built-in order.
Ranges
1
-0.5 to 0.499.. = Collection
2
0.5 to 1.499.. = Validation
3
1.5 to 2.499.. = Extraction
4
2.5 to 3.499.. = Integration
Copied!
Last modified 1yr ago
Copy link