Fix typos / cosmetics

This commit is contained in:
Roy Nieterau 2022-01-16 13:05:26 +01:00
parent 41a2ee812a
commit 107e2e637e
111 changed files with 237 additions and 237 deletions

View file

@ -54,7 +54,7 @@ def install():
''' Installing all requarements for Nuke host
'''
# remove all registred callbacks form avalon.nuke
# remove all registered callbacks form avalon.nuke
from avalon import pipeline
pipeline._registered_event_handlers.clear()

View file

@ -141,7 +141,7 @@ def check_inventory_versions():
max_version = max(versions)
# check the available version and do match
# change color of node if not max verion
# change color of node if not max version
if version.get("name") not in [max_version]:
node["tile_color"].setValue(int("0xd84f20ff", 16))
else:
@ -236,10 +236,10 @@ def get_render_path(node):
def format_anatomy(data):
''' Helping function for formating of anatomy paths
''' Helping function for formatting of anatomy paths
Arguments:
data (dict): dictionary with attributes used for formating
data (dict): dictionary with attributes used for formatting
Return:
path (str)
@ -462,7 +462,7 @@ def create_write_node(name, data, input=None, prenodes=None,
else:
now_node.setInput(0, prev_node)
# swith actual node to previous
# switch actual node to previous
prev_node = now_node
# creating write node
@ -474,7 +474,7 @@ def create_write_node(name, data, input=None, prenodes=None,
# connect to previous node
now_node.setInput(0, prev_node)
# swith actual node to previous
# switch actual node to previous
prev_node = now_node
now_node = nuke.createNode("Output", "name Output1")
@ -516,7 +516,7 @@ def create_write_node(name, data, input=None, prenodes=None,
GN.addKnob(knob)
else:
if "___" in _k_name:
# add devider
# add divider
GN.addKnob(nuke.Text_Knob(""))
else:
# add linked knob by _k_name
@ -725,7 +725,7 @@ class WorkfileSettings(object):
for i, n in enumerate(copy_inputs):
nv.setInput(i, n)
# set coppied knobs
# set copied knobs
for k, v in copy_knobs.items():
print(k, v)
nv[k].setValue(v)
@ -862,7 +862,7 @@ class WorkfileSettings(object):
def set_reads_colorspace(self, read_clrs_inputs):
""" Setting colorspace to Read nodes
Looping trought all read nodes and tries to set colorspace based
Looping through all read nodes and tries to set colorspace based
on regex rules in presets
"""
changes = {}
@ -871,7 +871,7 @@ class WorkfileSettings(object):
if n.Class() != "Read":
continue
# check if any colorspace presets for read is mathing
# check if any colorspace presets for read is matching
preset_clrsp = None
for input in read_clrs_inputs:
@ -1013,7 +1013,7 @@ class WorkfileSettings(object):
def reset_resolution(self):
"""Set resolution to project resolution."""
log.info("Reseting resolution")
log.info("Resetting resolution")
project = io.find_one({"type": "project"})
asset = api.Session["AVALON_ASSET"]
asset = io.find_one({"name": asset, "type": "asset"})

View file

@ -209,7 +209,7 @@ class ExporterReview(object):
nuke_imageio = opnlib.get_nuke_imageio_settings()
# TODO: this is only securing backward compatibility lets remove
# this once all projects's anotomy are upated to newer config
# this once all projects's anotomy are updated to newer config
if "baking" in nuke_imageio.keys():
return nuke_imageio["baking"]["viewerProcess"]
else:
@ -477,7 +477,7 @@ class ExporterReviewMov(ExporterReview):
write_node["file_type"].setValue(str(self.ext))
# Knobs `meta_codec` and `mov64_codec` are not available on centos.
# TODO should't this come from settings on outputs?
# TODO shouldn't this come from settings on outputs?
try:
write_node["meta_codec"].setValue("ap4h")
except Exception:

View file

@ -5,9 +5,9 @@ from openpype.api import resources
def set_context_favorites(favorites=None):
""" Addig favorite folders to nuke's browser
""" Adding favorite folders to nuke's browser
Argumets:
Arguments:
favorites (dict): couples of {name:path}
"""
favorites = favorites or {}
@ -51,7 +51,7 @@ def gizmo_is_nuke_default(gizmo):
def bake_gizmos_recursively(in_group=nuke.Root()):
"""Converting a gizmo to group
Argumets:
Arguments:
is_group (nuke.Node)[optonal]: group node or all nodes
"""
# preserve selection after all is done

View file

@ -48,7 +48,7 @@ class CreateGizmo(plugin.PypeCreator):
gizmo_node["name"].setValue("{}_GZM".format(self.name))
gizmo_node["tile_color"].setValue(int(self.node_color, 16))
# add sticky node wit guide
# add sticky node with guide
with gizmo_node:
sticky = nuke.createNode("StickyNote")
sticky["label"].setValue(
@ -71,7 +71,7 @@ class CreateGizmo(plugin.PypeCreator):
gizmo_node["name"].setValue("{}_GZM".format(self.name))
gizmo_node["tile_color"].setValue(int(self.node_color, 16))
# add sticky node wit guide
# add sticky node with guide
with gizmo_node:
sticky = nuke.createNode("StickyNote")
sticky["label"].setValue(

View file

@ -235,7 +235,7 @@ class LoadBackdropNodes(api.Loader):
else:
GN["tile_color"].setValue(int(self.node_color, 16))
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
return update_container(GN, data_imprint)

View file

@ -156,7 +156,7 @@ class AlembicCameraLoader(api.Loader):
# color node by correct color by actual version
self.node_version_color(version, camera_node)
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
return update_container(camera_node, data_imprint)

View file

@ -270,7 +270,7 @@ class LoadClip(plugin.NukeLoader):
read_node,
updated_dict
)
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
if version_data.get("retime", None):
self._make_retimes(read_node, version_data)
@ -302,7 +302,7 @@ class LoadClip(plugin.NukeLoader):
self._loader_shift(read_node, start_at_workfile)
def _make_retimes(self, parent_node, version_data):
''' Create all retime and timewarping nodes with coppied animation '''
''' Create all retime and timewarping nodes with copied animation '''
speed = version_data.get('speed', 1)
time_warp_nodes = version_data.get('timewarps', [])
last_node = None

View file

@ -253,7 +253,7 @@ class LoadEffects(api.Loader):
else:
GN["tile_color"].setValue(int("0x3469ffff", 16))
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
def connect_read_node(self, group_node, asset, subset):
"""
@ -314,7 +314,7 @@ class LoadEffects(api.Loader):
def byteify(self, input):
"""
Converts unicode strings to strings
It goes trought all dictionary
It goes through all dictionary
Arguments:
input (dict/str): input

View file

@ -258,7 +258,7 @@ class LoadEffectsInputProcess(api.Loader):
else:
GN["tile_color"].setValue(int("0x3469ffff", 16))
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
def connect_active_viewer(self, group_node):
"""
@ -331,7 +331,7 @@ class LoadEffectsInputProcess(api.Loader):
def byteify(self, input):
"""
Converts unicode strings to strings
It goes trought all dictionary
It goes through all dictionary
Arguments:
input (dict/str): input

View file

@ -149,7 +149,7 @@ class LoadGizmo(api.Loader):
else:
GN["tile_color"].setValue(int(self.node_color, 16))
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
return update_container(GN, data_imprint)

View file

@ -155,7 +155,7 @@ class LoadGizmoInputProcess(api.Loader):
else:
GN["tile_color"].setValue(int(self.node_color, 16))
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
return update_container(GN, data_imprint)
@ -210,7 +210,7 @@ class LoadGizmoInputProcess(api.Loader):
def byteify(self, input):
"""
Converts unicode strings to strings
It goes trought all dictionary
It goes through all dictionary
Arguments:
input (dict/str): input

View file

@ -231,7 +231,7 @@ class LoadImage(api.Loader):
node,
updated_dict
)
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
def remove(self, container):

View file

@ -156,7 +156,7 @@ class AlembicModelLoader(api.Loader):
# color node by correct color by actual version
self.node_version_color(version, model_node)
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
return update_container(model_node, data_imprint)

View file

@ -67,7 +67,7 @@ class LinkAsGroup(api.Loader):
P["useOutput"].setValue(True)
with P:
# iterate trough all nodes in group node and find pype writes
# iterate through all nodes in group node and find pype writes
writes = [n.name() for n in nuke.allNodes()
if n.Class() == "Group"
if get_avalon_knob_data(n)]
@ -152,7 +152,7 @@ class LinkAsGroup(api.Loader):
else:
node["tile_color"].setValue(int("0xff0ff0ff", 16))
self.log.info("udated to version: {}".format(version.get("name")))
self.log.info("updated to version: {}".format(version.get("name")))
def remove(self, container):
from avalon.nuke import viewer_update_and_undo_stop

View file

@ -113,7 +113,7 @@ class ExtractCamera(openpype.api.Extractor):
def bakeCameraWithAxeses(camera_node, output_range):
""" Baking all perent hiearchy of axeses into camera
""" Baking all perent hierarchy of axeses into camera
with transposition onto word XYZ coordinance
"""
bakeFocal = False

View file

@ -4,7 +4,7 @@ from avalon.nuke import maintained_selection
class CreateOutputNode(pyblish.api.ContextPlugin):
"""Adding output node for each ouput write node
"""Adding output node for each output write node
So when latly user will want to Load .nk as LifeGroup or Precomp
Nuke will not complain about missing Output node
"""

View file

@ -49,7 +49,7 @@ class ExtractReviewDataMov(openpype.api.Extractor):
# test if family found in context
test_families = any([
# first if exact family set is mathing
# first if exact family set is matching
# make sure only interesetion of list is correct
bool(set(families).intersection(f_families)),
# and if famiies are set at all

View file

@ -15,7 +15,7 @@ class IncrementScriptVersion(pyblish.api.ContextPlugin):
def process(self, context):
assert all(result["success"] for result in context.data["results"]), (
"Publishing not succesfull so version is not increased.")
"Publishing not successful so version is not increased.")
from openpype.lib import version_up
path = context.data["currentFile"]

View file

@ -3,7 +3,7 @@ import pyblish.api
class RemoveOutputNode(pyblish.api.ContextPlugin):
"""Removing output node for each ouput write node
"""Removing output node for each output write node
"""
label = 'Output Node Remove'

View file

@ -48,7 +48,7 @@ class SelectCenterInNodeGraph(pyblish.api.Action):
@pyblish.api.log
class ValidateBackdrop(pyblish.api.InstancePlugin):
"""Validate amount of nodes on backdrop node in case user
forgoten to add nodes above the publishing backdrop node"""
forgotten to add nodes above the publishing backdrop node"""
order = pyblish.api.ValidatorOrder
optional = True

View file

@ -23,7 +23,7 @@ class RepairNukeWriteDeadlineTab(pyblish.api.Action):
for instance in instances:
group_node = [x for x in instance if x.Class() == "Group"][0]
# Remove exising knobs.
# Remove existing knobs.
knob_names = openpype.hosts.nuke.lib.get_deadline_knob_names()
for name, knob in group_node.knobs().iteritems():
if name in knob_names:

View file

@ -1,6 +1,6 @@
# -------------------------------------------------
# KnobScripter by Adrian Pueyo
# Complete python sript editor for Nuke
# Complete python script editor for Nuke
# adrianpueyo.com, 2016-2019
import string
import traceback
@ -2539,7 +2539,7 @@ class KnobScripterTextEdit(QtWidgets.QPlainTextEdit):
if self.noSelection:
self.cursor.setPosition(self.lastChar)
# check whether the the orignal selection was from top to bottom or vice versa
# check whether the the original selection was from top to bottom or vice versa
else:
if self.originalPosition == self.firstChar:
first = self.lastChar
@ -3012,7 +3012,7 @@ class KnobScripterTextEditMain(KnobScripterTextEdit):
return match_key, match_snippet
def placeholderToEnd(self, text, placeholder):
'''Returns distance (int) from the first ocurrence of the placeholder, to the end of the string with placeholders removed'''
'''Returns distance (int) from the first occurrence of the placeholder, to the end of the string with placeholders removed'''
search = re.search(placeholder, text)
if not search:
return -1
@ -3671,7 +3671,7 @@ class KnobScripterPrefs(QtWidgets.QDialog):
def updateContext():
'''
Get the current selection of nodes with their appropiate context
Get the current selection of nodes with their appropriate context
Doing this outside the KnobScripter -> forces context update inside groups when needed
'''
global knobScripterSelectedNodes