General-101 / Halo-Asset-Blender-Development-Toolset

CE/H2/H3/ODST JMS/JMA/ASS exporter for Blender
https://c20.reclaimers.net/
MIT License
122 stars 21 forks source link

AttributeError: 'NoneType' object has no attribute 'collection' #93

Closed dt192 closed 6 months ago

dt192 commented 6 months ago

Was trying to test that the mirrored objects warning was gone, but getting this one now.

Traceback (most recent call last):
  File "C:\Users\dt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\io_scene_halo\global_functions\global_functions.py", line 1386, in run_code
    toolset_exec(f"""locals()['__this_is_a_horrible_hack'] = {code_string}""")
  File "C:\Users\dt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\io_scene_halo\global_functions\global_functions.py", line 1376, in toolset_exec
    exec(code, globals(), caller_locals)
  File "<string>", line 1, in <module>
  File "C:\Users\dt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\io_scene_halo\file_ass\export_ass.py", line 32, in write_file
    build_asset(context, filepath, ass_version, game_version, folder_structure, hidden_geo, nonrender_geo, apply_modifiers, triangulate_faces, loop_normals, edge_split, clean_normalize_weights, scale_value, report)
  File "C:\Users\dt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\io_scene_halo\file_ass\build_asset.py", line 37, in build_asset
    ASS = process_scene(context, version, game_version, hidden_geo, nonrender_geo, apply_modifiers, triangulate_faces, loop_normals, edge_split, clean_normalize_weights, custom_scale, report)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\dt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\io_scene_halo\file_ass\process_scene.py", line 125, in process_scene
    resource_management.gather_scene_resources(context, layer_collection_list, object_list, hidden_geo, nonrender_geo)
  File "C:\Users\dt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\io_scene_halo\global_functions\resource_management.py", line 50, in gather_scene_resources
    if layer_collection.collection.hide_render:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'collection'

mirror_test.zip

General-101 commented 6 months ago

Latest should fix that error and make the scale check less likely to give false positives with scale. d5e9eb6 Please confirm.

dt192 commented 6 months ago

Yeas, all good now, thanks.