mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
apply settings in creators
This commit is contained in:
parent
9bb6c60698
commit
51196290b2
5 changed files with 39 additions and 4 deletions
|
|
@ -116,6 +116,15 @@ class CreateRenderlayer(TVPaintCreator):
|
|||
# - Mark by default instance for review
|
||||
mark_for_review = True
|
||||
|
||||
def apply_settings(self, project_settings, system_settings):
|
||||
plugin_settings = (
|
||||
project_settings["tvpain"]["create"]["create_render_layer"]
|
||||
)
|
||||
self.default_variant = plugin_settings["default_variant"]
|
||||
self.default_variants = plugin_settings["default_variants"]
|
||||
self.default_pass_name = plugin_settings["default_pass_name"]
|
||||
self.mark_for_review = plugin_settings["mark_for_review"]
|
||||
|
||||
def get_dynamic_data(
|
||||
self, variant, task_name, asset_doc, project_name, host_name, instance
|
||||
):
|
||||
|
|
@ -321,6 +330,14 @@ class CreateRenderPass(TVPaintCreator):
|
|||
# Settings
|
||||
mark_for_review = True
|
||||
|
||||
def apply_settings(self, project_settings, system_settings):
|
||||
plugin_settings = (
|
||||
project_settings["tvpain"]["create"]["create_render_pass"]
|
||||
)
|
||||
self.default_variant = plugin_settings["default_variant"]
|
||||
self.default_variants = plugin_settings["default_variants"]
|
||||
self.mark_for_review = plugin_settings["mark_for_review"]
|
||||
|
||||
def collect_instances(self):
|
||||
instances_by_identifier = self._cache_and_get_instances()
|
||||
render_layers = {
|
||||
|
|
@ -547,6 +564,16 @@ class TVPaintSceneRenderCreator(TVPaintAutoCreator):
|
|||
mark_for_review = True
|
||||
active_on_create = False
|
||||
|
||||
def apply_settings(self, project_settings, system_settings):
|
||||
plugin_settings = (
|
||||
project_settings["tvpain"]["create"]["create_render_scene"]
|
||||
)
|
||||
self.default_variant = plugin_settings["default_variant"]
|
||||
self.default_variants = plugin_settings["default_variants"]
|
||||
self.mark_for_review = plugin_settings["mark_for_review"]
|
||||
self.active_on_create = plugin_settings["active_on_create"]
|
||||
self.default_pass_name = plugin_settings["default_pass_name"]
|
||||
|
||||
def get_dynamic_data(self, variant, *args, **kwargs):
|
||||
dynamic_data = super().get_dynamic_data(variant, *args, **kwargs)
|
||||
dynamic_data["renderpass"] = "{renderpass}"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ class TVPaintReviewCreator(TVPaintAutoCreator):
|
|||
label = "Review"
|
||||
icon = "ei.video"
|
||||
|
||||
default_variant = "Main"
|
||||
def apply_settings(self, project_settings, system_settings):
|
||||
plugin_settings = project_settings["tvpain"]["create"]["create_review"]
|
||||
self.default_variant = plugin_settings["default_variant"]
|
||||
self.default_variants = plugin_settings["default_variants"]
|
||||
|
||||
def create(self):
|
||||
existing_instance = None
|
||||
|
|
|
|||
|
|
@ -11,7 +11,12 @@ class TVPaintWorkfileCreator(TVPaintAutoCreator):
|
|||
|
||||
# Settings
|
||||
active_on_create = True
|
||||
default_variant = "Main"
|
||||
|
||||
def apply_settings(self, project_settings, system_settings):
|
||||
plugin_settings = project_settings["tvpain"]["create"]["create_workfile"]
|
||||
self.default_variant = plugin_settings["default_variant"]
|
||||
self.default_variants = plugin_settings["default_variants"]
|
||||
self.active_on_create = plugin_settings["active_on_create"]
|
||||
|
||||
def create(self):
|
||||
existing_instance = None
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
},
|
||||
"create_render_layer": {
|
||||
"mark_for_review": true,
|
||||
"render_pass_name": "beauty",
|
||||
"default_pass_name": "beauty",
|
||||
"default_variant": "Main",
|
||||
"default_variants": []
|
||||
},
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@
|
|||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "render_pass_name",
|
||||
"key": "default_pass_name",
|
||||
"label": "Default beauty pass"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue