vini-guerrero / godot_game_tools

This is a blender add-on that contains tools to ease the creation/import process of assets into Godot Game Engine
GNU General Public License v2.0
364 stars 34 forks source link

v2.0.5 still import only 1 mesh #39

Open corealt044 opened 3 years ago

corealt044 commented 3 years ago

Hello, for some reason for me v2.0.5 still only import 1 mesh. I did change the source code and now it works. but I'm wondering if it's save to do that. I've modified from this;

    if characterArmature != None or characterArmature.type in ["ARMATURE"]:            
        bpy.data.objects[characterArmature.name][armature_key] = armature_key            
        if len(characterArmature.children) > 0:
            for mesh in characterArmature.children: 
                bpy.data.objects[mesh.name][armature_key] = armature_key

into this;

    if characterArmature != None or characterArmature.type in ["ARMATURE"]:
        for mesh in characterArmature.children: 
            bpy.data.objects[mesh.name][armature_key] = armature_key

Will someone tell me if this is fine and won't cause any problem? I'm new to programming and was changing the code just to make that one feature work.

p/s sorry if I shouldn't be posting here, never use this website before.