Order of Objects in a Scene

Hello!

I have a .fbx file that contains many different objects. Those objects are a specific order and I need to maintain that order when I import that .fbx file into Blender. Here is an example of a list of objects in that file:

  • Root
    • Z
      • ZB
      • ZA
    • Y
      • YB
      • YA
    • X
      • XB
      • XA

After import, children_recursive on the Root object returns:

[bpy.data.objects['X'], bpy.data.objects['XA'], bpy.data.objects['XB'], bpy.data.objects['Y'], bpy.data.objects['YA'], bpy.data.objects['YB'], bpy.data.objects['Z'], bpy.data.objects['ZA'], bpy.data.objects['ZB]]

It seems that when objects are added to a scene, they are put in a list alphabetically.
Is there anyway to maintain the original order?

Thank you.

1 Like

I’m afraid, no. Blender organizes everything alphabetically almost everywhere. The FBX import method in the API doesn’t seem to have any options regarding this either.

Is there anything in particular you need the order information for? Maybe we could try something different.

2 Likes

I have some custom applications that do something based on the order of children of certain objects. I wanted to do the same in a Blender add-on.
I already have an alternative solution to this problem. I just wanted confirmation about the order before I pursued it.
Thank you for the answer.