Skip to content

collect_review

Requires

None

Provides

instance -> family ("review")

CollectReview

Bases: ContextPlugin

Adds review to families for instances marked to be reviewable.

Source code in client/ayon_photoshop/plugins/publish/collect_review.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class CollectReview(pyblish.api.ContextPlugin):
    """Adds review to families for instances marked to be reviewable.
    """

    label = "Collect Review"
    hosts = ["photoshop"]
    order = pyblish.api.CollectorOrder + 0.1
    settings_category = "photoshop"

    def process(self, context):
        for instance in context:
            creator_attributes = instance.data["creator_attributes"]

            if (not creator_attributes.get("mark_for_review") and
                    "review" not in instance.data["families"]):
                continue

            if "review" not in instance.data["families"]:
                instance.data["families"].append("review")

            instance.data["frameStart"] = context.data["frameStart"]
            instance.data["frameEnd"] = context.data["frameEnd"]
            instance.data["fps"] = context.data["fps"]