AfterEffects: added toggle for applying values from DB during creation (#6204)

* OP-8130 - After Effects added flag to force values from Asset to composition during creation

This allows controlling setting of values (resolution, duration) from Asset (DB) to the created instance. Default is to set it automatically.

* OP-8130 - Ayon version of Settings for AE creator
This commit is contained in:
Petr Kalis 2024-02-08 13:46:56 +01:00 committed by GitHub
parent f8464971dd
commit 1fcdde0a9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 3 deletions

View file

@ -29,6 +29,7 @@ class RenderCreator(Creator):
# Settings
mark_for_review = True
force_setting_values = True
def create(self, subset_name_from_ui, data, pre_create_data):
stub = api.get_stub() # only after After Effects is up
@ -96,7 +97,9 @@ class RenderCreator(Creator):
self._add_instance_to_context(new_instance)
stub.rename_item(comp.id, subset_name)
set_settings(True, True, [comp.id], print_msg=False)
if self.force_setting_values:
set_settings(True, True, [comp.id], print_msg=False)
def get_pre_create_attr_defs(self):
output = [
@ -173,6 +176,7 @@ class RenderCreator(Creator):
)
self.mark_for_review = plugin_settings["mark_for_review"]
self.force_setting_values = plugin_settings["force_setting_values"]
self.default_variants = plugin_settings.get(
"default_variants",
plugin_settings.get("defaults") or []

View file

@ -15,7 +15,8 @@
"default_variants": [
"Main"
],
"mark_for_review": true
"mark_for_review": true,
"force_setting_values": true
}
},
"publish": {

View file

@ -42,6 +42,12 @@
"key": "mark_for_review",
"label": "Review",
"default": true
},
{
"type": "boolean",
"key": "force_setting_values",
"label": "Force resolution and duration values from Asset",
"default": true
}
]
}

View file

@ -7,6 +7,8 @@ class CreateRenderPlugin(BaseSettingsModel):
default_factory=list,
title="Default Variants"
)
force_setting_values: bool = SettingsField(
True, title="Force resolution and duration values from Asset")
class AfterEffectsCreatorPlugins(BaseSettingsModel):

View file

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring addon version."""
__version__ = "0.1.2"
__version__ = "0.1.3"