From d19023f3b2fc1102c5fe595f2b387ba91f6c91db Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Mon, 11 Mar 2019 19:37:30 +0100 Subject: [PATCH] removed frames regex (not used) --- pype/ftrack/actions/action_djvview.py | 33 --------------------------- 1 file changed, 33 deletions(-) diff --git a/pype/ftrack/actions/action_djvview.py b/pype/ftrack/actions/action_djvview.py index 683f8d1d09..9c9c593855 100644 --- a/pype/ftrack/actions/action_djvview.py +++ b/pype/ftrack/actions/action_djvview.py @@ -184,7 +184,6 @@ class DJVViewAction(BaseHandler): # Launching application if "values" in event["data"]: filename = event['data']['values']['path'] - file_type = filename.split(".")[-1] # TODO Is this proper way? try: @@ -192,38 +191,6 @@ class DJVViewAction(BaseHandler): except Exception: fps = 24 - # TODO issequence is probably already built-in validation in ftrack - isseq = re.findall('%[0-9]*d', filename) - if len(isseq) > 0: - if len(isseq) == 1: - frames = [] - padding = re.findall('%[0-9]*d', filename).pop() - index = filename.find(padding) - - full_file = filename[0:index-1] - file = full_file.split(os.sep)[-1] - folder = os.path.dirname(full_file) - - for fname in os.listdir(path=folder): - if fname.endswith(file_type) and file in fname: - frames.append(int(fname.split(".")[-2])) - - if len(frames) > 0: - start = min(frames) - end = max(frames) - - range = (padding % start) + '-' + (padding % end) - filename = re.sub('%[0-9]*d', range, filename) - else: - msg = ( - 'DJV View - Filename has more than one' - ' sequence identifier.' - ) - return { - 'success': False, - 'message': (msg) - } - cmd = [] # DJV path cmd.append(os.path.normpath(self.djv_path))