Skip to content

Commit

Permalink
Bugfix: get datablocks with filepath should skip indirect lib (ynput#134
Browse files Browse the repository at this point in the history
)

* added parent filter for library

* optimize check conditions
  • Loading branch information
kaamaurice authored Jul 6, 2023
1 parent 1a5a37f commit 027b3c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openpype/hosts/blender/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,13 @@ def get_datablocks_with_filepath(
datablock
and hasattr(datablock, "filepath")
and not datablock.is_property_readonly("filepath")
and not datablock.filepath == ""
and datablock.filepath != ""
and not datablock.library
and not datablock.is_library_indirect
and not (
isinstance(datablock, bpy.types.Library)
and datablock.parent
)
):
if relative and datablock.filepath.startswith("//"):
datablocks.add(datablock)
Expand Down

0 comments on commit 027b3c6

Please sign in to comment.