🎨 WIP on the creator

This commit is contained in:
Ondrej Samohel 2023-09-07 17:40:01 +02:00
parent 0fa4acb98b
commit 684ce0fc7d
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -0,0 +1,36 @@
from openpype.hosts.maya.api import plugin
from openpype.lib import BoolDef
from openpype import AYON_SERVER_ENABLED
from ayon_api import get_folder_by_name
class CreateMultishotLayout(plugin.MayaCreator):
"""A grouped package of loaded content"""
identifier = "io.openpype.creators.maya.multishotlayout"
label = "Multishot Layout"
family = "layout"
icon = "camera"
def get_instance_attr_defs(self):
return [
BoolDef("groupLoadedAssets",
label="Group Loaded Assets",
tooltip="Enable this when you want to publish group of "
"loaded asset",
default=False)
]
def create(self, subset_name, instance_data, pre_create_data):
# TODO: get this needs to be switched to get_folder_by_path
# once the fork to pure AYON is done.
# WARNING: this will not work for projects where the asset name
# is not unique across the project until the switch mentioned
# above is done.
current_folder = get_folder_by_name(instance_data["asset"])
# blast this creator if Ayon server is not enabled
if not AYON_SERVER_ENABLED:
del CreateMultishotLayout