Post by NEMAMENE on Dec 23, 2023 19:59:17 GMT -5
After upgrading to version 3.2.1.3 started getting this error when trying to import mesh:
Blender version 3.6.7.
Everything was working fine on version 3.2.1.2, this error started appearing after the update.
For the test, I exported the wall lamp object, replaced it with a cube mesh in blender and assigned Cut 1 (and of course removed the Cut from the lamp mesh).
The most interesting thing is that when Cut is 0, the object is successfully imported.
I will be very grateful for some help.
.package and .blend files: drive.google.com/file/d/1_yLrww2m24XdkXJb__6fAEd3wgbi6hwV/view?usp=sharing
The Sims 4 Studio - Version 3.2.1.3
System.AggregateException: One or more errors occurred. (Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\ProgramData\S4Studio\Scripts\objectexporter.py", line 14, in <module>
save_lod(mlod,geometry_state)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\blender.py", line 445, in save_lod
save_mesh(blender_mesh, m, new_mesh, geometry_state)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\blender.py", line 348, in save_mesh
offset = vbuf.buffer.write_vertices(vrtf, sim_mesh_data.vertices, uv_scales, pos_scales,s4mesh_new.get_shader())
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\geometry.py", line 667, in write_vertices
self.write_vertex(vrtf, vertex, uvscales, posscales, shader)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\geometry.py", line 727, in write_vertex
c = v.colour[declaration.usage_index]
IndexError: list index out of range
saving mesh geostate:
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now OBJECT
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
changing mode from OBJECT to EDIT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now EDIT
changing mode from EDIT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now OBJECT
ROTATING mode= OBJECT active=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
8 vertices split.
saving mesh geostate:
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now OBJECT
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
changing mode from OBJECT to EDIT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now EDIT
changing mode from EDIT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now OBJECT
ROTATING mode= OBJECT active=<bpy_struct, Object("Cube") at 0x000002408BA52408>
8 vertices split.
restoring uv scale 0.0 at index 2
restoring uv scale 0.0 at index 3
Blender quit
)
---> S4Studio.Blender.BlenderException: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\ProgramData\S4Studio\Scripts\objectexporter.py", line 14, in <module>
save_lod(mlod,geometry_state)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\blender.py", line 445, in save_lod
save_mesh(blender_mesh, m, new_mesh, geometry_state)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\blender.py", line 348, in save_mesh
offset = vbuf.buffer.write_vertices(vrtf, sim_mesh_data.vertices, uv_scales, pos_scales,s4mesh_new.get_shader())
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\geometry.py", line 667, in write_vertices
self.write_vertex(vrtf, vertex, uvscales, posscales, shader)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\geometry.py", line 727, in write_vertex
c = v.colour[declaration.usage_index]
IndexError: list index out of range
saving mesh geostate:
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now OBJECT
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
changing mode from OBJECT to EDIT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now EDIT
changing mode from EDIT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now OBJECT
ROTATING mode= OBJECT active=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
8 vertices split.
saving mesh geostate:
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now OBJECT
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
changing mode from OBJECT to EDIT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now EDIT
changing mode from EDIT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now OBJECT
ROTATING mode= OBJECT active=<bpy_struct, Object("Cube") at 0x000002408BA52408>
8 vertices split.
restoring uv scale 0.0 at index 2
restoring uv scale 0.0 at index 3
Blender quit
at S4Studio.Blender.BlenderUtilities.RunBlender(String script, String blend, Boolean background, Boolean check_version)
at S4Studio.Blender.BlenderUtilities.ImportMlod(String fileName, String mlod, String rig, String state)
at S4Studio.ViewModels.BuyBuildLodItem.ImportMesh(BlenderUtilities blender_util, String blender_path)
at S4Studio.ViewModels.BuyBuildLodItem.<>c__DisplayClass47_0.<ImportMesh>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---
System.AggregateException: One or more errors occurred. (Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\ProgramData\S4Studio\Scripts\objectexporter.py", line 14, in <module>
save_lod(mlod,geometry_state)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\blender.py", line 445, in save_lod
save_mesh(blender_mesh, m, new_mesh, geometry_state)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\blender.py", line 348, in save_mesh
offset = vbuf.buffer.write_vertices(vrtf, sim_mesh_data.vertices, uv_scales, pos_scales,s4mesh_new.get_shader())
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\geometry.py", line 667, in write_vertices
self.write_vertex(vrtf, vertex, uvscales, posscales, shader)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\geometry.py", line 727, in write_vertex
c = v.colour[declaration.usage_index]
IndexError: list index out of range
saving mesh geostate:
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now OBJECT
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
changing mode from OBJECT to EDIT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now EDIT
changing mode from EDIT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now OBJECT
ROTATING mode= OBJECT active=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
8 vertices split.
saving mesh geostate:
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now OBJECT
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
changing mode from OBJECT to EDIT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now EDIT
changing mode from EDIT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now OBJECT
ROTATING mode= OBJECT active=<bpy_struct, Object("Cube") at 0x000002408BA52408>
8 vertices split.
restoring uv scale 0.0 at index 2
restoring uv scale 0.0 at index 3
Blender quit
)
---> S4Studio.Blender.BlenderException: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\ProgramData\S4Studio\Scripts\objectexporter.py", line 14, in <module>
save_lod(mlod,geometry_state)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\blender.py", line 445, in save_lod
save_mesh(blender_mesh, m, new_mesh, geometry_state)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\blender.py", line 348, in save_mesh
offset = vbuf.buffer.write_vertices(vrtf, sim_mesh_data.vertices, uv_scales, pos_scales,s4mesh_new.get_shader())
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\geometry.py", line 667, in write_vertices
self.write_vertex(vrtf, vertex, uvscales, posscales, shader)
File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\s4studio\buybuild\geometry.py", line 727, in write_vertex
c = v.colour[declaration.usage_index]
IndexError: list index out of range
saving mesh geostate:
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now OBJECT
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
changing mode from OBJECT to EDIT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now EDIT
changing mode from EDIT to OBJECT select=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
Mode is now OBJECT
ROTATING mode= OBJECT active=<bpy_struct, Object("s4studio_mesh_0") at 0x000002408BA23908>
8 vertices split.
saving mesh geostate:
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now OBJECT
changing mode from OBJECT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
changing mode from OBJECT to EDIT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now EDIT
changing mode from EDIT to OBJECT select=<bpy_struct, Object("Cube") at 0x000002408BA52408>
Mode is now OBJECT
ROTATING mode= OBJECT active=<bpy_struct, Object("Cube") at 0x000002408BA52408>
8 vertices split.
restoring uv scale 0.0 at index 2
restoring uv scale 0.0 at index 3
Blender quit
at S4Studio.Blender.BlenderUtilities.RunBlender(String script, String blend, Boolean background, Boolean check_version)
at S4Studio.Blender.BlenderUtilities.ImportMlod(String fileName, String mlod, String rig, String state)
at S4Studio.ViewModels.BuyBuildLodItem.ImportMesh(BlenderUtilities blender_util, String blender_path)
at S4Studio.ViewModels.BuyBuildLodItem.<>c__DisplayClass47_0.<ImportMesh>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---
Blender version 3.6.7.
Everything was working fine on version 3.2.1.2, this error started appearing after the update.
For the test, I exported the wall lamp object, replaced it with a cube mesh in blender and assigned Cut 1 (and of course removed the Cut from the lamp mesh).
The most interesting thing is that when Cut is 0, the object is successfully imported.
I will be very grateful for some help.
.package and .blend files: drive.google.com/file/d/1_yLrww2m24XdkXJb__6fAEd3wgbi6hwV/view?usp=sharing