Skip to content

Commit

Permalink
Fix: test datablock exists before restoring fake user (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tilix4 committed Sep 20, 2023
1 parent 50edbc4 commit cd63912
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openpype/hosts/blender/api/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,8 @@ def execute(self, context):
# Remove from datablocks and restore original fake user state
d_ref_index = op_instance.datablock_refs.find(self.datablock_name)
d_ref = op_instance.datablock_refs[d_ref_index]
d_ref.datablock.use_fake_user = d_ref.keep_fake_user
if d_ref.datablock:
d_ref.datablock.use_fake_user = d_ref.keep_fake_user
op_instance.datablock_refs.remove(d_ref_index)

# Ensure active index is not out of range after deletion
Expand Down

0 comments on commit cd63912

Please sign in to comment.