mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
nuke: returning logging from self
This commit is contained in:
parent
a2c0e7228b
commit
0549bb68fd
1 changed files with 14 additions and 11 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import nuke
|
import nuke
|
||||||
import qargparse
|
import qargparse
|
||||||
|
from pprint import pformat
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from openpype.lib import Logger
|
from openpype.lib import Logger
|
||||||
from openpype.client import (
|
from openpype.client import (
|
||||||
|
|
@ -22,14 +23,13 @@ from openpype.hosts.nuke.api import (
|
||||||
)
|
)
|
||||||
from openpype.hosts.nuke.api import plugin
|
from openpype.hosts.nuke.api import plugin
|
||||||
|
|
||||||
log = Logger.get_logger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class LoadClip(plugin.NukeLoader):
|
class LoadClip(plugin.NukeLoader):
|
||||||
"""Load clip into Nuke
|
"""Load clip into Nuke
|
||||||
|
|
||||||
Either it is image sequence or video file.
|
Either it is image sequence or video file.
|
||||||
"""
|
"""
|
||||||
|
log = Logger.get_logger(__name__)
|
||||||
|
|
||||||
families = [
|
families = [
|
||||||
"source",
|
"source",
|
||||||
|
|
@ -99,7 +99,7 @@ class LoadClip(plugin.NukeLoader):
|
||||||
representation
|
representation
|
||||||
)
|
)
|
||||||
filepath = get_representation_path(representation).replace("\\", "/")
|
filepath = get_representation_path(representation).replace("\\", "/")
|
||||||
log.debug("_ filepath: {}".format(filepath))
|
self.log.debug("_ filepath: {}".format(filepath))
|
||||||
|
|
||||||
start_at_workfile = options.get(
|
start_at_workfile = options.get(
|
||||||
"start_at_workfile", self.options_defaults["start_at_workfile"])
|
"start_at_workfile", self.options_defaults["start_at_workfile"])
|
||||||
|
|
@ -111,8 +111,9 @@ class LoadClip(plugin.NukeLoader):
|
||||||
version_data = version.get("data", {})
|
version_data = version.get("data", {})
|
||||||
repre_id = representation["_id"]
|
repre_id = representation["_id"]
|
||||||
|
|
||||||
log.info("version_data: {}\n".format(version_data))
|
self.log.debug("_ version_data: {}\n".format(
|
||||||
log.debug(
|
pformat(version_data)))
|
||||||
|
self.log.debug(
|
||||||
"Representation id `{}` ".format(repre_id))
|
"Representation id `{}` ".format(repre_id))
|
||||||
|
|
||||||
self.handle_start = version_data.get("handleStart", 0)
|
self.handle_start = version_data.get("handleStart", 0)
|
||||||
|
|
@ -133,7 +134,7 @@ class LoadClip(plugin.NukeLoader):
|
||||||
namespace = context['asset']['name']
|
namespace = context['asset']['name']
|
||||||
|
|
||||||
if not filepath:
|
if not filepath:
|
||||||
log.warning(
|
self.log.warning(
|
||||||
"Representation id `{}` is failing to load".format(repre_id))
|
"Representation id `{}` is failing to load".format(repre_id))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -238,7 +239,7 @@ class LoadClip(plugin.NukeLoader):
|
||||||
representation
|
representation
|
||||||
)
|
)
|
||||||
filepath = get_representation_path(representation).replace("\\", "/")
|
filepath = get_representation_path(representation).replace("\\", "/")
|
||||||
log.debug("_ filepath: {}".format(filepath))
|
self.log.debug("_ filepath: {}".format(filepath))
|
||||||
|
|
||||||
start_at_workfile = "start at" in read_node['frame_mode'].value()
|
start_at_workfile = "start at" in read_node['frame_mode'].value()
|
||||||
|
|
||||||
|
|
@ -271,7 +272,7 @@ class LoadClip(plugin.NukeLoader):
|
||||||
last = first + duration
|
last = first + duration
|
||||||
|
|
||||||
if not filepath:
|
if not filepath:
|
||||||
log.warning(
|
self.log.warning(
|
||||||
"Representation id `{}` is failing to load".format(repre_id))
|
"Representation id `{}` is failing to load".format(repre_id))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -321,7 +322,7 @@ class LoadClip(plugin.NukeLoader):
|
||||||
read_node,
|
read_node,
|
||||||
updated_dict
|
updated_dict
|
||||||
)
|
)
|
||||||
log.info(
|
self.log.info(
|
||||||
"updated to version: {}".format(version_doc.get("name"))
|
"updated to version: {}".format(version_doc.get("name"))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -357,8 +358,10 @@ class LoadClip(plugin.NukeLoader):
|
||||||
time_warp_nodes = version_data.get('timewarps', [])
|
time_warp_nodes = version_data.get('timewarps', [])
|
||||||
last_node = None
|
last_node = None
|
||||||
source_id = self.get_container_id(parent_node)
|
source_id = self.get_container_id(parent_node)
|
||||||
log.info("__ source_id: {}".format(source_id))
|
self.log.debug("__ source_id: {}".format(source_id))
|
||||||
log.info("__ members: {}".format(self.get_members(parent_node)))
|
self.log.debug("__ members: {}".format(
|
||||||
|
self.get_members(parent_node)))
|
||||||
|
|
||||||
dependent_nodes = self.clear_members(parent_node)
|
dependent_nodes = self.clear_members(parent_node)
|
||||||
|
|
||||||
with maintained_selection():
|
with maintained_selection():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue