UVgami icon indicating copy to clipboard operation
UVgami copied to clipboard

UVgami wont activate

Open rowsell3 opened this issue 1 year ago • 5 comments
trafficstars

trying to activate UVgami in blender 4.0.1 but keep getting a python Traceback error. the error message is as follows:

Traceback (most recent call last): File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.0.1.0_x64__ppwjx1n5r4v9t\Blender\4.0\scripts\modules\addon_utils.py", line 364, in enable mod = importlib.import_module(module_name) File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.0.1.0_x64__ppwjx1n5r4v9t\Blender\4.0\python\lib\importlib_init_.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in call_with_frames_removed File "C:\Users\Rowse\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\UVgami_init.py", line 17, in from .src.manager import manager File "C:\Users\Rowse\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\UVgami\src\manager.py", line 18, in from . import progress_bar File "C:\Users\Rowse\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\UVgami\src\progress_bar.py", line 14, in SHADER = gpu.shader.from_builtin("2D_UNIFORM_COLOR") ValueError: expected a string in ('FLAT_COLOR', 'IMAGE', 'IMAGE_COLOR', 'SMOOTH_COLOR', 'UNIFORM_COLOR', 'POLYLINE_FLAT_COLOR', 'POLYLINE_SMOOTH_COLOR', 'POLYLINE_UNIFORM_COLOR'), got '2D_UNIFORM_COLOR'

rowsell3 avatar Nov 22 '23 05:11 rowsell3

went in to src\progress_bar.py and changed "2D_UNIFORM_COLOR" to "UNIFORM_COLOR" this seamed to work and the addon activated successfully. however upon attempting to unwrap a mesh UVgami kept throwing "unkown error" alerts and wouldnt unwrap the mesh.

rowsell3 avatar Nov 22 '23 06:11 rowsell3

Thanks for letting me know about this! It seems there were some breaking changes to the Blender API in 4.0. I'll be able to fix this on the weekend, but for now you could download an older version like 3.5 and it should work properly.

DanielBoxer avatar Nov 22 '23 13:11 DanielBoxer

The unknown error is when the engine process has a return code that isn't handled. What kind of mesh are you trying to unwrap? Did unwrapping a cube also give you an unknown error?

DanielBoxer avatar Nov 26 '23 16:11 DanielBoxer

Yes to both of those. unwrapping a cube in blender 4.0 caused a Unknown error. I downgraded back to 3.3 to play around with plugin and it worked perfectly! I think the issue is as you said before, some api changes in blender 4.0 are causing issue with the plugin. Additionally, I don't know if this is the place to ask (im very new to github), but in future would you consider adding a feature to control exactly how much stretching the addon deems acceptable?

rowsell3 avatar Nov 27 '23 02:11 rowsell3

That's strange, I can't seem to get the unknown error. After changing the shader to "UNIFORM_COLOR" like you did, it worked for me on 4.0.1. Maybe there's something else going on as well.

Yes, issues on github is a good place to ask for new features. For the stretching feature do you mean like a number input for more control over the stretching? Right now there is a quality dropdown that allows you to choose 3 presets for accepted stretching but it doesn't let you input an exact value.

DanielBoxer avatar Dec 08 '23 01:12 DanielBoxer