Auto Align UVWMap

1 vote
Version: 
1.4
Date Updated: 
09/11/2022
Author Name: 
Obaida

3dsMax Script for applying UVW Map Modifier Depending on Selected Edge or Longest Edge of each Face .

UPDATE 1.4 :

  • Fix UV Modifier Alignment .

  • Set Coordinate system to Local (getting wrong result on other coordsystems) .

UPDATE 1.3 :

  • Improve the Function of Grouping Faces by Angle .

UPDATE 1.2 :

  • New UI .
  • Improved Function Speed .
  • Add CheckBox to Get UV Rotation from Selected Edges .
  • Add Max Angle Value to Detect Polys with Same UV Modifier .

UPDATE 1.1 :

  • Lock Max UI for Better Performance , (Thanks to Barigazi) . 

  • Add Progress Bar .

  • Normal Execute will keep all the UVW Map Modifiers . 

  • AltExexute will Collapse the UVW/EditPoly Modifiers .

IMPORTANT NOTE : The script not made to deal with heavy objects , so please save your work before using it .

Video URL: 

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
obaida's picture

Thanks

Thanks for the fix .

barigazy's picture

...

Predefined "GetFaceDegree" fn makes error. BTW ... only viewport and command panel are frozen but not MXS EDITOR and Listener
In these situations, when max freeze, just run this line alone  windows.sendmessage (windows.getmaxhwnd()) 0x000B 1 1
Here is the corrected code. Also, I added test scene code at the beginning

AttachmentSize
autoalignuvw_optimized.ms 3.53 KB

bga

obaida's picture

Thanks barigazy for the

Thanks barigazy for the advice and the optimize , I appreciate that , you did a lot for this community , keep it up to :) .
btw , the script you share throwing error and max freeze .

barigazy's picture

...

Nice job man (+1). I played with your code a bit.
A faster solution will be with single Unwrap modifier, but your concept is OK for simple geometries.
Anyway ... avoid declaring local variables inside "for-loop" because they are always local inside brackets. I added "UNDO" fn and windows.sendmessage which decreases a bit of time.
I tested this on six “frame” object (like 2nd object on your video) and this is the result:

-> your code
time:17.464 memory:233392L
-> optimized code
time:15.248 memory:185452L

Of course it can be optimized more ;)
Keep up good work

AttachmentSize
autoalignuvw_optimized.ms 3.07 KB

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.