diff --git a/openpype/tools/push_to_project/control_integrate.py b/openpype/tools/push_to_project/control_integrate.py index 7ad2e1e874..522d0f7a31 100644 --- a/openpype/tools/push_to_project/control_integrate.py +++ b/openpype/tools/push_to_project/control_integrate.py @@ -409,7 +409,10 @@ class ProjectPushRepreItem: filepath_template = file_info["path"].replace("\\", "/") filepath = filepath_template.format(root=self._roots) dirpath, basename = os.path.split(filepath_template) - if dirpath != src_dirpath or not src_basename_regex.match(basename): + if ( + dirpath != src_dirpath + or not src_basename_regex.match(basename) + ): relative_dir = dirpath.replace(src_dirpath, "") if relative_dir: relative_path = "/".join([relative_dir, basename]) diff --git a/openpype/tools/push_to_project/window.py b/openpype/tools/push_to_project/window.py index 5dea0401cb..c43ecad160 100644 --- a/openpype/tools/push_to_project/window.py +++ b/openpype/tools/push_to_project/window.py @@ -1,4 +1,3 @@ -import re import collections from qtpy import QtWidgets, QtGui, QtCore