[Add On] UV Align\Distribute

Thanks! That’s way i’ve created this add - on!!

I agree, this would be an awesome feature. I have such script for maya, and it is a huge time saver. You make islands roughly the same size, place them one over other roughly, and the script analyzes the distance beetween nearby UVs, based on a threshold set by user, and moves them to one coordinate.

I found a bug. Some faces are distorted too during the alingment.

Here is the test file: https://dl.dropboxusercontent.com/u/26887202/blender/test_UVAlign_bug_01.blend

Edited: It seems it happens because of selected UVs but not selected faces.

Thank you for your work on this script.
Maybe sometime in the future you`ll have time to make a time saving addition your script to match similar UV shells. (example screenshot is from Maya)
It happens many times that similar UV islands are a little bit distorted as a result of scaling meshes, or some non-careful editing, and a simple “transfer UVs” wont work for some reason (topology has changed slighthly or something). Matching according UVs on a threshold basic comes very handy.


+1. I already had 10000 situations where i would use such a feature.

@indik: i have look at the script you’are talking about… It’s a cool feature, but i think it go out from the general purpose of this add-on: just simple alignment and distribution of UV in the uv space, i think, it’s better to implement it as separate operator, maybe i can do it, but not soon.

@mifth: i have look at the video, and i have downloaded the file, i made the same things you do in the video, and effectively it happen, but it’s not really a bug… If you don’t have changed you’r current file status after uploading it here, try this: select all faces in the 3D View and then look at the UV editor you see that over the two faces you have selected before, up-right, there is another UV island selected… The script work on all uv selected even they are not visible, i’ll fix it so hidden island are not processed. However remember that an island is selected even if one vertex is of that island is selected…

And for both, just to be sure if i understand, try to do this, select all the UV island that you want to have the same scale and press ctr+ a(average island scale), if this is not what you want, tell me.

Hello @rebellion,

About the “bug”: This is not a bug but it distorts hidden UVs. Good that you can reproduce it. I hope it’s possible to improve so that hidden selected UVs were not used in the alignment.

About “Fit Islands” feature: I think it’s better to put such a feature in this addon. As this is Alignment of UV Vertices. And this fits to this addon 100%. You can make additional class to separete this feature so that it would be easier to write.

Ctrl+A does not change proportions. Here is my test: http://i.imgur.com/o66r5Kg.png

New release, finally, the 1.0 with all the feature that i have in mind.

Cool! Thank you for fixing hidden faces!
Actually, i still cannot understand how to use Distribute feature. Anyway, the Align works perfectly.

I think it’s time to put the addon in Blender Release. Are you ok with this?

What you need to do:

  • Add the addon to the wiki here http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/UV
    Btw, UVUtility and TextureAtlas addons are made by me. :slight_smile:
  • Go to #blendercoders IRC chat and talk to guys to add the addon in the git repository. “ideasman42” will help you to add the addon into Git. You will be able to commit your changes to Blender’s Git always.

You did really powerful UVTools which deserve to be put in the blender! :slight_smile:

thankyou verymuch. timesaver script!

btw, there is an option to check if the uvs are flipped ? (like in maya, if they are flipped maya shows you in red)

Thanks, nice! Hope it can have more usefull tools!

@mifth: for me it’s ok, but i have to subscribe to the wiky + found a IRC client, is it possible to only use developer.blender.org for this things?? For distribution features… If you have tried inkscape you should know what they do, However they simply distribute island across the space(from the first island, in space position, to the last) so you must have at last three island selected (2 for the “space delimitation”, and 1(in the middle)that is moved in this space.Of course to work correctly the island should be columned or in a single row, basically this features should be used after alignment, to distribute space between them.

@ MmAaXx: no there is no such option, i know it’s quite annoying, like casually rotated uv or scale. At the moment i don’t have plane to implement this, plus i think this feature also don’t fit with this add-on (it’s align\distribution and not align\distribution + other tools!). Sorry.

I think it’s possible to use developer.blender.org but there are so many things… it’s easier to chat in IRC as i did for my scripts.
You can go online through the browser http://webchat.freenode.net/ Just login to #blendercoders
Entire list of channels can be found here http://wiki.blender.org/index.php/Community:Chat

Also you need to make the script compatible to pep8. You need to parse it through Autopep. You can pass the script through Pycharm IDE to Autopep it. http://blog.jetbrains.com/pycharm/2013/02/long-awaited-pep-8-checks-on-the-fly-improved-doctest-support-and-more-in-pycharm-2-7/

Also, you will need to add SSH public key to your developer.blender.org account to have access to commit to git.
After this you need to checkout the repos with your SSH Key: http://wiki.blender.org/index.php/Dev:Doc/Process/Addons

If you have any issues you can ask me here and i’m glad to help you. Or ask me in the IRC. My nick is the same.

Hi!
I have allows me to insert it into UV / Image Tools!
the thread:
http://www.blenderartists.org/forum/showthread.php?339842-Addon-UV-Image-Tools

I’ve decided to implementing uv matching and scale matching, they will be available in the next version, plus thanks to jonim8or, move overlapping uv will be added!!

New release with new features: island matching and scale equalization plus some bug fixes!!!

For removing overlapping UV, unfortunately, the code created by jonim8or, is not what i have in mind(i need something like inkscape), however i need to thanks him for the island detecting algorithm that i’m using on my script!

Hello @rebellion !

I found issue with “Match Island”.

And Here is the file: https://dl.dropboxusercontent.com/u/26887202/blender/test_x.blend

Just play with the threshold(i’ve just noticed that in the script there is a grammar error…): for me 0.03 worked with you’re file XD

Hello!

Thanks for the answer. :slight_smile:

Another question about the Match Island:
Is it possble to apply this feature only for selected vetices. Right now the feature is applied to all islands.

Like this: http://i.imgur.com/4koaMPV.png

It’s possible, but it require additional code, at the moment all the operator share the same. I prefer to keep things simple. However for all this month i’m unavailable, so i can’t make any changes…