Skip to content

Commit

Permalink
fix: ensure all objects in utils collection are toggled along with th…
Browse files Browse the repository at this point in the history
…e collection consistently
  • Loading branch information
tristan-hm committed Apr 11, 2022
1 parent 1d09367 commit 1316fff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions viewport/toggle_utils_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ def execute(self, context):
collection = bpy.data.collections.get(get_preferences().utils_collection_name)
if collection is not None:
collection.hide_viewport = not collection.hide_viewport
for obj in collection.all_objects:
obj.hide_set(collection.hide_viewport)
obj.hide_viewport = collection.hide_viewport

return {'FINISHED'}

Expand Down

0 comments on commit 1316fff

Please sign in to comment.