yaelatletl / godot-jigglebones

An addon that brings jigglebones to Godot Engine 4.0.
MIT License
115 stars 4 forks source link

Reimport Support #12

Open rsandfield opened 6 months ago

rsandfield commented 6 months ago

When using jigglebones with a blender file, the bone reference breaks on reimport. Locally it looks like splitting the _ready() logic into a separate function and also calling it from on_tree_enter() solves it. The error is as follows: res://addons/jigglebones/jigglebone.gd:68 - Cannot call method 'get_bone_global_pose' on a previously freed instance.

amarraff commented 4 months ago

I'm experiencing this issue with my .glb (glTF) mesh. I reimport frequently when making new animations or mesh alterations, and it happens every time. The only solution is to delete any jiggle bones, re-import, and re-add the jigglebones. Saving a scene containing the reimported asset while this error is printing (it prints endlessly) causes Godot to crash. Happy to see that OP has already found a potential solution.

My Godot version: v4.2.1.stable.official [b09f793f5]

To be clear, this doesn't just occur when the "Reimport" button is clicked. It also happens if you overwrite the mesh's file outside the editor.