godotengine / collada-exporter

"Better" Collada exporter for Blender, orignally developed by the Godot Engine community
https://godotengine.org
GNU General Public License v2.0
417 stars 131 forks source link

Bone Names are not exported #67

Open StanleySweet opened 6 years ago

StanleySweet commented 6 years ago

Hey there,

I'm one of 0 A.D.'s devs I might have met some of you in Lyon this year, and I have an issue with the script. I'm using a script I made there to generate game specific skeletons for my game, and when using the default exporter it works fine, but when doing so with yours it messes up every name by generic ones is it something I'm doing wrong ? (Since it messes up names I can't use it for the game)

https://github.com/StanleySweet/0AD-Skeleton-Generator

StanleySweet commented 6 years ago

To be more specific here is the same dae in the zip file with both exporters For some reason Blender now adds the armature name too. I fixed that in the next commit I'll make to my script Original Exporter

                            <bone name="Deer01_Deer01_Head">
                                <bone name="Deer01_Deer01_Ponytail1">
                                    <bone name="Deer01_Deer01_Ponytail1Nub"></bone>
                                </bone>
                                <bone name="Deer01_Deer01_Ponytail2">
                                    <bone name="Deer01_Deer01_Ponytail2Nub"></bone>
                                </bone>
                                <bone name="Deer01_Deer01_HeadNub"></bone>
                            </bone>

With Godot Exporter

                            <bone name="id-bone-8">
                                <bone name="id-bone-9">
                                    <bone name="id-bone-10"></bone>
                                </bone>
                                <bone name="id-bone-11">
                                    <bone name="id-bone-12"></bone>
                                </bone>
                                <bone name="id-bone-13"></bone>
                                <bone name="id-bone-14"></bone>
                            </bone>

Maybe that's because I'm using ids instead of names Deer.zip

setzer22 commented 4 years ago

I also have encountered this issue. Is there any known workaround I could do to fix this in the meantume?

I've just named my bones manually in blender but when using assimp to load my model I cannot see the original bone names.

EDIT It seems my problem is slightly different. In my export, no <bone> tags are generated, and the <node> tags in <visual_scene> have both name and id fields. The problem is assimp ignores the name and uses the id directly. Since all the information is there in the XML, I've set up a custom auxiliary parser to work around this limitation in the meantime.