Sandman13sq / DmrVBM-blender-to-gms2

Vertex Buffers from Blender to Game Maker Studio 2
25 stars 0 forks source link

Can not export anything - files are all only few bytes long #11

Closed Grisgram closed 1 month ago

Grisgram commented 1 month ago

Hi there,

I am a bit desperated, running Blender 4.1 and i can not even export a simple cube with a single-color basic material.

This is the scene incl settings image

When I export, either the script creates a duplicate of my object (which stays in scene) and crashes with

bpy.ops.vbm.export_vbm(filepath="C:\\Users\\****\\Downloads\\blue2.vb", dialog=True, filter_glob="*.vb", filename_ext=".vb", file_type='VB', items_collections=[{"name":"Collection"}], collection="", armature="", format_code="")
bpy.ops.object.select_all(action='DESELECT')
bpy.ops.object.convert(target='MESH')
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
Python: Traceback (most recent call last):
  File "C:\Users\****\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\DmrVBM_Blender\vbm_addon.py", line 1874, in execute
    vbdata = context.scene.vbm.MeshToVB(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\****\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\DmrVBM_Blender\vbm_addon.py", line 3273, in MeshToVB
    mesh.calc_normals_split()
    ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Mesh' object has no attribute 'calc_normals_split'
bpy.ops.vbm.export_vbm(filepath="C:\\Users\\****\\Downloads\\blue2.vb", dialog=True, filter_glob="*.vb", filename_ext=".vb", file_type='VB', export_meshes=True, export_skeleton=True, export_animations=True, items_collections=[{"name":"Collection"}], collection="", armature="", batching='NONE', grouping='OBJECT', format_code="POSITION3 NORMAL3 COLOR4@\"Color\"-linear UV2@\"UVMap\" TANGENT3 ", format="Native", fast_vb=False, cache_vb=True, alphanumeric_modifiers=True, mesh_delimiter_start="-", mesh_delimiter_end="", flip_uvs=True, armature_delimiter_start="-", armature_delimiter_end="", pose="", deform_only=True, add_root_bone=True, action_delimiter_start="-", action_delimiter_end="", visible_only=False, selected_only=True, alphanumeric_only=True, compression=-1, copy_textures=False, pre_script="", post_script="", use_last_props=True)

or, sometimes, it works, but the file contains more or less only null bytes: image

Any help greatly appeciated! Thanks in advance kind regards Gris

Sandman13sq commented 1 month ago

The mesh.calc_normals_split() function no longer exists in Blender 4.x. The development repository has already fixed this issue but the release version (which I see you're using via the line number error) has not been updated to Blender 4.x. I'll update the release version to match Blender. In the meantime, you can download the zip from the development repository.

Grisgram commented 1 month ago

great news! thanks for replying