Code from example:

import bpy

for ob in bpy.context.scene.objects:
    if not ob.hide:

Fails on ob.hide:

AttributeError: 'Object' object has no attribute 'hide'

How to solve this issue? It seems that example was written for 2.79.


1 Answer 1


Blender 2.80 use a more complicated (sound and safe for code) API to deal with some attributes.

As the object.hide in Blender 2.79 is replaced by getter and setter function:

object.hide_get() # get the hide value {True, False}
object.hide_set(True) # set hide to True

so, ob.hide needed to be replaced by ob.hide_get()


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .