fix error when updating workfile from template with empty scene

This commit is contained in:
Thomas Fricard 2022-07-18 18:43:34 +02:00
parent 01f2c59049
commit e6cad709cd

View file

@ -80,7 +80,11 @@ class MayaTemplateLoader(AbstractTemplateLoader):
return [attribute.rpartition('.')[0] for attribute in attributes]
def get_loaded_containers_by_id(self):
containers = cmds.sets('AVALON_CONTAINERS', q=True)
try:
containers = cmds.sets("AVALON_CONTAINERS", q=True)
except ValueError:
return None
return [
cmds.getAttr(container + '.representation')
for container in containers]