diff --git a/pype/nuke/__init__.py b/pype/nuke/__init__.py index a2b1aeda6e..912585feb8 100644 --- a/pype/nuke/__init__.py +++ b/pype/nuke/__init__.py @@ -109,12 +109,6 @@ def install(): # api.set_avalon_workdir() # reload_config() - # import sys - - # for path in sys.path: - # if path.startswith("C:\\Users\\Public"): - # sys.path.remove(path) - log.info("Registering Nuke plug-ins..") pyblish.register_plugin_path(PUBLISH_PATH) avalon.register_plugin_path(avalon.Loader, LOAD_PATH) diff --git a/pype/nuke/lib.py b/pype/nuke/lib.py index 20e7dfb210..06735fc8b0 100644 --- a/pype/nuke/lib.py +++ b/pype/nuke/lib.py @@ -3,7 +3,6 @@ import sys import os from collections import OrderedDict from pprint import pprint -from avalon.vendor.Qt import QtGui from avalon import api, io, lib import avalon.nuke import pype.api as pype @@ -20,6 +19,12 @@ self = sys.modules[__name__] self._project = None +for path in sys.path: + log.info(os.path.normpath(path)) + if "C:\\Users\\Public" in os.path.normpath(path): + log.info("_ removing from sys.path: `{}`".format(path)) + sys.path.remove(path) + def onScriptLoad(): if nuke.env['LINUX']: nuke.tcl('load ffmpegReader') @@ -472,30 +477,30 @@ def update_frame_range(start, end, root=None): else: nuke.root()[key].setValue(value) - -def get_additional_data(container): - """Get Nuke's related data for the container - - Args: - container(dict): the container found by the ls() function - - Returns: - dict - """ - - node = container["_tool"] - tile_color = node['tile_color'].value() - if tile_color is None: - return {} - - hex = '%08x' % tile_color - rgba = [ - float(int(hex[0:2], 16)) / 255.0, - float(int(hex[2:4], 16)) / 255.0, - float(int(hex[4:6], 16)) / 255.0 - ] - - return {"color": QtGui.QColor().fromRgbF(rgba[0], rgba[1], rgba[2])} +# +# def get_additional_data(container): +# """Get Nuke's related data for the container +# +# Args: +# container(dict): the container found by the ls() function +# +# Returns: +# dict +# """ +# +# node = container["_tool"] +# tile_color = node['tile_color'].value() +# if tile_color is None: +# return {} +# +# hex = '%08x' % tile_color +# rgba = [ +# float(int(hex[0:2], 16)) / 255.0, +# float(int(hex[2:4], 16)) / 255.0, +# float(int(hex[4:6], 16)) / 255.0 +# ] +# +# return {"color": Qt.QtGui.QColor().fromRgbF(rgba[0], rgba[1], rgba[2])} def get_write_node_template_attr(node):