Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion openpype/hosts/aftereffects/plugins/create/create_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -96,7 +97,9 @@ def create(self, subset_name_from_ui, data, pre_create_data):
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 = [
Expand Down Expand Up @@ -173,6 +176,7 @@ def apply_settings(self, project_settings):
)

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 []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"default_variants": [
"Main"
],
"mark_for_review": true
"mark_for_review": true,
"force_setting_values": true
}
},
"publish": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down
2 changes: 2 additions & 0 deletions server_addon/aftereffects/server/settings/creator_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion server_addon/aftereffects/server/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring addon version."""
__version__ = "0.1.2"
__version__ = "0.1.3"