Merge pull request #134 from BigRoy/master

Improve log on validate_sequence_frames and fix LKD-22
This commit is contained in:
Roy Nieterau 2018-07-21 00:12:23 +02:00 committed by GitHub
commit 3f02eefe1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 4 deletions

View file

@ -17,12 +17,18 @@ class ValidateSequenceFrames(pyblish.api.InstancePlugin):
def process(self, instance):
collection = instance[0]
self.log.info(collection)
self.log.warning(collection)
frames = list(collection.indexes)
assert frames[0] == instance.data["startFrame"]
assert frames[-1] == instance.data["endFrame"]
current_range = (frames[0], frames[-1])
required_range = (instance.data["startFrame"],
instance.data["endFrame"])
if current_range != required_range:
raise ValueError("Invalid frame range: {0} - "
"expected: {1}".format(current_range,
required_range))
missing = collection.holes().indexes
assert not missing, "Missing frames: %s" % (missing,)

View file

@ -1,5 +1,6 @@
import pyblish.api
import colorbleed.api
import os
from collections import defaultdict
@ -26,7 +27,12 @@ class ValidateTransfers(pyblish.api.InstancePlugin):
# Collect all destination with its sources
collected = defaultdict(set)
for source, destination in transfers:
collected[destination.lower()].add(source.lower())
# Use normalized paths in comparison and ignore case sensitivity
source = os.path.normpath(source).lower()
destination = os.path.normpath(destination).lower()
collected[destination].add(source)
invalid_destinations = list()
for destination, sources in collected.items():