flame: improving loading with exception

This commit is contained in:
Jakub Jezek 2022-03-24 17:47:06 +01:00
parent cde1caaa91
commit 4cfd22b639
No known key found for this signature in database
GPG key ID: D8548FBF690B100A

View file

@ -97,7 +97,13 @@ class IntegrateBatchGroup(pyblish.api.InstancePlugin):
)
if Loader:
# load to flame by representation context
op_pipeline.load.load_with_repre_context(Loader, repre_context)
try:
op_pipeline.load.load_with_repre_context(
Loader, repre_context)
except op_pipeline.load.IncompatibleLoaderError as msg:
self.log.error(
"Check allowed representations for Loader `{}` "
"in settings > error: {}".format(Loader.__name__, msg))
else:
self.log.warning(
"Something got wrong and there is not Loader found for "