Merge pull request #2725 from pypeclub/feature/tvpaint_ls_returns_object_name

TVPaint: Set objectName with members
This commit is contained in:
Jakub Trllo 2022-02-15 09:44:37 +01:00 committed by GitHub
commit 3118fb42d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -377,7 +377,15 @@ def _write_instances(*args, **kwargs):
def ls():
return get_workfile_metadata(SECTION_NAME_CONTAINERS)
output = get_workfile_metadata(SECTION_NAME_CONTAINERS)
if output:
for item in output:
if "objectName" not in item and "members" in item:
members = item["members"]
if isinstance(members, list):
members = "|".join(members)
item["objectName"] = members
return output
def on_instance_toggle(instance, old_value, new_value):