mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
Update client/ayon_core/hosts/substancepainter/api/lib.py
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
This commit is contained in:
parent
a97a33af6e
commit
ced2ac05d0
1 changed files with 7 additions and 9 deletions
|
|
@ -656,20 +656,18 @@ def get_export_presets_by_filtering(export_preset_name, channel_type_list):
|
|||
dict: export preset data
|
||||
"""
|
||||
|
||||
new_maps = []
|
||||
|
||||
export_presets = get_export_presets()
|
||||
export_preset_nice_name = export_presets[export_preset_name]
|
||||
resource_presets = substance_painter.export.list_resource_export_presets()
|
||||
preset = next(
|
||||
(
|
||||
preset for preset in resource_presets
|
||||
if preset.resource_id.name == export_preset_nice_name
|
||||
), None
|
||||
)
|
||||
if preset is None:
|
||||
for preset in resource_presets:
|
||||
if preset.resource_id.name == export_preset_nice_name:
|
||||
break
|
||||
else:
|
||||
# No matching preset found
|
||||
return {}
|
||||
|
||||
maps = preset.list_output_maps()
|
||||
new_maps = []
|
||||
for channel_map in maps:
|
||||
for n in channel_type_list:
|
||||
if not channel_map.get("fileName"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue