When I create a cube, have it select and run the script

import bpy

selection = bpy.context.selected_objects


it outputs "True".

I would have guessed that it outputs "False" but it does not. Why? My goal is to test if an object is linked from a different Blender file and because of that I cannot edit its name.


1 Answer 1


is_property_readonly is a method, and bool(method) return True

import bpy


# >>>> <built-in method is_property_readonly of Object object at 0x000001F9CA43AE40>

Check if name is read only:

# >>>> True/False

To test whether an object is editable, you can use the following function

def is_library_editable(ob):
    if hasattr(ob, "library") and ob.library:
        return False
    if hasattr(ob, 'override_library') and ob.override_library and ob.override_library.is_system_override:
        return False
    return True

If something wrong, please point them out.

  • $\begingroup$ you can check if other properties are readonly as well, in this case is the "node" an imageTextureNode node.is_property_readonly('image') $\endgroup$
    – Lala_Ghost
    Commented May 21 at 13:50

You must log in to answer this question.

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