UVToolkit icon indicating copy to clipboard operation
UVToolkit copied to clipboard

Udim packing operator sometimes not packing

Open martin-lorentzon opened this issue 11 months ago • 8 comments

There seems to be an issue with the Pack UVs (toolkit_udim_operator) where it sometimes refuses to pack the selected UVs. The native Pack Islands operator failing to pack from code sounds familiar to me and may be its own issue. I might dig deeper into the native operator's required context variables to hopefully find something of interest.

martin-lorentzon avatar Jan 31 '25 09:01 martin-lorentzon

I'm a little tempted to try my hands on implementing one of the algorithms mentioned here to bypass this issue https://projects.blender.org/blender/blender/issues/105680

I submitted a Blender ticket for this in the meantime https://projects.blender.org/blender/blender/issues/133865

martin-lorentzon avatar Jan 31 '25 13:01 martin-lorentzon

The Blender devs will probably ask, but you should include a .blend file in your report so all they have to do is open it and run the specific operator causing the issue. You'll definitely need to prove it without the use of UVToolkit

oRazeD avatar Jan 31 '25 16:01 oRazeD

All blend-files at my workplace are protected by NDA so I couldn't include anything writing the issue. But I will throw something together that reproduces the issue soon.

martin-lorentzon avatar Jan 31 '25 17:01 martin-lorentzon

Issue reporting for Blender is a bit finicky since it's basically a fight for attention, far more reports than people handling them. I've had to make a few minimum reproducible states in the past to get any eyes on issues I've run into in production.

oRazeD avatar Jan 31 '25 17:01 oRazeD

https://projects.blender.org/blender/blender/issues/133865

They closed your issue due to inactivity, you should make a new one or try re-opening it!

oRazeD avatar Mar 18 '25 18:03 oRazeD

https://projects.blender.org/blender/blender/issues/133865

They closed your issue due to inactivity, you should make a new one or try re-opening it!

I would like to but I still haven't found any good way of reproducing it with consistency.

I currently use a workaround that seems to work, basically packing UVs in a subprocess > exporting the UV coordinates in JSON format and loading them in the original instance of Blender. The idea being a fresh Blender instance would be less prone to weirdness.

I want to test my workaround some more with my nearest colleague before saying that it works every time, after which I could submit it as an option in UVToolkit. It is a bit slower to execute due to IO operations and should probably be sped up with simpler file formatting.

martin-lorentzon avatar Mar 19 '25 10:03 martin-lorentzon

If I eventually get through my laundry list of GitHub repo stuff to do I'll circle back around to this, assuming you don't already have it figured out.

oRazeD avatar Mar 20 '25 00:03 oRazeD

It's of low importance for now, I'm not actively working on this. So I would say ignore until I post an update. I think there needs to be a way to consistently replicate the error to report it back to Blender - and so far it seems fully random (but can only be triggered through calling bpy.ops.uv.pack_islands. It may have a tendency to occur more often when packing a larger number of objects - but this is speculation at this point.

martin-lorentzon avatar Mar 20 '25 08:03 martin-lorentzon