Page MenuHome

MESH_OT_shortest_path_pick
AbandonedPublic

Authored by Dalai Felinto (dfelinto) on Aug 21 2018, 6:33 PM.

Details

Summary

Commit 1/2

Multi-Objects: MESH_OT_shortest_path_pick

This fully works as "expected", however it seems strange when
there is no selected vertex in the non-active object.

In 2.7x if you join two monkeys, select a vertex in one of them and
try to use this operator in the other it will select the lonely newly
selected vertex.

If you split both monkeys and do this in 2.8 while multi-editing them
you won't get nothing when trying to ctrl+RMB any vertex in the monkey
object that has nothing selected yet.

I propose to have this addressed in an upcoming patch where we always
select a vertex if no vertex was previously selected.

Commit 2/2

Improvement to MESH_OT_shortest_path_pick behaviour

Select a vertex/edge/face if there was nothing previously selected
(if the click hit something, of course).

Diff Detail

Repository
rB Blender
Branch
temp-mesh-shortest-path (branched from blender2.8)
Build Status
Buildable 1934
Build 1934: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Aug 22 2018, 12:25 AM
Campbell Barton (campbellbarton) requested changes to this revision.Aug 22 2018, 12:48 AM

I couldn't get this patch to work, (it builds but doesn't select the vertex in my testing).

Also, this should respect the current mode, (select nearest vert/edge/face since it doesn't make sense to select a single vert or edge in face mode)

This revision now requires changes to proceed.Aug 22 2018, 12:48 AM

Fix for check when no element was selected

Also, this should respect the current mode, (select nearest vert/edge/face since it doesn't make sense to select a single vert or edge in face mode)

You are right, and it actually does just that. I was using the vertex as an example, but I should've been more clear., I will update the commit message and the description of the task here to reflect that.

I couldn't get this patch to work.

Fixed. In a final cleanup/refactor was trying to be fancy and use the ELEM(NULL, ... but it's not the case here. (apparently I'm not the only one getting this wrong though ;) - 5200f6a2d7b56fa6d28c6f70d6c90642790d22c3).
Sorry for not testing it thoroughly again.