fix collect plates in nukestudio

This commit is contained in:
Jakub Trllo 2019-06-10 16:40:32 +02:00
parent 5db27b706d
commit 55c369bd40

View file

@ -144,26 +144,26 @@ class CollectPlates(api.InstancePlugin):
start_frame = source_in_h start_frame = source_in_h
end_frame = source_out_h end_frame = source_out_h
if isinstance(files, list):
mov_file = head + ".mov" mov_file = head + ".mov"
mov_path = os.path.normpath(os.path.join(staging_dir, mov_file)) mov_path = os.path.normpath(os.path.join(staging_dir, mov_file))
if os.path.exists(mov_path): if os.path.exists(mov_path):
# adding mov into the representations # adding mov into the representations
self.log.debug("__ mov_path: {}".format(mov_path)) self.log.debug("__ mov_path: {}".format(mov_path))
plates_mov_representation = { plates_mov_representation = {
'files': mov_file, 'files': mov_file,
'stagingDir': staging_dir, 'stagingDir': staging_dir,
'startFrame': 0, 'startFrame': 0,
'endFrame': source_out - source_in + 1, 'endFrame': source_out - source_in + 1,
'step': 1, 'step': 1,
'frameRate': fps, 'frameRate': fps,
'preview': True, 'preview': True,
'thumbnail': False, 'thumbnail': False,
'name': "preview", 'name': "preview",
'ext': "mov", 'ext': "mov",
} }
instance.data["representations"].append( instance.data["representations"].append(
plates_mov_representation) plates_mov_representation)
thumb_file = head + ".png" thumb_file = head + ".png"
thumb_path = os.path.join(staging_dir, thumb_file) thumb_path = os.path.join(staging_dir, thumb_file)