You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
if you try to import a fbx file with one bones in it from the loader, Blender will crash. If the fbx doesnt have bones, it works. If you try to import the fbx containing bones outside of the loader (directly in the script editor), it works.
this is the code used to import it. same code works from the script editor.
importbpydefget_view3d_operator_context():
"""Adapted from several sources. It seems like io ops needs a specific context that if run external to the Blender console needs to be specified """forwindowinbpy.context.window_manager.windows:
forareainwindow.screen.areas:
ifarea.type=="VIEW_3D":
forregioninarea.regions:
ifregion.type=="WINDOW":
context_override= {
"window": window,
"screen": window.screen,
"area": area,
"region": region,
"scene": bpy.context.scene,
}
returncontext_overridereturnNonecontext=get_view3d_operator_context()
path=r"//path/to//scene.v006.fbx"bpy.ops.import_scene.fbx(
context,
filepath=path,
use_manual_orientation=False,
global_scale=1.0,
use_custom_normals=True,
use_image_search=True,
use_alpha_decals=False,
decal_offset=0.0,
use_anim=False,
anim_offset=1.0,
use_subsurf=False,
use_custom_props=True,
use_custom_props_enum_as_string=True,
ignore_leaf_bones=True,
force_connect_children=False,
automatic_bone_orientation=True,
primary_bone_axis="Y",
secondary_bone_axis="X",
use_prepost_rot=True,
axis_forward="-Z",
axis_up="Y",
)
using debugpy, I noticed the crash is happening inside the following function
root_helper.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
...../Blender 3.3/3.3/scripts/addons/io_scene_fbx/import_fbx.py -> line 2845
To Reproduce
Steps to reproduce the behavior:
export fbx of a cube with 1 bones
open loader, select the fbx
import into collection
crash...
Desktop (please complete the following information):
Describe the bug
if you try to import a fbx file with one bones in it from the loader, Blender will crash. If the fbx doesnt have bones, it works. If you try to import the fbx containing bones outside of the loader (directly in the script editor), it works.
this is the code used to import it. same code works from the script editor.
using debugpy, I noticed the crash is happening inside the following function
root_helper.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
...../Blender 3.3/3.3/scripts/addons/io_scene_fbx/import_fbx.py -> line 2845
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: