Skip to content

allButOneCollection in ArmaTools.py fails with empty list #68

@computerchemist

Description

@computerchemist

Running Blender 4.3 with latest Armatools- a p3d that loads OK with previous legacy ArmaTools in 3.6 and loads OK in ObjectBuilder, fails when it's trying to access a null list to get first_name set in latest version as it's importing.
This was my workaround hack, not sure what that does elsewhere tho:

def allButOneCollection(context):
colls = context.collection.children_recursive
#DAVE FIX
if not colls:
return
#END DAVE FIX
first_name = colls[0].name`

I haven't submitted it as a merge request because I realize I'm leaving first_name potentially undefined somewhere else. But now it loads OK and saves OK (for me). Not sure whether having no collection is a bug for my p3d, or an edge case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions