Page MenuHome

Fix T102680: UV Pick shortest Path wrong for multi-object editing
AbandonedPublic

Authored by Philipp Oeser (lichtwerk) on Nov 24 2022, 11:01 AM.

Details

Summary

This was not supported in rBea5fe7abc183.

For this to work properly, we just loop over all
objects_in_edit_mode_unique_data_with_uvs.

NOTE: in face select mode, there was also a comment to check UV selection (instead of just picking the active face) which is now added. This became more of a problem for multi-edit since many could have an active (but unselected) face which made shortest path picking start from that active unselected face (which just seems unituitive in pratice.
NOTE: we are intentionally not breaking out of the objects loop after one successful path picking. So having (selected) active elements in multiple objects might end up picking shortest paths on both. Reason is that atm., UV_NEAREST_HIT_INIT_MAX is used for finding nearest elements (as opposed to UV_NEAREST_HIT_INIT_DIST_PX) which will make the second click successful even for far away selections in other objects [so breaking early might actually do the shortest path on one object but return early before picking shortest path on the object one was actually interested in]. This is debatable, UV_NEAREST_HIT_INIT_DIST_PX can have problems when zoomed in for edges and faces even with high values. So for now, allow for selections in multiple objects (even though it breaks redo for all but the first object).

Diff Detail

Repository
rB Blender
Branch
T102680 (branched from master)
Build Status
Buildable 24807
Build 24807: arc lint + arc unit

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Nov 24 2022, 11:01 AM
Philipp Oeser (lichtwerk) created this revision.
Philipp Oeser (lichtwerk) added projects: Modeling, Restricted Project.Nov 24 2022, 11:02 AM

Don't really know this area very well... no obvious red flags from me.

source/blender/editors/uvedit/uvedit_path.c
697

Can you reference the exact diff here?

source/blender/editors/uvedit/uvedit_path.c
697

Perfer not to reference diff - instead, include the reasoning for this working the way it does as a code-comment.

add code comment (rather than referring to the Diff)

Philipp Oeser (lichtwerk) marked 2 inline comments as done.Jan 6 2023, 10:59 AM