Skip to content

[Bug] Material export bug #103

@MrClock8163

Description

@MrClock8163

Blender version

v4.5

Add-on version

Release

Description

Transferred from discussion thread by @EBER-Monsterframe

I try since 3 weeks now to get into all this stuff and headed to an point where I really need help.
I now know how all softwares behind baking and textures work but Im not able to implement them
into Arma. I made it once but failed at more then 10 trys.
Its also creating .rvmat but this isnt part of the plugin so my plugin pointed problem is
that Im not able to export any .p3d at the moment.

And of course Ive validated everything
I also watched all videos twice and started then progressing so I now can speak with you meanwhile but not be able to bring it allive

Ive attached my current error also my .blend file
PreProjekt.zip

Steps to reproduce

  1. Create LOD object
  2. Try to export without materials

Stack trace

P3D export to D:\PreProjekt.p3d
        Preprocessing done in 0.045770 sec
        Detected 6 LOD objects
        File type: MLOD
        File version: 257
        Processing LOD data:
                LOD 1: visualLOD
                        Type: Resolution 1
                        Processing data:
                                Collected vertex normals
                                Collected vertices
Traceback (most recent call last):
  File "C:\Users\Vekkerur\AppData\Roaming\Blender Foundation\Blender\5.0\extensions\user_default\Arma3ObjectBuilder\ui\import_export_p3d.py", line 330, in execute
    lod_count, exported_count = export_p3d.write_file(self, context, file, temp_collection)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vekkerur\AppData\Roaming\Blender Foundation\Blender\5.0\extensions\user_default\Arma3ObjectBuilder\io\export_p3d.py", line 703, in write_file
    new_lod = process_lod(operator, lod, proxy_lookup, is_valid, processed_signatures, logger)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vekkerur\AppData\Roaming\Blender Foundation\Blender\5.0\extensions\user_default\Arma3ObjectBuilder\io\export_p3d.py", line 639, in process_lod
    output.faces = process_faces(obj, bm, normals_lookup_dict, operator.relative_paths)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vekkerur\AppData\Roaming\Blender Foundation\Blender\5.0\extensions\user_default\Arma3ObjectBuilder\io\export_p3d.py", line 462, in process_faces
    output.append([verts, normals, uvs, *materials[face.material_index], face[flag_layer]])
                                         ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: -1

Contact details

No response

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions