Open LeoCrenon opened 4 hours ago
Hey @LeoCrenon , have you tried following the guide here?
If so, are you trying to use the importer manually via the command line or are you trying to use it automatically via a build hook?
Yes i followed this guide, and i was trying to use it via the command line
Okay, and if you ran this command:
dart --enable-experiment=native-assets \ run flutter_scene_importer:import \ --input "path/to/my/source_model.glb" \ --output "path/to/my/imported_model.model"
Then it would seem the issue is with your input
argument. Have you tried specifying an absolute path instead of a relative path?
If you can, please provide the exact command that you're running. Feel free to redact any personal information in the directory path, such as your name.
I tried using absolute path on Windows and macOs with nothing new
PS C:\test_3d> pwd
Path
----
C:\test_3d
PS C:\test_3d> dart --enable-experiment=native-assets run flutter_scene_importer:import --input "C:/test_3d/assets/DamagedHelmet.glb" --output "C:/test_3d/assets/DamagedHelmet.model"
Unhandled exception:
ProcessException: No such file or directory
Command: cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug
#0 _ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:488:7)
#1 _runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:633:18)
#2 Process.runSync (dart:io-patch/process_patch.dart:68:12)
#3 main.<anonymous closure> (file:///c:/users/leocr/appdata/local/pub/cache/hosted/pub.dev/flutter_scene_importer-0.2.0-0/hook/build.dart:26:36)
#4 build (package:native_assets_cli/src/api/build.dart:93:16)
#5 main (file:///c:/users/leocr/appdata/local/pub/cache/hosted/pub.dev/flutter_scene_importer-0.2.0-0/hook/build.dart:7:9)
#6 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#7 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Building native assets for package:flutter_scene_importer failed.
file:///C:/Users/leocr/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_scene_importer-0.2.0-0/hook/build.dart returned with exit code: 255.
To reproduce run:
C:\Users\leocr\Documents\flutter\bin\cache\dart-sdk\bin\dart.exe --packages=C:\test_3d\.dart_tool\package_config.json C:\test_3d\.dart_tool\native_assets_builder\a63996ef2018865896090302e099b2bf\hook.dill --config=C:\test_3d\.dart_tool\native_assets_builder\a63996ef2018865896090302e099b2bf\config.json
And if i reproduce it using the "to reproduce run ... command":
PS C:\test_3d> C:\Users\leocr\Documents\flutter\bin\cache\dart-sdk\bin\dart.exe --packages=C:\test_3d\.dart_tool\package_config.json C:\test_3d\.dart_tool\native_assets_builder\a63996ef2018865896090302e099b2bf\hook.dill --config=C:\test_3d\.dart_tool\native_assets_builder\a63996ef2018865896090302e099b2bf\config.json
Running cmake gen step...
Unhandled exception:
ProcessException: Le fichier spécifié est introuvable.
Command: cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug
#0 _ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:488:7)
#1 _runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:633:18)
#2 Process.runSync (dart:io-patch/process_patch.dart:68:12)
#3 main.<anonymous closure> (file:///c:/users/leocr/appdata/local/pub/cache/hosted/pub.dev/flutter_scene_importer-0.2.0-0/hook/build.dart:26:36)
#4 build (package:native_assets_cli/src/api/build.dart:93:16)
#5 main (file:///c:/users/leocr/appdata/local/pub/cache/hosted/pub.dev/flutter_scene_importer-0.2.0-0/hook/build.dart:7:9)
#6 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#7 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Not sure if it will make a difference, but it looks like you're using forward slashes "/" in your path for separators whereas Windows uses backslashes "\"
i tried it too : dart --enable-experiment=native-assets run flutter_scene_importer:import --input "C:\test_3d\assets\DamagedHelmet.glb" --output "C:\test_3d\assets\DamagedHelmet.model"
Okay. Have you installed CMAKE? I remember I had to do that when I followed the guide myself the first time.
Thank you ! It was the solution
Awesome! Feel free to close the issue if you're all set.
Hello, i'm trying to run the importer on different glb files (including the example DamagedHelmet) but i get this error everytime :
I tried on Windows, WSL and macOS and encounter the same issue.
My flutter doctor and dart version
Thanks for your help