Skip to content

Instantly share code, notes, and snippets.

@carter2422
Last active August 29, 2015 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carter2422/3c61ce6d96c6c2e07699 to your computer and use it in GitHub Desktop.
Save carter2422/3c61ce6d96c6c2e07699 to your computer and use it in GitHub Desktop.
Unhide objects and keep them unselected.
bl_info = {
"name": "Alternate Object Hiding",
"author": "Jonathan Williamson",
"version": (1, 0),
"blender": (2, 65, 0),
"location": "View3D",
"description": "Unhides objects while keeping them deselected",
"warning": "",
"wiki_url": "",
"category": "Object"}
import bpy
class AlternateUnhide(bpy.types.Operator):
'''Unhide objects in the current scene while keeping them deselected.'''
bl_idname = "objects.alternate_unhide"
bl_label = "Unhide Objects and Keep Deselected"
def execute(self, context):
scene = context.scene
unhide_objects(scene)
return {'FINISHED'}
def unhide_objects(scene):
for obj in scene.objects:
if obj.hide == True:
obj.hide = False
def register():
bpy.utils.register_class(AlternateUnhide)
def unregister():
bpy.utils.unregister_class(AlternateUnhide)
if __name__ == "__main__":
register()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment