mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge remote-tracking branch 'upstream/develop' into enhancement/blender_new_publisher
# Conflicts: # openpype/hosts/blender/api/plugin.py # openpype/hosts/blender/plugins/create/create_blendScene.py # openpype/hosts/blender/plugins/publish/collect_instances.py # openpype/hosts/blender/plugins/publish/extract_playblast.py
This commit is contained in:
commit
5b317b4109
251 changed files with 15769 additions and 2044 deletions
|
|
@ -44,9 +44,16 @@ def get_unique_number(
|
|||
avalon_container = bpy.data.collections.get(AVALON_CONTAINERS)
|
||||
if not avalon_container:
|
||||
return "01"
|
||||
asset_groups = avalon_container.all_objects
|
||||
|
||||
container_names = [c.name for c in asset_groups if c.type == 'EMPTY']
|
||||
# Check the names of both object and collection containers
|
||||
obj_asset_groups = avalon_container.objects
|
||||
obj_group_names = {
|
||||
c.name for c in obj_asset_groups
|
||||
if c.type == 'EMPTY' and c.get(AVALON_PROPERTY)}
|
||||
coll_asset_groups = avalon_container.children
|
||||
coll_group_names = {
|
||||
c.name for c in coll_asset_groups
|
||||
if c.get(AVALON_PROPERTY)}
|
||||
container_names = obj_group_names.union(coll_group_names)
|
||||
count = 1
|
||||
name = f"{asset}_{count:0>2}_{subset}"
|
||||
while name in container_names:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue