Skip to content

Commit

Permalink
fix: fix object visibility error in toggle_utils_collection operator
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-hm committed Apr 11, 2022
1 parent 5e4f8de commit 52f3ada
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion viewport/toggle_utils_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ 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_names = [obj.name for obj in collection.all_objects]
for obj_name in obj_names:
obj = bpy.data.objects[obj_name]
obj.hide_set(collection.hide_viewport)
obj.hide_viewport = collection.hide_viewport

Expand Down

0 comments on commit 52f3ada

Please sign in to comment.