blender2ogre icon indicating copy to clipboard operation
blender2ogre copied to clipboard

Blender 3.2 crash on mesh import

Open david-wm-sanders opened this issue 2 years ago • 3 comments

# Blender 3.2.0, Commit date: 2022-06-08 10:22, Hash e05e1e369187
bpy.ops.object.delete(use_global=False)  # Operator
bpy.context.space_data.recent_folders_active = 0  # Property
bpy.data.window_managers["WinMan"].(null) = True  # Property
Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\addons\io_ogre\ui\importer.py", line 184, in execute
    ogre_import.load(os.path.join(target_path, target_file_name))
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\addons\io_ogre\ogre\ogre_import.py", line 1337, in load
    bCreateMesh(meshData, folder, onlyName, pathMeshXml)
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\addons\io_ogre\ogre\ogre_import.py", line 776, in bCreateMesh
    subObjs = bCreateSubMeshes(meshData, name)
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\addons\io_ogre\ogre\ogre_import.py", line 1021, in bCreateSubMeshes
    me.vertices[i].normal = Vector((normals[i][0],normals[i][1],normals[i][2]))
AttributeError: bpy_struct: attribute "normal" from "MeshVertex" is read-only  # Error
bpy.ops.ogre.import_mesh(filepath="C:\\Program Files (x86)\\Steam\\steamapps\\common\\RunningWithRifles\\media\\packages\\vanilla\\models\\apc.mesh", IM_Vx_ENABLE_LOGGING=True)  # Operator

david-wm-sanders avatar Jun 18 '22 23:06 david-wm-sanders

Workaround: disable "import normals" in the importer options

david-wm-sanders avatar Jun 18 '22 23:06 david-wm-sanders

Workaround: disable "import normals" in the importer options

Did not help:

    'IMPORT_NORMALS' : False,
    'MERGE_SUBMESHES' : False,
    'IMPORT_ANIMATIONS' : False,
    'ROUND_FRAMES' : False,
    'USE_SELECTED_SKELETON' : False,
    'IMPORT_SHAPEKEYS' : False

Albeoris avatar Jun 26 '22 18:06 Albeoris

Workaround: disable "import normals" in the importer options

Oh, sorry. Everything is ok. Need to disable "import normals" in the UI, not in config. x.x

Albeoris avatar Jun 26 '22 18:06 Albeoris

This is an issue with Blender 3.2, you can bypass this by using a version older than Apr 25, 2022.

This is the commit that broke our code: Mesh: Make vertex normal property read-only

If you need to import the normals that could be a workaround until we fix this.

sercero avatar Jan 02 '23 19:01 sercero