mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge branch 'hotfix/standalone_pulbisher_skip_seq' into 2.x/develop
This commit is contained in:
commit
e8e186e82d
3 changed files with 66 additions and 54 deletions
|
|
@ -173,10 +173,21 @@ class DropDataFrame(QtWidgets.QFrame):
|
||||||
def _process_paths(self, in_paths):
|
def _process_paths(self, in_paths):
|
||||||
self.parent_widget.working_start()
|
self.parent_widget.working_start()
|
||||||
paths = self._get_all_paths(in_paths)
|
paths = self._get_all_paths(in_paths)
|
||||||
collections, remainders = clique.assemble(paths)
|
collectionable_paths = []
|
||||||
|
non_collectionable_paths = []
|
||||||
|
for path in in_paths:
|
||||||
|
ext = os.path.splitext(path)[1]
|
||||||
|
if ext in self.image_extensions:
|
||||||
|
collectionable_paths.append(path)
|
||||||
|
else:
|
||||||
|
non_collectionable_paths.append(path)
|
||||||
|
|
||||||
|
collections, remainders = clique.assemble(collectionable_paths)
|
||||||
|
non_collectionable_paths.extend(remainders)
|
||||||
for collection in collections:
|
for collection in collections:
|
||||||
self._process_collection(collection)
|
self._process_collection(collection)
|
||||||
for remainder in remainders:
|
|
||||||
|
for remainder in non_collectionable_paths:
|
||||||
self._process_remainder(remainder)
|
self._process_remainder(remainder)
|
||||||
self.parent_widget.working_stop()
|
self.parent_widget.working_stop()
|
||||||
|
|
||||||
|
|
@ -341,61 +352,62 @@ class DropDataFrame(QtWidgets.QFrame):
|
||||||
actions = []
|
actions = []
|
||||||
|
|
||||||
found = False
|
found = False
|
||||||
for item in self.components_list.widgets():
|
if data["ext"] in self.image_extensions:
|
||||||
if data['ext'] != item.in_data['ext']:
|
for item in self.components_list.widgets():
|
||||||
continue
|
if data['ext'] != item.in_data['ext']:
|
||||||
if data['folder_path'] != item.in_data['folder_path']:
|
|
||||||
continue
|
|
||||||
|
|
||||||
ex_is_seq = item.in_data['is_sequence']
|
|
||||||
|
|
||||||
# If both are single files
|
|
||||||
if not new_is_seq and not ex_is_seq:
|
|
||||||
if data['name'] == item.in_data['name']:
|
|
||||||
found = True
|
|
||||||
break
|
|
||||||
paths = list(data['files'])
|
|
||||||
paths.extend(item.in_data['files'])
|
|
||||||
c, r = clique.assemble(paths)
|
|
||||||
if len(c) == 0:
|
|
||||||
continue
|
continue
|
||||||
a_name = 'merge'
|
if data['folder_path'] != item.in_data['folder_path']:
|
||||||
item.add_action(a_name)
|
|
||||||
if a_name not in actions:
|
|
||||||
actions.append(a_name)
|
|
||||||
|
|
||||||
# If new is sequence and ex is single file
|
|
||||||
elif new_is_seq and not ex_is_seq:
|
|
||||||
if data['name'] not in item.in_data['name']:
|
|
||||||
continue
|
continue
|
||||||
ex_file = item.in_data['files'][0]
|
|
||||||
|
|
||||||
a_name = 'merge'
|
ex_is_seq = item.in_data['is_sequence']
|
||||||
item.add_action(a_name)
|
|
||||||
if a_name not in actions:
|
|
||||||
actions.append(a_name)
|
|
||||||
continue
|
|
||||||
|
|
||||||
# If new is single file existing is sequence
|
# If both are single files
|
||||||
elif not new_is_seq and ex_is_seq:
|
if not new_is_seq and not ex_is_seq:
|
||||||
if item.in_data['name'] not in data['name']:
|
if data['name'] == item.in_data['name']:
|
||||||
|
found = True
|
||||||
|
break
|
||||||
|
paths = list(data['files'])
|
||||||
|
paths.extend(item.in_data['files'])
|
||||||
|
c, r = clique.assemble(paths)
|
||||||
|
if len(c) == 0:
|
||||||
|
continue
|
||||||
|
a_name = 'merge'
|
||||||
|
item.add_action(a_name)
|
||||||
|
if a_name not in actions:
|
||||||
|
actions.append(a_name)
|
||||||
|
|
||||||
|
# If new is sequence and ex is single file
|
||||||
|
elif new_is_seq and not ex_is_seq:
|
||||||
|
if data['name'] not in item.in_data['name']:
|
||||||
|
continue
|
||||||
|
ex_file = item.in_data['files'][0]
|
||||||
|
|
||||||
|
a_name = 'merge'
|
||||||
|
item.add_action(a_name)
|
||||||
|
if a_name not in actions:
|
||||||
|
actions.append(a_name)
|
||||||
continue
|
continue
|
||||||
a_name = 'merge'
|
|
||||||
item.add_action(a_name)
|
|
||||||
if a_name not in actions:
|
|
||||||
actions.append(a_name)
|
|
||||||
|
|
||||||
# If both are sequence
|
# If new is single file existing is sequence
|
||||||
else:
|
elif not new_is_seq and ex_is_seq:
|
||||||
if data['name'] != item.in_data['name']:
|
if item.in_data['name'] not in data['name']:
|
||||||
continue
|
continue
|
||||||
if data['files'] == list(item.in_data['files']):
|
a_name = 'merge'
|
||||||
found = True
|
item.add_action(a_name)
|
||||||
break
|
if a_name not in actions:
|
||||||
a_name = 'merge'
|
actions.append(a_name)
|
||||||
item.add_action(a_name)
|
|
||||||
if a_name not in actions:
|
# If both are sequence
|
||||||
actions.append(a_name)
|
else:
|
||||||
|
if data['name'] != item.in_data['name']:
|
||||||
|
continue
|
||||||
|
if data['files'] == list(item.in_data['files']):
|
||||||
|
found = True
|
||||||
|
break
|
||||||
|
a_name = 'merge'
|
||||||
|
item.add_action(a_name)
|
||||||
|
if a_name not in actions:
|
||||||
|
actions.append(a_name)
|
||||||
|
|
||||||
if new_is_seq:
|
if new_is_seq:
|
||||||
actions.append('split')
|
actions.append('split')
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class ExtractBGForComp(pype.api.Extractor):
|
||||||
|
|
||||||
# Presetable
|
# Presetable
|
||||||
allowed_group_names = [
|
allowed_group_names = [
|
||||||
"OL", "BG", "MG", "FG", "UL", "SKY", "Field Guide", "Field_Guide",
|
"OL", "BG", "MG", "FG", "SB", "UL", "SKY", "Field Guide", "Field_Guide",
|
||||||
"ANIM"
|
"ANIM"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ PSDImage = None
|
||||||
|
|
||||||
|
|
||||||
class ExtractBGMainGroups(pype.api.Extractor):
|
class ExtractBGMainGroups(pype.api.Extractor):
|
||||||
label = "Extract Background Main Groups"
|
label = "Extract Background Layout"
|
||||||
order = pyblish.api.ExtractorOrder + 0.02
|
order = pyblish.api.ExtractorOrder + 0.02
|
||||||
families = ["backgroundLayout"]
|
families = ["backgroundLayout"]
|
||||||
hosts = ["standalonepublisher"]
|
hosts = ["standalonepublisher"]
|
||||||
|
|
@ -18,7 +18,7 @@ class ExtractBGMainGroups(pype.api.Extractor):
|
||||||
|
|
||||||
# Presetable
|
# Presetable
|
||||||
allowed_group_names = [
|
allowed_group_names = [
|
||||||
"OL", "BG", "MG", "FG", "UL", "SKY", "Field Guide", "Field_Guide",
|
"OL", "BG", "MG", "FG", "UL", "SB", "SKY", "Field Guide", "Field_Guide",
|
||||||
"ANIM"
|
"ANIM"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue