VRM Added, Import Anything chages.
- Added VRM to the list of files able to be imported. - Added error handling for missing vrm importer, will popup to the user telling them to download vrm addon. - Removed automatically url opening as we should have user consent to open a url, automatic url opening goes against blenders best practices and can be a security concern. - Optimised the way we import multiple models, the old way just added unnecessary complexity, The try-except block was used to iterate over self.files and set is_multi to True if no exception occurs. However, this is an unnecessarily complex way to determine if the list is non-empty. Simply checking the length of the list is more straightforward and efficient. The way we were using the try-except box could of also lead to silent failures which is not user friendly.
This commit is contained in:
@@ -40,6 +40,7 @@ import_types: dict[str, typing.Callable[[str, list[dict[str,str]], str], None]]
|
||||
"x3d": (lambda directory, files, filepath : bpy.ops.import_scene.x3d(files=files, directory=directory, filepath=filepath)),
|
||||
"wrl": (lambda directory, files, filepath : bpy.ops.import_scene.x3d(files=files, directory=directory, filepath=filepath)),
|
||||
"vmd": (lambda directory, files, filepath : import_multi_files(directory=directory, files=files, filepath=filepath, method = (lambda directory, filepath: bpy.ops.tuxedo.import_mmd_animation(directory=directory, filepath=filepath)))),
|
||||
"vrm": (lambda directory, files, filepath: bpy.ops.import_scene.vrm(filepath=filepath)),
|
||||
"pmx": (lambda directory, files, filepath : import_pmx(filepath)),
|
||||
"pmd": (lambda directory, files, filepath : import_pmd(filepath)),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user