Closed theanine3D closed 1 year ago
After updating Blender to 3.5.1 the error is now totally different. It now looks like the cause is related to an incorrect filepath being generated by the scripts on Windows (the C:\ drive is being added twice). Very strange, but at least it looks like the issue is more clear now. I updated my post above with the new error.
Note that I am not encountering this error on Ubuntu Linux (22.04), with the same Blender version (3.5.1). On Linux it works fine, no error, and a .bam is produced as expected.
I was having the same issue (tried Panda3d version 1.10.5, 1.10.11, 1.10.13), but I was able to temporarily fix the issue by editing panda3d-gltf library (blend2bam calls this library). The issue appears to be mostly caused by panda3d.core.Filename not handling the paths correctly??
.make_absolute()
is called (this causes the issue you observed of C:\ being added twice). I commented out the problem causing function calls.
In "cli.py" of gltf line111-114:
src = p3d.Filename(args.src)
# src.make_absolute() Commented out by me
dst = p3d.Filename(args.dst)
# dst.make_absolute() Commented out by me
.get_dirname()
. I replaced these calls with os.path.dirname(...)
.
In "cli.py" of gltf line 116-117, replaced with:
indir = p3d.Filename(os.path.dirname(args.src))
outdir = p3d.Filename(os.path.dirname(args.dst))
In "converter.py" line 105, replaced with:
self.filedir = Filename(os.path.dirname(filepath))
write_bam_file
??
In "cli.py", replaced with:
converter.active_scene.write_bam_file(os.path.basename(dst))
Honestly I'm a newbie here and there's probably more underlying problems??? but hope this helps.
panda3d-gltf should be using
src = p3d.Filename.from_os_specific(args.src)
src.make_absolute()
dst = p3d.Filename.from_os_specific(args.dst)
dst.make_absolute()
I am surprised it took this long for this to be a problem. I am guessing gltf2bam
does not get used much on Windows, and blend2bam
just recently switched to going through the CLI interface for panda3d-gltf.
I have published a new release of panda3d-gltf
that fixes this issue. Please update that module (e.g., pip install --upgrade panda3d-gltf
) and try again. If you are still having issues, feel free to reopen this issue.
blend2bam refuses to convert any blend file for me, no matter what blend file I use, even a default .blend file with just a default cube in it.
I've edited the code a bit so that it would show a more detailed error, and here's what it shows in the console:
It looks like the problem is on that last line of the error message - you can see that "C:\" is being added twice to the filepath.
I've encountered this problem with two different Python installations (the one from the Panda3D SDK, as well as Anaconda's). So it doesn't appear to be related to my Python setup.
My setup is: Python 3.7 (the one that comes with Panda SDK) Blender 3.5 Newest version of blend2bam Windows 11