Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3dmigoto-blender Export Error #29

Open
53nemu opened this issue Jan 4, 2024 · 3 comments
Open

3dmigoto-blender Export Error #29

53nemu opened this issue Jan 4, 2024 · 3 comments

Comments

@53nemu
Copy link

53nemu commented Jan 4, 2024

Hi, I'm sorry to bother you again.

When I use an older version plugin (created by you rather than modified by others), I encounter the following error when attempting to output the model
I aimed to delete the skirt from "polySurface6085_10" and remove the top while keeping the tie. So, I imported the 3DMigoto raw buffers (only importing "polySurface6085_10.ib" and "polySurface6085_10.vb").
Essentially, my objective is to unpack the original models within the game, make modifications, and repack them for the game to read.

However, afterwards, Blender prompts the following error:

Python: Traceback (most recent call last):
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto (2).py", line 1399, in execute
export_3dmigoto(self, context, vb_path, ib_path, fmt_path)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto (2).py", line 1044, in export_3dmigoto
stride = obj['3DMigoto:VBStride']
KeyError: 'bpy_struct[key]: key "3DMigoto:VBStride" not found'

I have uploaded the older version of the plugin I used, and I would greatly appreciate it if you could take the time to help me identify where the issue might be occurring. Thank you very much for your assistance.

Also, my English is not very good, which might make it difficult for you to read. I'm really sorry.
original model&old version plugin&modified model(blender file).zip

@DarkStarSword
Copy link
Owner

DarkStarSword commented Jan 4, 2024

Right, the script stores a bunch of info in the custom properties attached to the object:
image

"3DMigoto:VBStride" became "3DMigoto:VB0Stride" in the update that added support for multiple vertex buffers - the new script can load .blend files with the old name for backwards compatibility, but the old script doesn't know about the new name hence that error. You should be able to rename the property in the custom properties panel if you need to.

@53nemu
Copy link
Author

53nemu commented Jan 4, 2024

Right, the script stores a bunch of info in the custom properties attached to the object: image

"3DMigoto:VBStride" became "3DMigoto:VB0Stride" in the update that added support for multiple vertex buffers - the new script can load .blend files with the old name for backwards compatibility, but the old script doesn't know about the new name hence that error. You should be able to rename the property in the custom properties panel if you need to.

Thank you very much for your response. I have indeed tried the new version, but encountered some other issues. I would greatly appreciate it if you could help me with those as well.

I have downloaded the latest version you released.

When attempting to export the model, Blender defaults to using the .vb0 extension, resulting in four files with extensions .vb, .vb0, .fmt, and .vgmap. When I try to re-import a previously exported model (using the original .ib file with the .vb file having the .vb0 extension), Blender prompts me to provide the .fmt file. Regardless of whether I provide the original .fmt file from the unpacked data or the .fmt file generated during the export of the new model, I encounter the following error

Python: Traceback (most recent call last):
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 2561, in execute
import_3dmigoto_raw_buffers(self, context, vb_fmt_path, ib_fmt_path, **migoto_raw_import_options)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 2441, in import_3dmigoto_raw_buffers
obj = import_3dmigoto(operator, context, paths, merge_meshes=False, **kwargs)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 1305, in import_3dmigoto
obj.append(import_3dmigoto_vb_ib(operator, context, [p], **kwargs))
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 1368, in import_3dmigoto_vb_ib
(blend_indices, blend_weights, texcoords, vertex_layers, use_normals) = import_vertices(mesh, obj, vb, operator, semantic_translations, flip_normal)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 1277, in import_vertices
import_normals_step1(mesh, data, vertex_layers, operator, translate_normal)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 1010, in import_normals_step1
l.normal[:] = normals[l.vertex_index]
IndexError: list index out of range

When using the newly generated .vb file along with the original .ib file, it directly triggers an error. This issue might arise due to compatibility problems between the newly exported .vb file and the original .ib file.

Could you please confirm?
first
second
polySurface6085_10.zip

in zip there are the original .ib file and export file by the lastest plugin (the .vb0 file has been renamed)

@53nemu
Copy link
Author

53nemu commented Jan 4, 2024

Right, the script stores a bunch of info in the custom properties attached to the object: image

"3DMigoto:VBStride" became "3DMigoto:VB0Stride" in the update that added support for multiple vertex buffers - the new script can load .blend files with the old name for backwards compatibility, but the old script doesn't know about the new name hence that error. You should be able to rename the property in the custom properties panel if you need to.

Oh, my goodness! I was able to export and re-import successfully after changing 3DMigoto:VBStride in the settings. Thank you! This is my first time creating a mod for the legend of heroes: hajimari no kiseki, and also my first time modifying 3D mods. I'm so grateful for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants