Merge pull request #2948 from pypeclub/bugfix/OP-2969_Nuke-13-Asset-Loader-Error

nuke: python3 compatibility issue with `iteritems`
This commit is contained in:
Jakub Ježek 2022-03-28 13:43:41 +02:00 committed by GitHub
commit 80b5a66744
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View file

@ -72,7 +72,7 @@ class LoadEffects(load.LoaderPlugin):
# getting data from json file with unicode conversion
with open(file, "r") as f:
json_f = {self.byteify(key): self.byteify(value)
for key, value in json.load(f).iteritems()}
for key, value in json.load(f).items()}
# get correct order of nodes by positions on track and subtrack
nodes_order = self.reorder_nodes(json_f)
@ -188,7 +188,7 @@ class LoadEffects(load.LoaderPlugin):
# getting data from json file with unicode conversion
with open(file, "r") as f:
json_f = {self.byteify(key): self.byteify(value)
for key, value in json.load(f).iteritems()}
for key, value in json.load(f).items()}
# get correct order of nodes by positions on track and subtrack
nodes_order = self.reorder_nodes(json_f)
@ -330,11 +330,11 @@ class LoadEffects(load.LoaderPlugin):
if isinstance(input, dict):
return {self.byteify(key): self.byteify(value)
for key, value in input.iteritems()}
for key, value in input.items()}
elif isinstance(input, list):
return [self.byteify(element) for element in input]
elif isinstance(input, unicode):
return input.encode('utf-8')
elif isinstance(input, str):
return str(input)
else:
return input

View file

@ -74,7 +74,7 @@ class LoadEffectsInputProcess(load.LoaderPlugin):
# getting data from json file with unicode conversion
with open(file, "r") as f:
json_f = {self.byteify(key): self.byteify(value)
for key, value in json.load(f).iteritems()}
for key, value in json.load(f).items()}
# get correct order of nodes by positions on track and subtrack
nodes_order = self.reorder_nodes(json_f)
@ -194,7 +194,7 @@ class LoadEffectsInputProcess(load.LoaderPlugin):
# getting data from json file with unicode conversion
with open(file, "r") as f:
json_f = {self.byteify(key): self.byteify(value)
for key, value in json.load(f).iteritems()}
for key, value in json.load(f).items()}
# get correct order of nodes by positions on track and subtrack
nodes_order = self.reorder_nodes(json_f)
@ -350,11 +350,11 @@ class LoadEffectsInputProcess(load.LoaderPlugin):
if isinstance(input, dict):
return {self.byteify(key): self.byteify(value)
for key, value in input.iteritems()}
for key, value in input.items()}
elif isinstance(input, list):
return [self.byteify(element) for element in input]
elif isinstance(input, unicode):
return input.encode('utf-8')
elif isinstance(input, str):
return str(input)
else:
return input

View file

@ -240,7 +240,7 @@ class LoadGizmoInputProcess(load.LoaderPlugin):
if isinstance(input, dict):
return {self.byteify(key): self.byteify(value)
for key, value in input.iteritems()}
for key, value in input.items()}
elif isinstance(input, list):
return [self.byteify(element) for element in input]
elif isinstance(input, unicode):

View file

@ -25,7 +25,7 @@ class RepairNukeWriteDeadlineTab(pyblish.api.Action):
# Remove existing knobs.
knob_names = openpype.hosts.nuke.lib.get_deadline_knob_names()
for name, knob in group_node.knobs().iteritems():
for name, knob in group_node.knobs().items():
if name in knob_names:
group_node.removeKnob(knob)