hayden0729 / berrybush

BRRES support for Blender 3.3 focused on New Super Mario Bros. Wii
GNU General Public License v3.0
31 stars 2 forks source link

Error when importing #8

Closed CacaBueno64 closed 2 months ago

CacaBueno64 commented 4 months ago

Python: Traceback (most recent call last): File "C:\Users\...\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\berrybush\blender\brresimport.py", line 1581, in execute BRRESImporter(context, brres.BRRES.unpack(fileData), self) File "C:\Users\...\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\berrybush\blender\brresimport.py", line 1268, in __init__ self._loadModel(model) File "C:\Users\...\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\berrybush\blender\brresimport.py", line 1368, in _loadModel self.models[model] = BRRESMdlImporter(self, model) File "C:\Users\...\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\berrybush\blender\brresimport.py", line 54, in __init__ self._loadMat(mat) File "C:\Users\...\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\berrybush\blender\brresimport.py", line 306, in _loadMat self._importTex(matSettings.textures.add(False), tex) File "C:\Users\...\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\berrybush\blender\brresimport.py", line 201, in _importTex texSettings.mapMode = f"{tex.mapMode.name}_{tex.coordIdx + 1}" TypeError: bpy_struct: item.attr = val: enum "UV_-2" not found in ('UV_1', 'UV_2', 'UV_3', 'UV_4', 'UV_5', 'UV_6', 'UV_7', 'UV_8', 'PROJECTION', 'ENV_CAM', 'ENV_LIGHT', 'ENV_SPEC') here's the file that I want to import : https://mega.nz/file/g9cjjTRJ#BEuQ8jxz2pbNwC6HlRtN4q4G1wvU1Zt4ZxwXT1rriNk

hayden0729 commented 4 months ago

Hi, thanks for the report! This a known bug caused by a BRRES material feature that's not used in NSMBW (using vertex colors as texture coordinates). This will be supported eventually, but in the meantime, you can get around it by making the "shading" texture of the soccer ball use regular UV mapping.

To do this with BrawlCrate, navigate here: image And change the Type and Coordinates fields as follows: image Then, it should be possible to import the model with BerryBush. This will change the appearance of the soccer ball, so if you want to maintain that after making changes, you can export and then change those fields back to their original values afterwards.

Until this is supported, if similar errors come up when importing other models, look for textures with similar settings ("Colors" mentioned in the type and coordinates). The workaround will be the same.

CacaBueno64 commented 4 months ago

I managed to import it, thank you for taking the time to responding me