mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
handle invalid file type
This commit is contained in:
parent
6e127d273c
commit
535aa5b29b
1 changed files with 6 additions and 1 deletions
|
|
@ -41,7 +41,12 @@ def get_alembic_paths_by_property(filename, attr, verbose=False):
|
|||
filename = filename.replace("\\", "/")
|
||||
filename = str(filename) # path must be string
|
||||
|
||||
archive = alembic.Abc.IArchive(filename)
|
||||
try:
|
||||
archive = alembic.Abc.IArchive(filename)
|
||||
except RuntimeError:
|
||||
# invalid alembic file - probably vrmesh
|
||||
log.warning("{} is not an alembic file".format(filename))
|
||||
return {}
|
||||
root = archive.getTop()
|
||||
|
||||
iterator = list(root.children)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue