0
$\begingroup$

After import FBX in object mode

I see many external bones around an imported binary FBX file, made in MakeHuman. The view in Pose mode is also very difficult to work with. How can I change the view, so that I only see the rig?

$\endgroup$

2 Answers 2

0
$\begingroup$

I don´t think the problem is the view or external bones. After import a fbx, the armature and meshes must be aligned and the lengths of the bones reduced for a better overview. The following script should do that for you. Open a new text block in workspace Scripting. Rename 'text' to 'text.py' and copy the code with RMB into it. Select your armature and press run.

import bpy
bpy.ops.object.mode_set(mode='OBJECT') 
obj = bpy.context.object              
bpy.ops.object.select_all(action='DESELECT')              
bpy.data.objects[obj.name].select_set(True) 
bpy.ops.object.mode_set(mode='POSE')
bpy.ops.pose.select_all(action='SELECT')
bpy.ops.pose.armature_apply(selected=False)
bpy.ops.object.mode_set(mode='OBJECT') 
obj = bpy.context.object 
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)            
bpy.data.objects[obj.name].select_set(False)            
for mesh in bpy.data.objects:
    if mesh.parent == obj:
        mesh.select_set(True)
        mesh.rotation_euler[0] += -1.5708               
        bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)                
        mesh.select_set(False)
bpy.ops.object.mode_set(mode='EDIT')
obj = bpy.context.object              
ebones = obj.data.edit_bones  
change = 0
for bone in ebones:    
    if bone.name == "root":
        for idx in range(3):
            ebones['root'].tail[idx] =  ebones['spine05'].head[idx]                   
    if bone.name == "head":
        change = 1
    if bone.name == "pelvis.L":
        change = 0                
    if change == 1:
        bone.length = 0.05
obj.show_in_front = True
$\endgroup$
0
$\begingroup$

Thanks for your reply and advise. I did my best to follow it up in an Blender text block, renamed as text.py Then save, and reload the fbx-file. But I see still the same result.

I discovered lately however, that fbx binary files made in Mixamo are displaying fine. So I think that's is the most simple in between solution for me as a noob in scripting an related abstract subjects. Anyway, thanks!

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .