This script has 2 goals:
1) It is a tutorial for people learning Maxscript
2) It also help artists save time when setting UVs on meshes or patches.
AlignUVWMapGizmoOnAverageNormal
Downloads
Version 1Listed version
Community copySource comment
- 3ds Max compatibility
- See original listing claims
Community reviewsNo reviews yet.
Listing details
- Version
- 1
- From original requirements
- 5 or newer
- Original version requirement
- 5+
- Legacy votes
- 6
- Listing created
- Homepage
- http://dl3d.free.fr
How compatibility works
Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.
“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.
Community reports record successful tests on specific releases.
Description
Setup & notes
How to use it ?
One object and only one should be selected - then select somes faces on this object.
And click on the button on the script UI and it will add a UVWMap modifier to the selected faces of your object and it will align the gizmo on the average normal of the selected faces.
To make you save time to understand whitout too much headache what I am doing in this script - you need to know the following:
- We get the selected faces array from the selected node.
- We compute the average normal of the selected faces.
- From this average normal - we build a pure rotation matrix (no translation and no scale - just a rotation).
- Then we add a UVWmap modifier to the selected node.
- Finally this rotation matrix is set into the gizmo transform of the UVWMap.
- And the magick comes to life - well - of course - if no bug has appeared from here. :-)
- The heart of this script is the 'AddUVWMapAnddoTheStuff' function - at this end of it.
We have choosen on purpose not to do the fit operation after the gizmo has been aligned because it will complicates the script with Bounding boxes calculation. It will be done in another version of this script.
One object and only one should be selected - then select somes faces on this object.
And click on the button on the script UI and it will add a UVWMap modifier to the selected faces of your object and it will align the gizmo on the average normal of the selected faces.
To make you save time to understand whitout too much headache what I am doing in this script - you need to know the following:
- We get the selected faces array from the selected node.
- We compute the average normal of the selected faces.
- From this average normal - we build a pure rotation matrix (no translation and no scale - just a rotation).
- Then we add a UVWmap modifier to the selected node.
- Finally this rotation matrix is set into the gizmo transform of the UVWMap.
- And the magick comes to life - well - of course - if no bug has appeared from here. :-)
- The heart of this script is the 'AddUVWMapAnddoTheStuff' function - at this end of it.
We have choosen on purpose not to do the fit operation after the gizmo has been aligned because it will complicates the script with Bounding boxes calculation. It will be done in another version of this script.
Comments (3)
Comment policy
dead link
The link is dead. Where can this script be downloaded?
try
this..
Attachments
Excellent!
Excellent script! Glad it still works with 2012.