Post #4650: >>> C.active_object.select_get(
📋 Metadata
- Author: Pluglug
- Date: 2023-03-24 02:51:08
- Type:
answer - Quality Score: 7/10
- Reply to: post_04648
- Replies (1): post_04651
🏷️ Tags
python-scripting intermediate solved
⚙️ Related PME Features
- Python Scripting
- Macro Editor
💬 Content
C.active_object.select_get( select_get() Object.select_get(view_layer=None) Test if the object is selected. The selection state is per view layer >>> C.active_object.select_get() False
You can check the selection status of the object with the select_get() function.
ao = C.active_object; return ao and ao.type == 'GPENCIL' and ao.select_get()
Try this.