Skip to content

Commit

Permalink
FIX: worlds not clear on build when 'clear current scene' checked (#55)
Browse files Browse the repository at this point in the history
* FIX: worlds not clear on build when 'clear current scene' checked

* Update openpype/hosts/blender/api/ops.py

Co-authored-by: Félix David <felixg.david@gmail.com>

---------

Co-authored-by: Félix David <felixg.david@gmail.com>
  • Loading branch information
Decnox and Tilix4 committed Dec 12, 2023
1 parent f314d09 commit 968ed8d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openpype/hosts/blender/api/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,11 @@ def _build_first_workfile(self, clear_scene: bool, save_as: bool):
):
pass
# clear all libraries
for library in list(bpy.data.libraries):
for library in bpy.data.libraries:
bpy.data.libraries.remove(library)
# Clear all worlds
for world in bpy.data.worlds:
bpy.data.worlds.remove(world)

print("Build Workfile")
build_workfile()
Expand Down

0 comments on commit 968ed8d

Please sign in to comment.