Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2856 from pypeclub/feature/OP-2868_After-effects-…
Browse files Browse the repository at this point in the history
…creator-Subset-name-change-to-main-rather-than-default

AfterEffects: Allow configuration of default variant via Settings
  • Loading branch information
kalisp authored Apr 22, 2022
2 parents f7db937 + b46f1bc commit 628bc87
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
12 changes: 11 additions & 1 deletion openpype/hosts/aftereffects/plugins/create/create_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ class RenderCreator(Creator):

create_allow_context_change = True

def __init__(
self, create_context, system_settings, project_settings, headless=False
):
super(RenderCreator, self).__init__(create_context, system_settings,
project_settings, headless)
self._default_variants = (project_settings["aftereffects"]
["create"]
["RenderCreator"]
["defaults"])

def get_icon(self):
return resources.get_openpype_splash_filepath()

Expand Down Expand Up @@ -79,7 +89,7 @@ def create(self, subset_name, data, pre_create_data):
self._add_instance_to_context(new_instance)

def get_default_variants(self):
return ["Main"]
return self._default_variants

def get_instance_attr_defs(self):
return [BoolDef("farm", label="Render on farm")]
Expand Down
7 changes: 7 additions & 0 deletions openpype/settings/defaults/project_settings/aftereffects.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"create": {
"RenderCreator": {
"defaults": [
"Main"
]
}
},
"publish": {
"ValidateSceneSettings": {
"enabled": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@
"label": "AfterEffects",
"is_file": true,
"children": [
{
"type": "dict",
"collapsible": true,
"key": "create",
"label": "Creator plugins",
"children": [
{
"type": "dict",
"collapsible": true,
"key": "RenderCreator",
"label": "Create render",
"children": [
{
"type": "list",
"key": "defaults",
"label": "Default Variants",
"object_type": "text",
"docstring": "Fill default variant(s) (like 'Main' or 'Default') used in subset name creation."
}
]
}
]
},
{
"type": "dict",
"collapsible": true,
Expand Down

0 comments on commit 628bc87

Please sign in to comment.