mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Improve logging order and log warning when instance is empty
This commit is contained in:
parent
0057e5ed1a
commit
6905534738
1 changed files with 7 additions and 6 deletions
|
|
@ -47,12 +47,6 @@ class CollectInstances(pyblish.api.ContextPlugin):
|
|||
objectset = cmds.ls("*.id", long=True, type="objectSet",
|
||||
recursive=True, objectsOnly=True)
|
||||
for objset in objectset:
|
||||
self.log.info("Creating instance for {}".format(objset))
|
||||
|
||||
members = cmds.sets(objset, query=True)
|
||||
if members is None:
|
||||
self.log.info("Skipped empty Set: \"%s\" " % objset)
|
||||
continue
|
||||
|
||||
if not cmds.attributeQuery("id", node=objset, exists=True):
|
||||
continue
|
||||
|
|
@ -68,6 +62,13 @@ class CollectInstances(pyblish.api.ContextPlugin):
|
|||
exists=True)
|
||||
assert has_family, "\"%s\" was missing a family" % objset
|
||||
|
||||
members = cmds.sets(objset, query=True)
|
||||
if members is None:
|
||||
self.log.warning("Skipped empty instance: \"%s\" " % objset)
|
||||
continue
|
||||
|
||||
self.log.info("Creating instance for {}".format(objset))
|
||||
|
||||
data = dict()
|
||||
|
||||
# Apply each user defined attribute as data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue