Selecting objects (meshes) in Blender 2.8 Python API

According to Blender 2.8 Python API changes mesh (object) can be selected with using getters and setters.

When trying to check the selected status of the mesh through the “bpy.context.active_object.select” property, Blender throws an error:

AttributeError: ‘Object’ object has no attribute ‘select’

To check whether an object is selected in Blender 2.8 use a getter:

To select an object in Blender 2.8 use a setter:

To unselect an object use the same setter:

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments