schroef / uvlayout_bridge

Blender Add-On: A bridge between Headus UVlayout and Blender
22 stars 2 forks source link

[BUG] #3

Closed hocrudeat closed 2 years ago

hocrudeat commented 2 years ago

OS: Windows

ADDON:

Describe the bug I have a problem, when Send model from UVLayout:

Python: Traceback (most recent call last): File "C:\Users\hocru\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\uvlayout_bridge__init.py", line 783, in execute UVL_IO() File "C:\Users\hocru\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\uvlayout_bridge__init__.py", line 666, in UVL_IO bpy.ops.import_scene.obj(filepath = path + file_outName, File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\bpy\ops.py", line 132, in call__ ret = _op_call(self.idname_py(), None, kw) TypeError: Converting py args to operator properties: : keyword "global_clight_size" unrecognized

location: :-1

schroef commented 2 years ago

Is it possible to see the object or share the object simplified, so no mods and no mats?

hocrudeat commented 2 years ago

On any object, including a cube or sphere. There is only mesh in the scene. (All mods off/on = no result)

hocrudeat commented 2 years ago

screen

schroef commented 2 years ago

Ill check tonight at home, at work im on a old mac and can only run to 2.83 and there it seems to work. At home i got 2.93 on windows 11. Ill check and see what wrongs with the code

Thanks for the report!

schroef commented 2 years ago

what you could try, if you want to try it now. Is open the init.py file and then go to line 666 there is the import function. Then check line 678, it should state global_clight_size = 0, then add # character, so it gets greyed out (comment out). Then restart Blender and try again.

It seem the OBJ import in blender 2.93 has been changed. I have not checked that

hocrudeat commented 2 years ago

Thks, its work...good addon.

schroef commented 2 years ago

Ah nice, im just testing now in windows. Weird thing is i get an error when exporting files I see this error

Python: Traceback (most recent call last):
  File "C:\Users\romboutversluijs\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\uvlayout_bridge\__init__.py", line 789, in execute
    UVL_IO()
  File "C:\Users\romboutversluijs\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\uvlayout_bridge\__init__.py", line 610, in UVL_IO
    uvlayout_proc = subprocess.Popen([UVLayoutPath + 'uvlayout.exe', '-plugin,' + uvlb_mode + ',' + uvlb_uv_mode, path + file_Name])
TypeError: can only concatenate tuple (not "str") to tuple

location: <unknown location>:-1
Error: Python: Traceback (most recent call last):
  File "C:\Users\romboutversluijs\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\uvlayout_bridge\__init__.py", line 789, in execute
    UVL_IO()
  File "C:\Users\romboutversluijs\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\uvlayout_bridge\__init__.py", line 610, in UVL_IO
    uvlayout_proc = subprocess.Popen([UVLayoutPath + 'uvlayout.exe', '-plugin,' + uvlb_mode + ',' + uvlb_uv_mode, path + file_Name])
TypeError: can only concatenate tuple (not "str") to tuple

What version of the addon are you using if i may ask?

schroef commented 2 years ago

Could you check the console if you see any of these errors or does it actually open Headus UVlayout for you?

schroef commented 2 years ago

I not sure what the issue with file path was, I got it fixed, im also updating the layout a bit to bl280 method using sub-panels. Not 100% sure i like it though

Here's a preview before and after

Before panel-nosplitproperty-bl293-v068

After Panel_v0 6 8_bl_293_2021-11-04

hocrudeat commented 2 years ago

"What version of the addon are you using if i may ask?" - 0.6.5 screen1 Could you check the console if you see any of these errors or does it actually open Headus UVlayout for you? after comment 678 str all work norm.

schroef commented 2 years ago

Thanks for the screengrabs! That is not the console though :) That is the info window, it depends a bit on your system how you can view the console. On Windows you can simply go to window in the top and select view console. On OSX its a bit more complicated. But your running Winodws, so that doesnt matter.

hocrudeat commented 2 years ago

With comment 678 str in init.py :

C:\Program Files\Blender Foundation\Blender 2.93>blender.exe Read prefs: C:\Users\hocru\AppData\Roaming\Blender Foundation\Blender\2.93\config\userpref.blend OS used: win32 register_class(...): Warning: 'UVLBridge' does not contain 'PT' with prefix and suffix Objects sel only: <bpy_struct, Object("Cube") at 0x00000247F3BA3098> Objects include: <bpy_struct, Object("Cube") at 0x00000247F3BA3098> Export path: F:/MODELS/1_IN_WORK/3_Blender_Kaino_Robot/ - File:Blender2UVLayout_TMP.obj ( 0.0000 sec | 0.0000 sec) OBJ Export path: 'F:/MODELS/1_IN_WORK/3_Blender_Kaino_Robot/Blender2UVLayout_TMP.obj' ( 0.0040 sec | 0.0030 sec) Finished writing geometry of 'Cube__UVL'. ( 0.0060 sec | 0.0060 sec) Finished exporting geometry, now exporting materials ( 0.0060 sec | 0.0060 sec) OBJ Export Finished Progress: 100.00%

╨Ш╨╜╤Д╨╛╤А╨╝╨░╤Ж╨╕╤П: UVLayout bridge - Done!

hocrudeat commented 2 years ago

If i recomment 678 str in init.py :

C:\Program Files\Blender Foundation\Blender 2.93>blender Read prefs: C:\Users\hocru\AppData\Roaming\Blender Foundation\Blender\2.93\config\userpref.blend OS used: win32 register_class(...): Предупреждение: 'UVLBridge' does not contain 'PT' with prefix and suffix Objects sel only: <bpy_struct, Object("Cube") at 0x0000018BD1F770A8> Objects include: <bpy_struct, Object("Cube") at 0x0000018BD1F770A8> Export path: F:/MODELS/1_IN_WORK/3_Blender_Kaino_Robot/ - File:Blender2UVLayout_TMP.obj ( 0.0000 sec | 0.0000 sec) OBJ Export path: 'F:/MODELS/1_IN_WORK/3_Blender_Kaino_Robot/Blender2UVLayout_TMP.obj' ( 0.0050 sec | 0.0040 sec) Finished writing geometry of 'Cube__UVL'. ( 0.0070 sec | 0.0060 sec) Finished exporting geometry, now exporting materials ( 0.0070 sec | 0.0060 sec) OBJ Export Finished Progress: 100.00%

Python: Traceback (most recent call last): File "C:\Users\hocru\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\uvlayout_bridge__init.py", line 783, in execute UVL_IO() File "C:\Users\hocru\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\uvlayout_bridge__init__.py", line 666, in UVL_IO bpy.ops.import_scene.obj(filepath = path + file_outName, File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\bpy\ops.py", line 132, in call__ ret = _op_call(self.idname_py(), None, kw) TypeError: Converting py args to operator properties: : keyword "global_clight_size" unrecognized

location: :-1 ╨Ю╤И╨╕╨▒╨║╨░: Python: Traceback (most recent call last): File "C:\Users\hocru\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\uvlayout_bridge__init.py", line 783, in execute UVL_IO() File "C:\Users\hocru\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\uvlayout_bridge__init__.py", line 666, in UVL_IO bpy.ops.import_scene.obj(filepath = path + file_outName, File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\bpy\ops.py", line 132, in call__ ret = _op_call(self.idname_py(), None, kw) TypeError: Converting py args to operator properties: : keyword "global_clight_size" unrecognized

location: :-1

schroef commented 2 years ago

Ahh i see, its same issue, Ive fixed that but im also working on other improvements as well as adding new features.

For the time being, you can remove that part in line 640, it states "global_clamp_size = 0". keep the end bracket and ; But you already did that i believe.

schroef commented 2 years ago

New releases should fix that, ive also added new features. The optimize feature doesnt seem to work very consistent across different OS version. on OSX it runs well, crashes sometimes, on Windows it crashes always. Not sure why that is, optimize from the app itself is flawless