X Tutup
Skip to content

MeshInstance3d metadata not preserved in MeshLibrary export #117248

@B3ird

Description

@B3ird

Tested versions

Reproductible in 4.6

System information

Linux - Godot 4.6

Issue description

I was looking for identifying properly several properties (destructible/ricochet/effect...) of my grid map items colliding with weapons bullets and I noticed that MeshInstance3d metadata are not accessible when exported as MeshLibrary.

Steps to reproduce

Create metadata on meshes from a MeshLibrary. Export as library to use with a gridmap. Get programmatically meshes from the grid map and try to access metadata.

Minimal reproduction project (MRP)

var gridmap: GridMap = body as GridMap
var mesh_lib: MeshLibrary = gridmap.mesh_library
var item_id = 1 #mesh id with metadata
var mesh: Mesh = mesh_lib.get_item_mesh(item_id)
var is_destructible: bool = mesh.get_meta("destructible", false) as bool #return default value

var meta_list = mesh.get_meta_list()
print("Mesh metadata keys:", meta_list) #return empty list []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup