Update demo.

This commit is contained in:
K. S. Ernest (iFire) Lee 2021-12-19 13:57:57 -08:00
parent f809c0b1e0
commit 78a2be353a
2 changed files with 5 additions and 4 deletions

View File

@ -17,8 +17,8 @@ func _get_import_flags():
func _import_scene(path: String, flags: int, bake_fps: int): func _import_scene(path: String, flags: int, bake_fps: int):
if not ProjectSettings.has_setting(settings_fbx2gltf_path): if not ProjectSettings.has_setting(settings_fbx2gltf_path):
ProjectSettings.set_initial_value(settings_fbx2gltf_path, "fbx2gltf") ProjectSettings.set_initial_value(settings_fbx2gltf_path, "FBX2glTF")
ProjectSettings.set_setting(settings_fbx2gltf_path, "fbx2gltf") ProjectSettings.set_setting(settings_fbx2gltf_path, "FBX2glTF")
else: else:
fbx2gltf_path = ProjectSettings.get_setting(settings_fbx2gltf_path) fbx2gltf_path = ProjectSettings.get_setting(settings_fbx2gltf_path)
if fbx2gltf_path.is_empty(): if fbx2gltf_path.is_empty():
@ -36,7 +36,8 @@ func _import_scene(path: String, flags: int, bake_fps: int):
var output_path_global = ProjectSettings.globalize_path(output_path) var output_path_global = ProjectSettings.globalize_path(output_path)
var stdout = [].duplicate() var stdout = [].duplicate()
var temp_dir_global = ProjectSettings.globalize_path("res://.godot/imported/") var temp_dir_global = ProjectSettings.globalize_path("res://.godot/imported/")
var ret = OS.execute(fbx2gltf_path, [ var fbx2gltf_path_global = ProjectSettings.globalize_path(fbx2gltf_path)
var ret = OS.execute(fbx2gltf_path_global, [
"--fbx-temp-dir", temp_dir_global, "--fbx-temp-dir", temp_dir_global,
"-i", path_global, "-i", path_global,
"-o", output_path_global], stdout, true) "-o", output_path_global], stdout, true)

View File

@ -21,7 +21,7 @@ enabled=PackedStringArray("res://addons/fbx/plugin.cfg")
[filesystem] [filesystem]
import/fbx/use_fbx=false import/fbx/use_fbx=false
import/fbx/fbx2gltf_path="fbx2gltf" import/fbx/fbx2gltf_path="res://addons/fbx/FBX2glTF"
[physics] [physics]