mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #872 from pypeclub/bugifx/remove_get_application_usage
Remove get_application usage
This commit is contained in:
commit
e0f14231bc
2 changed files with 1 additions and 22 deletions
|
|
@ -206,23 +206,6 @@ def on_new(_):
|
|||
|
||||
def on_task_changed(*args):
|
||||
"""Wrapped function of app initialize and maya's on task changed"""
|
||||
|
||||
# Inputs (from the switched session and running app)
|
||||
session = avalon.Session.copy()
|
||||
app_name = os.environ["AVALON_APP_NAME"]
|
||||
|
||||
# Find the application definition
|
||||
app_definition = pipeline.lib.get_application(app_name)
|
||||
|
||||
App = type("app_%s" % app_name,
|
||||
(avalon.Application,),
|
||||
{"config": app_definition.copy()})
|
||||
|
||||
# Initialize within the new session's environment
|
||||
app = App()
|
||||
env = app.environ(session)
|
||||
app.initialize(env)
|
||||
|
||||
# Run
|
||||
maya.pipeline._on_task_changed()
|
||||
with maya.suspended_refresh():
|
||||
|
|
|
|||
|
|
@ -149,9 +149,7 @@ def get_render_path(node):
|
|||
nuke_dataflow_writes = get_node_dataflow_preset(**data_preset)
|
||||
nuke_colorspace_writes = get_node_colorspace_preset(**data_preset)
|
||||
|
||||
application = lib.get_application(os.environ["AVALON_APP_NAME"])
|
||||
data.update({
|
||||
"application": application,
|
||||
"nuke_dataflow_writes": nuke_dataflow_writes,
|
||||
"nuke_colorspace_writes": nuke_colorspace_writes
|
||||
})
|
||||
|
|
@ -204,7 +202,7 @@ def format_anatomy(data):
|
|||
"project": {"name": project_document["name"],
|
||||
"code": project_document["data"].get("code", '')},
|
||||
"representation": data["nuke_dataflow_writes"]["file_type"],
|
||||
"app": data["application"]["application_dir"],
|
||||
"app": api.Session["AVALON_APP"],
|
||||
"hierarchy": pype.get_hierarchy(),
|
||||
"frame": "#" * padding,
|
||||
})
|
||||
|
|
@ -258,11 +256,9 @@ def create_write_node(name, data, input=None, prenodes=None, review=True):
|
|||
|
||||
nuke_dataflow_writes = get_node_dataflow_preset(**data)
|
||||
nuke_colorspace_writes = get_node_colorspace_preset(**data)
|
||||
application = lib.get_application(os.environ["AVALON_APP_NAME"])
|
||||
|
||||
try:
|
||||
data.update({
|
||||
"application": application,
|
||||
"nuke_dataflow_writes": nuke_dataflow_writes,
|
||||
"nuke_colorspace_writes": nuke_colorspace_writes
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue