Python error importing FBX file #83467

Closed
opened 2020-12-06 13:54:19 +01:00 by Mason Wheeler · 27 comments

System Information
Operating system: Windows 10
Graphics card: NVIDIA GeForce RTX 2070 SUPER

Blender Version
Broken: 2.91, downloaded from blender.org

Importing a FBX model downloaded from Unity asset store causes a Python traceback error and results in an incomplete import.

Exact steps for others to reproduce the error

Go to File -> Import -> FBX. Find the dragon model in "\Assets\InfinityPBR_InfinityPBR - Dragons\Models\Dragon_Master05 DEMO.FBX" under your Unity project and import it.

Expected: This should import.
Observed: It imports about halfway, then throws a Python error. There are no textures and no animations.

Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx_init_.py", line 216, in execute
if import_fbx.load(self, context, filepath=path, **keywords) == {'FINISHED'}:
File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx\import_fbx.py", line 2849, in load
_(); del _
File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx\import_fbx.py", line 2846, in _
root_helper.link_hierarchy(fbx_tmpl, settings, scene)
File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx\import_fbx.py", line 2341, in link_hierarchy
child.link_hierarchy(fbx_tmpl, settings, scene)
File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx\import_fbx.py", line 2297, in link_hierarchy
(mmat, amat) = mesh.armature_setup[self]
KeyError: DragonRoot
location: :-1

(Sorry about the somewhat involved process for obtaining the model. I don't know if there are any simpler models that reproduce the problem, and I can't exactly attach the model to a bug report because copyright.)

**System Information** Operating system: Windows 10 Graphics card: NVIDIA GeForce RTX 2070 SUPER **Blender Version** Broken: 2.91, downloaded from blender.org Importing a FBX model downloaded from Unity asset store causes a Python traceback error and results in an incomplete import. **Exact steps for others to reproduce the error** - Purchase the InfinityPBR Dragons asset from the Unity Asset Store, at https://assetstore.unity.com/packages/3d/characters/creatures/dragons-45330 . (Wow, I swear it wasn't that expensive when I got it last year!) - Import it in Unity to extract the files. - Open Blender. - Delete the default cube. # Go to File -> Import -> FBX. Find the dragon model in "\Assets\InfinityPBR\_InfinityPBR - Dragons\Models\Dragon_Master05 DEMO.FBX" under your Unity project and import it. Expected: This should import. Observed: It imports about halfway, then throws a Python error. There are no textures and no animations. > Python: Traceback (most recent call last): > File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx\__init__.py", line 216, in execute > if import_fbx.load(self, context, filepath=path, **keywords) == {'FINISHED'}: > File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx\import_fbx.py", line 2849, in load > _(); del _ > File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx\import_fbx.py", line 2846, in _ > root_helper.link_hierarchy(fbx_tmpl, settings, scene) > File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx\import_fbx.py", line 2341, in link_hierarchy > child.link_hierarchy(fbx_tmpl, settings, scene) > File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\addons\io_scene_fbx\import_fbx.py", line 2297, in link_hierarchy > (mmat, amat) = mesh.armature_setup[self] > KeyError: DragonRoot > location: <unknown location>:-1 (Sorry about the somewhat involved process for obtaining the model. I don't know if there are any simpler models that reproduce the problem, and I can't exactly attach the model to a bug report because copyright.)
Author

Added subscriber: @Stormhunter_Studios

Added subscriber: @Stormhunter_Studios

Added subscriber: @rjg

Added subscriber: @rjg

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

I'm sorry, we won't be purchasing a model to reproduce the issue. Please try to create a minimal example file that you can share freely.

I'm sorry, we won't be purchasing a model to reproduce the issue. Please try to create a minimal example file that you can share freely.
Author

How exactly am I supposed to create an example, when the problem is in your FBX importer? Are you asking me to purchase Maya?

How exactly am I supposed to create an example, when the problem is in your FBX importer? Are you asking me to purchase Maya?

@Stormhunter_Studios For instance you could try to find another FBX that has the same problem but is freely accessible or inspect the structure of the FBX in another application that is able to open it. Apparently Blender expects a DragonRoot to be part of the armature but is unable to load it properly. This could be because Blender handles the file improperly or because the FBX is not following the specification. You could also try if previous versions of Blender can successfully import the file.

All bug reports need to provide the necessary information and files that allow us to reproduce the issue.

@Stormhunter_Studios For instance you could try to find another FBX that has the same problem but is freely accessible or inspect the structure of the FBX in another application that is able to open it. Apparently Blender expects a `DragonRoot` to be part of the armature but is unable to load it properly. This could be because Blender handles the file improperly or because the FBX is not following the specification. You could also try if [previous versions of Blender ](https://download.blender.org/release/) can successfully import the file. All bug reports need to provide the necessary information and files that allow us to reproduce the issue.
Author

DragonRoot is the root bone of the armature for this model. It's present, and in fact it actually shows up in Blender after the failed import. The file is correctly structured as far as I can tell. It imports without any problems in both Unity and Unreal, at the very least.

I've contacted the author and asked him to weigh in on this. If available, he'd be far more helpful to you on this than I can be.

DragonRoot is the root bone of the armature for this model. It's present, and in fact it actually shows up in Blender after the failed import. The file is correctly structured as far as I can tell. It imports without any problems in both Unity and Unreal, at the very least. I've contacted the author and asked him to weigh in on this. If available, he'd be far more helpful to you on this than I can be.
Author

After speaking with the author, he encouraged me to submit the FBX file here. So here you go. With this you should be able to reproduce the problem. It's literally as simple as running the FBX importer on this file, under the default settings. (Preferably in your Python IDE of choice with the debugger attached.)

Dragon_Master05 DEMO.zip

After speaking with the author, he encouraged me to submit the FBX file here. So here you go. With this you should be able to reproduce the problem. It's literally as simple as running the FBX importer on this file, under the default settings. (Preferably in your Python IDE of choice with the debugger attached.) [Dragon_Master05 DEMO.zip](https://archive.blender.org/developer/F9481692/Dragon_Master05_DEMO.zip)

@Stormhunter_Studios Thank you for the file, we will look at this tomorrow.

@Stormhunter_Studios Thank you for the file, we will look at this tomorrow.

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

I can reproduce the problem with the provided file, I'll investigate.

I can reproduce the problem with the provided file, I'll investigate.

When trying to access mesh.armature_setup[self] in link_hierarchy() the entries for the some keys do not exist when trying to import the provided file. Therefore, accessing the dictionary like this results in the error described in the bug report. The meshes for which an entry is missing, are:

BridleHeadB
HeadA
BridleHeadA
HeadB
HeadC
BridleHeadC

The listed names are the content of their respective .fbx_name. The missing entry for all those meshes is the DragonRoot☺Model. I have yet to identify why these keys aren't set in the dictionary and whether this is an issue with the file or the importer.

There are multiple times where the helper_node.armature is None when entries are created with mesh_node.armature_setup[helper_node.armature] = (mesh_matrix, armature_matrix) in load(). The following helper_nodes have an helper_node.armature of NULL:

LLegToe3
LLegToe31
LLegToe2
LLegToe21
LLegToe1
LLegToe12
RLegToe1
RLegToe12
RLegToe2
RLegToe21
RLegToe3
RLegToe31
English DragonLArmCollarbone
English DragonLArmCollarbone
English DragonLArmCollarbone
English DragonLArmCollarbone
English DragonLArmCollarbone
English DragonLArmCollarbone
English DragonLArmCollarbone
English DragonLArmCollarbone
English DragonLArm1
English DragonLArm1
English DragonLArm1
English DragonLArm1
English DragonLArm1
English DragonLArm1
English DragonLArm2
English DragonLArm2
English DragonLArm2
English DragonLArm3
English DragonLArmPalm
LHandToe3
LHandToe31
LHandToe2
LHandToe21
LHandToe1
LHandToe12
English DragonRArmCollarbone
English DragonRArmCollarbone
English DragonRArmCollarbone
English DragonRArmCollarbone
English DragonRArmCollarbone
English DragonRArmCollarbone
English DragonRArmCollarbone
English DragonRArm1
English DragonRArm1
English DragonRArm1
English DragonRArm1
English DragonRArm1
English DragonRArm2
English DragonRArm2
English DragonRArm2
English DragonRArm3
English DragonRArmPalm
RHandToe1
RHandToe12
RHandToe2
RHandToe21
RHandToe3
RHandToe31
English DragonLWingCollarbone
English DragonLWingCollarbone
English DragonLWingCollarbone
English DragonLWingCollarbone
English DragonLWingCollarbone
English DragonLWingCollarbone
English DragonLWingCollarbone
English DragonLWingCollarbone
English DragonLWing1
English DragonLWing1
English DragonLWing1
English DragonLWing2
English DragonLW11
English DragonLW12
English DragonLW13
English DragonWthumbL
English DragonLW21
English DragonLW22
English DragonLW23
English DragonLW31
English DragonLW32
English DragonLW33
English DragonLW41
English DragonLW42
English DragonLW43
English DragonRWingCollarbone
English DragonRWingCollarbone
English DragonRWingCollarbone
English DragonRWingCollarbone
English DragonRWingCollarbone
English DragonRWingCollarbone
English DragonRWingCollarbone
English DragonRWingCollarbone
English DragonRWingCollarbone
English DragonRWing1
English DragonRWing1
English DragonRWing1
English DragonRWing1
English DragonRWing1
English DragonRWing2
English DragonRW11
English DragonRW12
English DragonRW13
English DragonWthumbR
English DragonRW21
English DragonRW22
English DragonRW23
English DragonRW31
English DragonRW32
English DragonRW33
English DragonRW41
English DragonRW42
English DragonRW43
English DragonNeck1
English DragonNeck1
English DragonNeck1
English DragonNeck1
English DragonNeck1
English DragonNeck1
English DragonNeck1
English DragonNeck1
English DragonNeck1
English DragonNeck2
English DragonNeck2
English DragonNeck2
English DragonNeck2
English DragonNeck2
English DragonNeck2
English DragonNeck2
English DragonNeck3
English DragonNeck3
English DragonNeck3
English DragonNeck3
English DragonNeck3
English DragonNeck3
English DragonNeck3
English DragonNeck4
English DragonNeck4
English DragonNeck4
English DragonNeck4
English DragonNeck4
English DragonNeck4
English DragonNeck4
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonNeck5
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonHead
English DragonJaw
English DragonJaw
English DragonJaw
English DragonJaw
English DragonJaw
English DragonJaw
Base HumanLCollarbone
Base HumanLCollarbone
Base HumanLUpperarm1
Base HumanLUpperarm1
Base HumanLUpperarm2
Base HumanLUpperarm2
Base HumanLForearm1
Base HumanLForearm1
Base HumanLForearm2
Base HumanLForearm2
Base HumanLForearm3
Base HumanLForearm3
Base HumanLPalm
Base HumanLPalm
Base HumanLThumbL1
Base HumanLThumbL1
Base HumanLThumbL2
Base HumanLThumbL2
Base HumanLThumbL3
Base HumanLThumbL3
Base HumanLFingerL1
Base HumanLFingerL1
Base HumanLFingerL2
Base HumanLFingerL2
Base HumanLFingerL3
Base HumanLFingerL3
Base HumanLFingerIndexL1
Base HumanLFingerIndexL1
Base HumanLFingerIndexL2
Base HumanLFingerIndexL2
Base HumanLFingerIndexL3
Base HumanLFingerIndexL3
Base HumanLFingerRingL1
Base HumanLFingerRingL1
Base HumanLFingerRingL2
Base HumanLFingerRingL2
Base HumanLFingerRingL3
Base HumanLFingerRingL3
Base HumanLFingerPinkieL1
Base HumanLFingerPinkieL1
Base HumanLFingerPinkieL2
Base HumanLFingerPinkieL2
Base HumanLFingerPinkieL3
Base HumanLFingerPinkieL3
Base HumanRCollarbone
Base HumanRCollarbone
Base HumanRUpperarm1
Base HumanRUpperarm1
Base HumanRUpperarm2
Base HumanRUpperarm2
Base HumanRForearm1
Base HumanRForearm1
Base HumanRForearm2
Base HumanRForearm2
Base HumanRForearm3
Base HumanRForearm3
Base HumanRPalm
Base HumanRPalm
Base HumanRThumbR1
Base HumanRThumbR1
Base HumanRThumbR2
Base HumanRThumbR2
Base HumanRThumbR3
Base HumanRThumbR3
Base HumanRFingerR1
Base HumanRFingerR1
Base HumanRFingerR2
Base HumanRFingerR2
Base HumanRFingerR3
Base HumanRFingerR3
Base HumanRFingerIndexR1
Base HumanRFingerIndexR1
Base HumanRFingerIndexR2
Base HumanRFingerIndexR2
Base HumanRFingerIndexR3
Base HumanRFingerIndexR3
Base HumanRFingerRingR1
Base HumanRFingerRingR1
Base HumanRFingerRingR2
Base HumanRFingerRingR2
Base HumanRFingerRingR3
Base HumanRFingerRingR3
Base HumanRFingerPinkieR1
Base HumanRFingerPinkieR1
Base HumanRFingerPinkieR2
Base HumanRFingerPinkieR2
Base HumanRFingerPinkieR3
Base HumanRFingerPinkieR3
Base HumanNeck
Base HumanNeck
Base HumanHead
Base HumanHead
Base HumanJaw
Base HumanJaw
Base HumanMouth_L
Base HumanMouth_L
Base HumanMouth_R
Base HumanMouth_R
Base HumanHair25
Base HumanHair25
Base HumanHair26
Base HumanHair26
Base HumanHair27
Base HumanHair27
Base HumanHair28
Base HumanHair28
Base HumanHair29
Base HumanHair29
Base HumanHair20
Base HumanHair20
Base HumanHair21
Base HumanHair21
Base HumanHair22
Base HumanHair22
Base HumanHair23
Base HumanHair23
Base HumanHair24
Base HumanHair24
Base HumanHair30
Base HumanHair30
Base HumanHair31
Base HumanHair31
Base HumanHair32
Base HumanHair32
Base HumanHair33
Base HumanHair33
Base HumanHair34
Base HumanHair34
Base HumanHair15
Base HumanHair15
Base HumanHair16
Base HumanHair16
Base HumanHair17
Base HumanHair17
Base HumanHair18
Base HumanHair18
Base HumanHair19
Base HumanHair19
Base HumanHair10
Base HumanHair10
Base HumanHair11
Base HumanHair11
Base HumanHair12
Base HumanHair12
Base HumanHair13
Base HumanHair13
Base HumanHair14
Base HumanHair14
Base HumanHair35
Base HumanHair35
Base HumanHair36
Base HumanHair36
Base HumanHair37
Base HumanHair37
Base HumanHair38
Base HumanHair38
Base HumanHair39
Base HumanHair39
Base HumanHair40
Base HumanHair40
Base HumanHair41
Base HumanHair41
Base HumanHair42
Base HumanHair42
Base HumanHair43
Base HumanHair43
Base HumanHair44
Base HumanHair44
Base HumanHair45
Base HumanHair45
Base HumanHair46
Base HumanHair46
Base HumanHair47
Base HumanHair47
Base HumanHair48
Base HumanHair48
Base HumanHair49
Base HumanHair49
Base HumanHair05
Base HumanHair05
Base HumanHair06
Base HumanHair06
Base HumanHair07
Base HumanHair07
Base HumanHair08
Base HumanHair08
Base HumanHair09
Base HumanHair09
Base HumanHair50
Base HumanHair50
Base HumanHair51
Base HumanHair51
Base HumanHair52
Base HumanHair52
Base HumanHair53
Base HumanHair53
Base HumanHair01
Base HumanHair01
Base HumanHair02
Base HumanHair02
Base HumanHair03
Base HumanHair03
Base HumanHair04
Base HumanHair04
Base HumanHair55
Base HumanHair55
Base HumanHair54
Base HumanHair54
Base HumanBrow_L1
Base HumanBrow_L1
Base HumanBrow_L2
Base HumanBrow_L2
Base HumanBrow_L3
Base HumanBrow_L3
Base HumanNose_L
Base HumanNose_L
Base HumanCheek_L
Base HumanCheek_L
Base HumanBrow_R1
Base HumanBrow_R1
Base HumanBrow_R2
Base HumanBrow_R2
Base HumanBrow_R3
Base HumanBrow_R3
Base HumanCheek_R
Base HumanCheek_R
Base HumanNose_R
Base HumanNose_R
Base HumanPonytail1
Base HumanPonytail1
Base HumanPonytail2
Base HumanPonytail2
Base HumanPonytail3
Base HumanPonytail3
Base HumanPonytail4
Base HumanPonytail4
Base HumanPonytail5
Base HumanPonytail5
Base HumanPonytail6
Base HumanPonytail6
Base HumanPonytail7
Base HumanPonytail7
Base HumanPonytail8
Base HumanPonytail8
Base HumanPonytail9
Base HumanPonytail9
Base HumanPonytail10
Base HumanPonytail10
EyeR
EyeR
EyelidBottomR
EyelidBottomR
EyelidTopR
EyelidTopR
EyelidBottomL
EyelidBottomL
EyelidTopL
EyelidTopL
EyeL
EyeL

Edit: This is related to the problem at hand, as for instance when the entries for BridleHeadB should be created with mesh_node.armature_setup[helper_node.armature] = (mesh_matrix, armature_matrix) in load() the English DragonNeck5, English DragonHead and English DragonJaw are used as helper_node, but their .armature returns None.

When trying to access `mesh.armature_setup[self]` in `link_hierarchy()` the entries for the some keys do not exist when trying to import the provided file. Therefore, accessing the dictionary like this results in the error described in the bug report. The meshes for which an entry is missing, are: ```lines BridleHeadB HeadA BridleHeadA HeadB HeadC BridleHeadC ``` The listed names are the content of their respective `.fbx_name`. The missing entry for all those meshes is the `DragonRoot☺Model`. I have yet to identify why these keys aren't set in the dictionary and whether this is an issue with the file or the importer. There are multiple times where the `helper_node.armature` is `None` when entries are created with `mesh_node.armature_setup[helper_node.armature] = (mesh_matrix, armature_matrix)` in `load()`. The following `helper_node`s have an `helper_node.armature` of `NULL`: ```lines LLegToe3 LLegToe31 LLegToe2 LLegToe21 LLegToe1 LLegToe12 RLegToe1 RLegToe12 RLegToe2 RLegToe21 RLegToe3 RLegToe31 English DragonLArmCollarbone English DragonLArmCollarbone English DragonLArmCollarbone English DragonLArmCollarbone English DragonLArmCollarbone English DragonLArmCollarbone English DragonLArmCollarbone English DragonLArmCollarbone English DragonLArm1 English DragonLArm1 English DragonLArm1 English DragonLArm1 English DragonLArm1 English DragonLArm1 English DragonLArm2 English DragonLArm2 English DragonLArm2 English DragonLArm3 English DragonLArmPalm LHandToe3 LHandToe31 LHandToe2 LHandToe21 LHandToe1 LHandToe12 English DragonRArmCollarbone English DragonRArmCollarbone English DragonRArmCollarbone English DragonRArmCollarbone English DragonRArmCollarbone English DragonRArmCollarbone English DragonRArmCollarbone English DragonRArm1 English DragonRArm1 English DragonRArm1 English DragonRArm1 English DragonRArm1 English DragonRArm2 English DragonRArm2 English DragonRArm2 English DragonRArm3 English DragonRArmPalm RHandToe1 RHandToe12 RHandToe2 RHandToe21 RHandToe3 RHandToe31 English DragonLWingCollarbone English DragonLWingCollarbone English DragonLWingCollarbone English DragonLWingCollarbone English DragonLWingCollarbone English DragonLWingCollarbone English DragonLWingCollarbone English DragonLWingCollarbone English DragonLWing1 English DragonLWing1 English DragonLWing1 English DragonLWing2 English DragonLW11 English DragonLW12 English DragonLW13 English DragonWthumbL English DragonLW21 English DragonLW22 English DragonLW23 English DragonLW31 English DragonLW32 English DragonLW33 English DragonLW41 English DragonLW42 English DragonLW43 English DragonRWingCollarbone English DragonRWingCollarbone English DragonRWingCollarbone English DragonRWingCollarbone English DragonRWingCollarbone English DragonRWingCollarbone English DragonRWingCollarbone English DragonRWingCollarbone English DragonRWingCollarbone English DragonRWing1 English DragonRWing1 English DragonRWing1 English DragonRWing1 English DragonRWing1 English DragonRWing2 English DragonRW11 English DragonRW12 English DragonRW13 English DragonWthumbR English DragonRW21 English DragonRW22 English DragonRW23 English DragonRW31 English DragonRW32 English DragonRW33 English DragonRW41 English DragonRW42 English DragonRW43 English DragonNeck1 English DragonNeck1 English DragonNeck1 English DragonNeck1 English DragonNeck1 English DragonNeck1 English DragonNeck1 English DragonNeck1 English DragonNeck1 English DragonNeck2 English DragonNeck2 English DragonNeck2 English DragonNeck2 English DragonNeck2 English DragonNeck2 English DragonNeck2 English DragonNeck3 English DragonNeck3 English DragonNeck3 English DragonNeck3 English DragonNeck3 English DragonNeck3 English DragonNeck3 English DragonNeck4 English DragonNeck4 English DragonNeck4 English DragonNeck4 English DragonNeck4 English DragonNeck4 English DragonNeck4 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonNeck5 English DragonHead English DragonHead English DragonHead English DragonHead English DragonHead English DragonHead English DragonHead English DragonHead English DragonHead English DragonHead English DragonHead English DragonHead English DragonHead English DragonJaw English DragonJaw English DragonJaw English DragonJaw English DragonJaw English DragonJaw Base HumanLCollarbone Base HumanLCollarbone Base HumanLUpperarm1 Base HumanLUpperarm1 Base HumanLUpperarm2 Base HumanLUpperarm2 Base HumanLForearm1 Base HumanLForearm1 Base HumanLForearm2 Base HumanLForearm2 Base HumanLForearm3 Base HumanLForearm3 Base HumanLPalm Base HumanLPalm Base HumanLThumbL1 Base HumanLThumbL1 Base HumanLThumbL2 Base HumanLThumbL2 Base HumanLThumbL3 Base HumanLThumbL3 Base HumanLFingerL1 Base HumanLFingerL1 Base HumanLFingerL2 Base HumanLFingerL2 Base HumanLFingerL3 Base HumanLFingerL3 Base HumanLFingerIndexL1 Base HumanLFingerIndexL1 Base HumanLFingerIndexL2 Base HumanLFingerIndexL2 Base HumanLFingerIndexL3 Base HumanLFingerIndexL3 Base HumanLFingerRingL1 Base HumanLFingerRingL1 Base HumanLFingerRingL2 Base HumanLFingerRingL2 Base HumanLFingerRingL3 Base HumanLFingerRingL3 Base HumanLFingerPinkieL1 Base HumanLFingerPinkieL1 Base HumanLFingerPinkieL2 Base HumanLFingerPinkieL2 Base HumanLFingerPinkieL3 Base HumanLFingerPinkieL3 Base HumanRCollarbone Base HumanRCollarbone Base HumanRUpperarm1 Base HumanRUpperarm1 Base HumanRUpperarm2 Base HumanRUpperarm2 Base HumanRForearm1 Base HumanRForearm1 Base HumanRForearm2 Base HumanRForearm2 Base HumanRForearm3 Base HumanRForearm3 Base HumanRPalm Base HumanRPalm Base HumanRThumbR1 Base HumanRThumbR1 Base HumanRThumbR2 Base HumanRThumbR2 Base HumanRThumbR3 Base HumanRThumbR3 Base HumanRFingerR1 Base HumanRFingerR1 Base HumanRFingerR2 Base HumanRFingerR2 Base HumanRFingerR3 Base HumanRFingerR3 Base HumanRFingerIndexR1 Base HumanRFingerIndexR1 Base HumanRFingerIndexR2 Base HumanRFingerIndexR2 Base HumanRFingerIndexR3 Base HumanRFingerIndexR3 Base HumanRFingerRingR1 Base HumanRFingerRingR1 Base HumanRFingerRingR2 Base HumanRFingerRingR2 Base HumanRFingerRingR3 Base HumanRFingerRingR3 Base HumanRFingerPinkieR1 Base HumanRFingerPinkieR1 Base HumanRFingerPinkieR2 Base HumanRFingerPinkieR2 Base HumanRFingerPinkieR3 Base HumanRFingerPinkieR3 Base HumanNeck Base HumanNeck Base HumanHead Base HumanHead Base HumanJaw Base HumanJaw Base HumanMouth_L Base HumanMouth_L Base HumanMouth_R Base HumanMouth_R Base HumanHair25 Base HumanHair25 Base HumanHair26 Base HumanHair26 Base HumanHair27 Base HumanHair27 Base HumanHair28 Base HumanHair28 Base HumanHair29 Base HumanHair29 Base HumanHair20 Base HumanHair20 Base HumanHair21 Base HumanHair21 Base HumanHair22 Base HumanHair22 Base HumanHair23 Base HumanHair23 Base HumanHair24 Base HumanHair24 Base HumanHair30 Base HumanHair30 Base HumanHair31 Base HumanHair31 Base HumanHair32 Base HumanHair32 Base HumanHair33 Base HumanHair33 Base HumanHair34 Base HumanHair34 Base HumanHair15 Base HumanHair15 Base HumanHair16 Base HumanHair16 Base HumanHair17 Base HumanHair17 Base HumanHair18 Base HumanHair18 Base HumanHair19 Base HumanHair19 Base HumanHair10 Base HumanHair10 Base HumanHair11 Base HumanHair11 Base HumanHair12 Base HumanHair12 Base HumanHair13 Base HumanHair13 Base HumanHair14 Base HumanHair14 Base HumanHair35 Base HumanHair35 Base HumanHair36 Base HumanHair36 Base HumanHair37 Base HumanHair37 Base HumanHair38 Base HumanHair38 Base HumanHair39 Base HumanHair39 Base HumanHair40 Base HumanHair40 Base HumanHair41 Base HumanHair41 Base HumanHair42 Base HumanHair42 Base HumanHair43 Base HumanHair43 Base HumanHair44 Base HumanHair44 Base HumanHair45 Base HumanHair45 Base HumanHair46 Base HumanHair46 Base HumanHair47 Base HumanHair47 Base HumanHair48 Base HumanHair48 Base HumanHair49 Base HumanHair49 Base HumanHair05 Base HumanHair05 Base HumanHair06 Base HumanHair06 Base HumanHair07 Base HumanHair07 Base HumanHair08 Base HumanHair08 Base HumanHair09 Base HumanHair09 Base HumanHair50 Base HumanHair50 Base HumanHair51 Base HumanHair51 Base HumanHair52 Base HumanHair52 Base HumanHair53 Base HumanHair53 Base HumanHair01 Base HumanHair01 Base HumanHair02 Base HumanHair02 Base HumanHair03 Base HumanHair03 Base HumanHair04 Base HumanHair04 Base HumanHair55 Base HumanHair55 Base HumanHair54 Base HumanHair54 Base HumanBrow_L1 Base HumanBrow_L1 Base HumanBrow_L2 Base HumanBrow_L2 Base HumanBrow_L3 Base HumanBrow_L3 Base HumanNose_L Base HumanNose_L Base HumanCheek_L Base HumanCheek_L Base HumanBrow_R1 Base HumanBrow_R1 Base HumanBrow_R2 Base HumanBrow_R2 Base HumanBrow_R3 Base HumanBrow_R3 Base HumanCheek_R Base HumanCheek_R Base HumanNose_R Base HumanNose_R Base HumanPonytail1 Base HumanPonytail1 Base HumanPonytail2 Base HumanPonytail2 Base HumanPonytail3 Base HumanPonytail3 Base HumanPonytail4 Base HumanPonytail4 Base HumanPonytail5 Base HumanPonytail5 Base HumanPonytail6 Base HumanPonytail6 Base HumanPonytail7 Base HumanPonytail7 Base HumanPonytail8 Base HumanPonytail8 Base HumanPonytail9 Base HumanPonytail9 Base HumanPonytail10 Base HumanPonytail10 EyeR EyeR EyelidBottomR EyelidBottomR EyelidTopR EyelidTopR EyelidBottomL EyelidBottomL EyelidTopL EyelidTopL EyeL EyeL ``` **Edit**: This is related to the problem at hand, as for instance when the entries for `BridleHeadB` should be created with `mesh_node.armature_setup[helper_node.armature] = (mesh_matrix, armature_matrix)` in `load()` the `English DragonNeck5`, `English DragonHead` and `English DragonJaw` are used as `helper_node`, but their `.armature` returns `None`.
Author

Maybe this is just a case of differing philosophies, but as a coder myself, it seems to me that if the end-user sees a stack trace from Blender's code for any reason, it's a flaw in Blender's code. If the input file is malformed, it should report that fact to the user with some human-readable explanation as to what's wrong with the file, rather than throw an uncaught exception.

(Yes, I know end users can write their own code for plugins, etc. I'm referring specifically to code that comes from Blender and is fully under your control.)

Maybe this is just a case of differing philosophies, but as a coder myself, it seems to me that if the end-user sees a stack trace from Blender's code *for any reason*, it's a flaw in Blender's code. If the input file is malformed, it should report that fact to the user with some human-readable explanation as to what's wrong with the file, rather than throw an uncaught exception. (Yes, I know end users can write their own code for plugins, etc. I'm referring specifically to code that comes from Blender and is fully under your control.)

There are even more objects that should get an armature modifier assigned with Object set to DragonRoot, e.g. the Male_Body object, but currently don't.

There are even more objects that should get an armature modifier assigned with *Object* set to *DragonRoot*, e.g. the *Male_Body* object, but currently don't.

@Stormhunter_Studios I'm in the process of analyzing this and just shared my notes so other developers don't do the redundant work.

@Stormhunter_Studios I'm in the process of analyzing this and just shared my notes so other developers don't do the redundant work.

Added subscriber: @mont29

Added subscriber: @mont29

Seems like the support of more complex rigs is limited in Blender's FBX importer. I will give it another look tomorrow and see if I can find the core problem, but based on comments by @mont29 in past reports #70244 and #61011 this is a known limitation.

Seems like the support of more complex rigs is limited in Blender's FBX importer. I will give it another look tomorrow and see if I can find the core problem, but based on comments by @mont29 in past reports #70244 and #61011 this is a known limitation.

Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'

Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'

Such giant FBX file is totally unusable to investigate an issue, we'd need a minimal basic demo file exhibiting it to seriously check on it... But even then, as already said, recursive layers of rigs are not exactly well supported currently, FBX uses Maya/3DSMax kinds of rigs, which are fairly different from Blender ones, and since there is no clear specs for FBX, doing a fully proper conversion is fairly difficult.

Such giant FBX file is totally unusable to investigate an issue, we'd need a minimal basic demo file exhibiting it to seriously check on it... But even then, as already said, recursive layers of rigs are not exactly well supported currently, FBX uses Maya/3DSMax kinds of rigs, which are fairly different from Blender ones, and since there is no clear specs for FBX, doing a fully proper conversion is fairly difficult.

Added subscriber: @EthicalVegan

Added subscriber: @EthicalVegan

This comment was removed by @EthicalVegan

*This comment was removed by @EthicalVegan*
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Member

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.

Thanks again for the report. If the problem persists please report with the required information.

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed. Thanks again for the report. If the problem persists please report with the required information.

Added subscriber: @RiverNyxx

Added subscriber: @RiverNyxx

I just came across what I believe to be the same problem, myself. Again, with an asset from the Unity Asset Store.

This is what I changed to fix it (Blender 3.0):
import_fbx.py

def find_armature_bones(self, armature):
  for child in self.children:
    if child.is_bone:
      child.armature = armature
    child.find_armature_bones(armature)

You'll notice that the only change was to move the recursive find_armature_bones() call out of the if block.
This is because, at least for my example file, some of the bone objects are children of a mesh object, so we don't want the recursive function to abort when it reaches the mesh object, but before reaching its children (which are bone objects).
Now those bone objects are properly assigned their armatures.

I just came across what I believe to be the same problem, myself. Again, with an asset from the Unity Asset Store. This is what I changed to fix it (Blender 3.0): import_fbx.py ``` def find_armature_bones(self, armature): for child in self.children: if child.is_bone: child.armature = armature child.find_armature_bones(armature) ``` You'll notice that the only change was to move the recursive find_armature_bones() call out of the if block. This is because, at least for my example file, some of the bone objects are children of a mesh object, so we don't want the recursive function to abort when it reaches the mesh object, but before reaching its children (which are bone objects). Now those bone objects are properly assigned their armatures.

Thanks @RiverNyxx , that solved the problem for me too (the orc model from the Must Have Fantasy Villains Pack on the Unity store).

If there are any Blender developers still following this ticket, is there any reason why the change shouldn't be merged?

Thanks @RiverNyxx , that solved the problem for me too (the orc model from the Must Have Fantasy Villains Pack on the Unity store). If there are any Blender developers still following this ticket, is there any reason why the change shouldn't be merged?
Sign in to join this conversation.
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#83467
No description provided.