[PYTHON] Blender has no object selection order

In Maya etc.

string $sl[] = `ls -sl`;

Then, the object names will be added to the array in the selected order.

However, Blender doesn't have a selection order, so the order in the array seems to be texto. I want you to make it in order.

Instead, get the last selected object with the following command The last selected object is active and can be retrieved with this

bpy.context.active_object

All selected objects

bpy.context.selected_objects

Since it can be obtained with, it is necessary to combine these.

Personal notes

Recommended Posts

Blender has no object selection order
AttributeError:'NoneType' object has no attribute'loader'
With xmpppy'_ssl._SSLSocket' object has no attribute'issuer'
[Python] Attribute Error:'list' object has no attribute'replace'
When'DataFrame' object has no attribute'ix' appears in pandas
Django "Query Set, Object has no attribute'foo'" solution
AttributeError: I was addicted to'module' object has no attribute'MyTestCase'