layout publish more than one container issue

This commit is contained in:
Kayla Man 2022-12-03 00:21:31 +08:00
parent f96e4f1626
commit f50fef2be8

View file

@ -40,11 +40,11 @@ class ExtractLayout(publish.Extractor):
"Please create instance with loaded asset!"
# list the children of the containers
grp_name = asset.split(':')[0]
con_sel = cmds.ls("{}*_CON".format(grp_name))
if not con_sel:
containers = cmds.ls("{}*_CON".format(grp_name))
if not containers:
assert containers == [], \
"Use all loaded contents without renaming and grouping!" # noqa
for con in con_sel:
for con in containers:
container = con
representation_id = cmds.getAttr(