FBX IO: Search for images on separate threads #105125

Open
Thomas Barlow wants to merge 2 commits from Mysteryem/blender-addons:fbx_import_image_search_threaded into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 3 additions and 8 deletions
Showing only changes of commit f9f3507c6c - Show all commits

View File

@ -207,11 +207,11 @@ class ImportFBX(bpy.types.Operator, ImportHelper):
dirname = os.path.dirname(self.filepath) dirname = os.path.dirname(self.filepath)
for file in self.files: for file in self.files:
path = os.path.join(dirname, file.name) path = os.path.join(dirname, file.name)
if import_fbx.load(self, context, filepath=path, executor=executor, **keywords) == {'FINISHED'}: if import_fbx.load(self, context, executor, filepath=path, **keywords) == {'FINISHED'}:
ret = {'FINISHED'} ret = {'FINISHED'}
return ret return ret
else: else:
return import_fbx.load(self, context, filepath=self.filepath, executor=executor, **keywords) return import_fbx.load(self, context, executor, filepath=self.filepath, **keywords)
class FBX_PT_import_include(bpy.types.Panel): class FBX_PT_import_include(bpy.types.Panel):

View File

@ -2999,7 +2999,7 @@ class FbxImportHelperNode:
return None return None
def load(operator, context, filepath="", def load(operator, context, executor, filepath="",
use_manual_orientation=False, use_manual_orientation=False,
axis_forward='-Z', axis_forward='-Z',
axis_up='Y', axis_up='Y',
@ -3021,7 +3021,6 @@ def load(operator, context, filepath="",
secondary_bone_axis='X', secondary_bone_axis='X',
use_prepost_rot=True, use_prepost_rot=True,
colors_type='SRGB', colors_type='SRGB',
executor=None,
): ):
global fbx_elem_nil global fbx_elem_nil
@ -3033,10 +3032,6 @@ def load(operator, context, filepath="",
from . import parse_fbx from . import parse_fbx
from .fbx_utils import RIGHT_HAND_AXES, FBX_FRAMERATES from .fbx_utils import RIGHT_HAND_AXES, FBX_FRAMERATES
from .fbx_utils_threading import ImmediateExecutor
if executor is None:
executor = ImmediateExecutor()
start_time_proc = time.process_time() start_time_proc = time.process_time()
start_time_sys = time.time() start_time_sys = time.time()