Post #1579: Hi, you can try something like this:
📋 Metadata
- Author: roaoao
- Date: 2018-10-05 16:15:35
- Type:
answer - Quality Score: 8/10
- Reply to: post_01577
🏷️ Tags
macro scripting intermediate solved
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 Content
Hi, you can try something like this:
O.pose.select_all(action='DESELECT'); bones = ["hand", "leg"]; [setattr(C.object.data.bones[b], "select", True) and bones.clear() for b in bones if b in C.object.data.bones]
Or same code in external file:
O.pose.select_all(action='DESELECT')
bones = ["hand", "leg"]
for b in bones:
if b in C.object.data.bones:
C.object.data.bones[b].select = True
break