Page MenuHome

Fix T50132 - UV Sticky mode is not respected with Border select
ClosedPublic

Authored by Hugo Sales (someonewithpc) on Feb 22 2018, 9:20 PM.

Diff Detail

Repository
rB Blender

Event Timeline

Fixed indentation and dumb way of implementing it

Removed commented function. In my opinion, it's clearer if the contents are just used directly.

Moved repeating code into a function

Brecht Van Lommel (brecht) requested changes to this revision.Feb 25 2018, 8:48 PM

It seems the main code got lost in the last diff update?

But looks generally fine to me, just minor nitpicks.

I would add the if (sima->sticky == SI_STICKY_VERTEX) test around uvedit_vertex_select_tagged function call, and always tag the vertices. I think that's a bit more clear, and we shouldn't have to loop over all the faces again in other sticky modes.

source/blender/editors/uvedit/uvedit_ops.c
339

Code style: { should be on a new line for functions and tabs should be used for indentation.

2928

Code style: add space between ) and {, here and in other places.

This revision now requires changes to proceed.Feb 25 2018, 8:48 PM

I think I had messed up my local commit and had the changes in two commits, thus it wasn't showing in the diff :/ I was already using tabs, for instance.
I believe everything you mentioned is fixed now.

Brecht Van Lommel (brecht) requested changes to this revision.Feb 25 2018, 9:57 PM

Sorry, I missed something before. We should clear all the vertex tags in a loop before the loop over faces, like this:

BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
    BM_elem_flag_disable(eve, BM_ELEM_TAG);
}

With the current code a vertex shared between faces can lose a tag that was set before.

source/blender/editors/uvedit/uvedit_ops.c
2950

Space: ) {

This revision now requires changes to proceed.Feb 25 2018, 9:57 PM

Changed to untagging all vertices in a loop before.

Committed, thanks for the patch!

This revision was not accepted when it landed; it landed in state Needs Review.Feb 25 2018, 10:29 PM
This revision was automatically updated to reflect the committed changes.