schroef / uvlayout_bridge

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

[REQUEST] Support for Blender 4.0+ #4

Open cosmic1 opened 2 months ago

cosmic1 commented 2 months ago

Currently the plugin does not work with the 4.0 series of Blender. This is due to bpy.ops.export_scene.obj being deprecated in favor of bpy.ops.wm.obj_export. We can get around this temporarily by manually rewriting the code in the AppData folder but some of the parameters have been renamed or are not available in the new function. There may also be a few other scripts that are broken due to similar changes.

schroef commented 2 months ago

Tha is for the heads-up. I'll need to check what's is possible and was is depricated. Shouldn't be that hard to adjust it

schroef commented 2 months ago

@cosmic1

Well did some testing todat, took me some time to remember it all. But the current OBJ exporter has an issue. It does not see to keep face_order. I was going nuts about why the UVmap looked so horrible. Than searched on the keep_vertex_order, this option has been taken out but is on by default. But now it seems the face_order is completely off. Kinda weird, this was never an option, so this must be a bug.

I think for now, only workaround is that i add to old legacy obj exporter with the addon. I justed tested the version with 2.91 and that does work https://projects.blender.org/blender/blender-manual/issues/96837

EDIT Not sure what it is, but now after a restart and testing more times. With same scene in both blender versions, it does seems to work. Not sure whats going on.

schroef commented 2 months ago

I'll post a new version tomorrow, hope it fixes your issue as well

cosmic1 commented 2 months ago

Thanks for looking into this and sorry to drag you back into such an old project. I think my coworker is working on my quick hacked together version but I will let him know that an official fix is coming down the pipe.

schroef commented 2 months ago

Don't worry about that, glad you did. Now it works again. I would have bumped into it eventually. I use the app now and than.

Though I have not jumped ship about the new addon methology. Need to do quite some add-ons using this new method of implementation

schroef commented 2 months ago

@cosmic1

Okay should be working now. Ive tested 2.83, 2.91 and 4.1.1 it works for me in all versions

let me know

https://github.com/schroef/uvlayout_bridge/releases/latest

edit Note i made a new version as well v073, v072 shows the fixes i did related to your issue. v073 is something in general.

schroef commented 2 months ago

I'm actually working in v074 now. I was testing some of the automation features and notices Optimize didn't really do anything. I remember some of those codes caused error so 8 left some out. I got optimize to work again now and made some more changes to the panels. I'll add that version tomorrow

schroef commented 2 months ago

Done, just added v074. Panel design has changed, you cant see preview in the release post

https://github.com/schroef/uvlayout_bridge/releases/tag/v.0.7.4

schroef commented 2 months ago

I'm working on another update actually. I was looking at the method of the uv channel function. We can send different channels. So I thought, perhaps nice when you switch it in the panel you also see the preview on the mesh object. So now when you switch to say channel 2, it also switches in the uvmap panel and the color mode in the overlays is set to textured. This is a nice little feature perhaps

https://github.com/schroef/uvlayout_bridge/releases/tag/v.0.7.5

schroef commented 2 months ago

@cosmic1

Did you try it yet?