mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fix(nuke): improving loaders
This commit is contained in:
parent
391861da41
commit
81662d4edd
2 changed files with 11 additions and 4 deletions
|
|
@ -112,6 +112,7 @@ class LoadMov(api.Loader):
|
||||||
)
|
)
|
||||||
version = context['version']
|
version = context['version']
|
||||||
version_data = version.get("data", {})
|
version_data = version.get("data", {})
|
||||||
|
repr_id = context["representation"]["_id"]
|
||||||
|
|
||||||
orig_first = version_data.get("frameStart")
|
orig_first = version_data.get("frameStart")
|
||||||
orig_last = version_data.get("frameEnd")
|
orig_last = version_data.get("frameEnd")
|
||||||
|
|
@ -120,12 +121,16 @@ class LoadMov(api.Loader):
|
||||||
first = orig_first - diff
|
first = orig_first - diff
|
||||||
last = orig_last - diff
|
last = orig_last - diff
|
||||||
|
|
||||||
handle_start = version_data.get("handleStart")
|
handle_start = version_data.get("handleStart", 0)
|
||||||
handle_end = version_data.get("handleEnd")
|
handle_end = version_data.get("handleEnd", 0)
|
||||||
|
|
||||||
colorspace = version_data.get("colorspace")
|
colorspace = version_data.get("colorspace")
|
||||||
repr_cont = context["representation"]["context"]
|
repr_cont = context["representation"]["context"]
|
||||||
|
|
||||||
|
self.log.debug(
|
||||||
|
"Representation id `{}` ".format(repr_id))
|
||||||
|
|
||||||
|
context["representation"]["_id"]
|
||||||
# create handles offset (only to last, because of mov)
|
# create handles offset (only to last, because of mov)
|
||||||
last += handle_start + handle_end
|
last += handle_start + handle_end
|
||||||
# offset should be with handles so it match orig frame range
|
# offset should be with handles so it match orig frame range
|
||||||
|
|
@ -138,7 +143,6 @@ class LoadMov(api.Loader):
|
||||||
file = self.fname
|
file = self.fname
|
||||||
|
|
||||||
if not file:
|
if not file:
|
||||||
repr_id = context["representation"]["_id"]
|
|
||||||
self.log.warning(
|
self.log.warning(
|
||||||
"Representation id `{}` is failing to load".format(repr_id))
|
"Representation id `{}` is failing to load".format(repr_id))
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,11 @@ class LoadSequence(api.Loader):
|
||||||
|
|
||||||
version = context['version']
|
version = context['version']
|
||||||
version_data = version.get("data", {})
|
version_data = version.get("data", {})
|
||||||
|
repr_id = context["representation"]["_id"]
|
||||||
|
|
||||||
self.log.info("version_data: {}\n".format(version_data))
|
self.log.info("version_data: {}\n".format(version_data))
|
||||||
|
self.log.debug(
|
||||||
|
"Representation id `{}` ".format(repr_id))
|
||||||
|
|
||||||
self.first_frame = int(nuke.root()["first_frame"].getValue())
|
self.first_frame = int(nuke.root()["first_frame"].getValue())
|
||||||
self.handle_start = version_data.get("handleStart", 0)
|
self.handle_start = version_data.get("handleStart", 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue