Skip to main content
Became Hot Network Question
edited tags
Link
Source Link
Christoph Werner
  • 2.1k
  • 1
  • 17
  • 34

Blender Python: How to test for "selectable" objects in viewport?

Is there a way to check if objects are selectable in Blender Python?

The code below checks if an object is visible, but is there also something to check if an object is also selectable in viewport?

Example for checking if visible:

if obj.visible_get():
    # Do something...

The reason is: If you set off the "Object Types Selectibility" for Meshes, then they can still be selected using python or in the outliner. See my shot, which area I mean.

enter image description here