Archived
0
0

Fix error on Blender 2.80.61 11/05/2019. error hide_instance

This commit is contained in:
2019-05-12 10:29:50 +00:00
parent 0815336ff8
commit f6d2ac1fe7

View File

@@ -197,7 +197,7 @@ class ARMATURE_OT_reset_deformers(bpy.types.Operator):
bpy.ops.object.mode_set(mode='OBJECT')
old_active = bpy.context.active_object
old_selected = bpy.context.selected_objects
old_visible_collections = [coll.name for coll in bpy.data.collections if coll.hide_instance == False ]
old_visible_collections = [coll.name for coll in bpy.data.collections if coll.hide_viewport == False ]
for ob in old_selected:
ob.select_set(False)
@@ -217,7 +217,7 @@ class ARMATURE_OT_reset_deformers(bpy.types.Operator):
deformers_collection.append(coll.name)
for coll in bpy.data.collections:
if coll.name in deformers_collection:
coll.hide_instance = False
coll.hide_viewport = False
ob.select_set(True)
selected_deformers.append(ob.name)
@@ -234,10 +234,10 @@ class ARMATURE_OT_reset_deformers(bpy.types.Operator):
for ob in bpy.context.selected_objects:
ob.select_set(False)
for coll in bpy.data.collections:
coll.hide_instance = True
coll.hide_viewport = True
for coll in bpy.data.collections:
if coll.name in old_visible_collections:
coll.hide_instance = False
coll.hide_viewport = False
bpy.context.view_layer.objects.active = old_active
for ob in old_selected:
ob.select_set(True)