Page MenuHome

unstitch/unweld T37880

Authored by Laurie Harding-Russell (magicmoose) on Feb 4 2016, 5:50 AM.



A feature to unstitch/unweld UVs in a similar fashion to the rip tool in the mesh edit mode.

Once the user has selected the desired UV elements, he or she can press the 'u' key to rip them from the rest of the UV mesh.

Diff Detail

rB Blender
arcpatch-D1761 (branched from master)
Build Status
Buildable 8597
Build 8597: arc lint + arc unit

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Feb 6 2016, 11:22 PM
Brecht Van Lommel (brecht) edited edge metadata.

Thanks for picking this up!

Testing this patch, maybe I'm misunderstanding how it works, but I can't get it to do what I expect.

  • It seems to move some UVs but leaves others behind, for example try using unstitch in this file:
  • Selecting a single vertex in the UV editor and using unstitch seems to do nothing.
  • I expected this to start the translate tool, like mesh rip does in the 3D view. Currently it computes some kind of automatic offset, based on the number of selected UVs, but this doesn't make much sense to me.
  • The tool in the 3D view also takes into account the mouse cursor position to determine from which side to rip.
  • When "Keep UV and edit mode mesh selection in sync" is selected in the UV editor header, it's still using the selection as if that option is disabled.

It would help if you had a .blend or screenshots showing how this tool works.

This revision now requires changes to proceed.Feb 6 2016, 11:22 PM

Try using the rip tool in mesh edit-mode, this uses the mouse cursor and selected edges to detect which contiguous areas to rip (notice this code isn't using the mouse coordinates).

Thanks for all the input! I have already coded most of a new solution using the mouse position. I'm a little a confused about your comment on not using the mouse coordinates.

Currently my new solution is working similarly to that mesh rip algorithm in that:

  • it goes through each face and determines if the selected parts are an edges or a vert. (My algorithm doesn't walk through them like yours since uv's only point to other uv's in a given face -- I guess I could potentially use a UvElementMap).
  • If an edge is found in the same uv position as a vert it deselects that vert.
  • I determine the rip direction based on the vector length from the mouse to the middle of the face.

It's a brute force approach and not very elegant. I've included a few pictures below to show you how its working so far (there are still a few stupid bugs). There seem to be a few cases where they differ slightly in how they deal with a rip (eg. vertices in a cross shape will rip differently). I also let mine deal with multiple rips. Is this the kind of solution you want?

Also, I don't know if I understand how the rip should be done in "keep UV and edit mode mesh selection in sync." Sorry, i'm a noobie. As far as I can tell, the mode requires the UV vertices to remain in sync with the mesh vertices; however, to rip the uv vertices one would have to deselect some of them. I would assume this isn't allows? I guess I could separate the ripped vertices from the rest?

Laurie Harding-Russell (magicmoose) removed rB Blender as the repository for this revision.

Redid the algorithm to match the rip mesh tool.

Forgot to remove debugging comments. Sorry.

Sorry, I noticed a few errors. Don't check this out yet.

This revision now requires changes to proceed.Jan 21 2018, 4:20 AM
Campbell Barton (campbellbarton) requested changes to this revision.EditedWed, Jun 17, 9:56 AM

I've just been looking into this patch (years later I realize), and finding it doesn't work in situations it really should.

Requesting changes, although it may be that this needs a different approach.

I would try making this work by finding contiguous edge-selections in the UV's, then choosing a side to rip.

This choice seems to be made in such a way that it makes mistakes quite often, however this should be reliable, as it is in mesh edit-mode.

This revision now requires changes to proceed.Wed, Jun 17, 9:56 AM

Committed alternate implementation rB80393a0ebadc: UV: add rip tool closing.