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

Nuke: Use AVALON_APP to get value for "app" key #2818

Merged
merged 1 commit into from
Mar 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions openpype/hosts/nuke/api/lib.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import re
import sys
import six
import platform
import contextlib
Expand Down Expand Up @@ -679,10 +678,10 @@ def get_render_path(node):
}

nuke_imageio_writes = get_created_node_imageio_setting(**data_preset)
host_name = os.environ.get("AVALON_APP")

application = lib.get_application(os.environ["AVALON_APP_NAME"])
data.update({
"application": application,
"app": host_name,
"nuke_imageio_writes": nuke_imageio_writes
})

Expand Down Expand Up @@ -805,18 +804,14 @@ def create_write_node(name, data, input=None, prenodes=None,
'''

imageio_writes = get_created_node_imageio_setting(**data)
app_manager = ApplicationManager()
app_name = os.environ.get("AVALON_APP_NAME")
if app_name:
app = app_manager.applications.get(app_name)

for knob in imageio_writes["knobs"]:
if knob["name"] == "file_type":
representation = knob["value"]

host_name = os.environ.get("AVALON_APP")
try:
data.update({
"app": app.host_name,
"app": host_name,
"imageio_writes": imageio_writes,
"representation": representation,
})
Expand Down