Closed lolRazor closed 1 year ago
No clue why this isnt working
^ +1, no clue how to solve it
OK, I have no idea how I saw this issue (twice!) and never realised what the problem actually was (early End Of File) so, er… in BModel.py, now around line 464, there is a block of lines like this:
while strTag != "TEX" and not br.is_eof(): # "TEX1 tag is the last one every time"
br.SeekCur(iSize)
streamPos = br.Position()
strTag = br.ReadFixedLengthString(3)
_ = br.GetByte()
iSize = br.ReadDWORD()
try to add those two lines:
while strTag != "TEX" and not br.is_eof(): # "TEX1 tag is the last one every time"
br.SeekCur(iSize)
streamPos = br.Position()
+ if br.is_eof():
+ break
strTag = br.ReadFixedLengthString(3)
_ = br.GetByte()
iSize = br.ReadDWORD()
does it fix the problem? If not, is the error message at least different ?
so I no longer have the error message when doing this, but I have Blender which loads indefinitely trying to load the file
…right. This might be another bug altogether. what does the stack trace look like when you do Ctrl-C in the terminal after it loaded for a while ? just to see what loop it might be stuck on.
I open blender I load the file for a little while then I press ctrl+c?
yep! in a terminal/console window, Ctrl+C means "interrupt!" instead of "copy" You just need to actually show the terminal window first, with… I think the option is in the "windows" menu of the toolbar at the top of blender?
here is the error
ok. now, just to know if the bug is in the python code or the C code, if you change the area of common.py around line 117 like this:
+ print("call start")
temp = subprocess.run([exefile] + args, shell=False)
if temp.stdout:
log.info ("process output:\n %s", temp.stdout)
if temp.stderr:
log.error('process errors:\n %s', temp.stderr)
+ print("call end")
does blemd repeat "call start/call end" without stopping, or does it just freeze after saying "call start"?
it does not write it in the console of blender it redoes the same thing as the screen above
oh sorry, I forgot to ask you to delete the images again. but er… how much did you wait before using ctrl+C? Because if it hangs even without calling the bundled C program, it might have been too soon.
if i do nothing it keeps spamming in blender console (read ic)
ooooh! I see exactly where the bug is. er… would you be able to recompile the bmdview.cpp file into the bmdview.exe program if I asked you to? to know if I should send you the patch, or just put it in a commit. (probably not tonight though, it's getting late)
I don't think so, I don't know much about coding
ok. er… dang, I just realised I won't have access to a windows machine for a while, so compiling it myself won't be easy. bluh.
I'll look into how to do it
er… thanks!
I've tried looking at several tutorials and I just can't do it.
ok, no problem. I'll see what I can do on my side of things.
Well, i don't think that it not working with 2.77 is much of an "issue" anymore
yeah, the title needs to be revamped
is there any BMD file without textures you can think of? i might try tweaking the code to fix this
oh, I know what fix can be done, I just don't have a way to re-compile the c++ file for windows systems anymore
I'm trying to see if there's a different solution and that'd require a bmd file without textures
another solution would be to not call bmdview.exe whenever blemd detects that the Tex section is missing. (given that the first infinite loop can be solved with the patch in a message higher in this conversation)
that's what I was thinking of, but i need a file to test it with
I don't think I have one, I just asked CrbzBrandon whenever I had a patch that I thought worked.
Looking at the third image, it seems to be from pixelmon?
the directory structure matches, and pixelmon did use .bmd at some point
but it does not seem to be the same BMD as the one you're trying to load, I couldn't get STB or J3DView to view it either. the original BMDView also gets stuck in a loop.
that's exactly what I'm trying to have also the model and texture of the pixelmon mod
it's a completely different format.
the pixelmon one has a blender signature in it, and doesn't have the magic J3D
x
bmd/bdl
y
at offset 0x00, a list of materials at the end, and the occasional "this is padding data"
so there is no way to open them?
Not that I'm aware of