ayon-core/pype/plugins/global/publish/collect_templates.py
2018-11-14 17:14:44 +01:00

23 lines
568 B
Python

from app.api import (
Templates
)
import pyblish.api
class CollectTemplates(pyblish.api.ContextPlugin):
"""Inject the current working file into context"""
order = pyblish.api.CollectorOrder
label = "Collect Templates"
def process(self, context):
"""Inject the current working file"""
templates = Templates(
type=["anatomy"]
)
context.data['anatomy'] = templates.anatomy
for key in templates.anatomy:
self.log.info(str(key) + ": " + str(templates.anatomy[key]))
# return