ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
How to access the functions in the 'Arrange Elements' group in UVW Unwrap?
Submitted by JensSchmidt on Sun, 2016-12-11 04:01
I'm trying to use the functions under the 'Arrange Elements' in UVW Unwrap in a script but can't seem to find them, are they even exposed to maxscript?
I got it working by adding a select obj before pack but now I ran into another wall:
When changing the map channel in the UVW Unwrap modifier manually you get a popup asking if you would like to Move the UVs from the current channel to the newly selected one or Abandon them. When setting the map channel via script it moves the UVs and there is no param to let me change that...stuck again
Comments
I think that those buttons
I think that those buttons works the same way as Tools->Rescale Clusters and Tools->Pack UVs
For example, open the Maxscript Help file and search for Rescale Clusters
Tools and Scripts for Autodesk 3dsMax
Wonderful, thank you so much :)
I have not been able to go back to this task until today and try your suggestion. Unfortunately I get this at the line where I have my function call:
-- Error occurred in anonymous codeblock; filename: D:\Jens\3dsmax scripts\Merge Export 2.ms; position: 1500; line: 79
-- MAXScript Listener Eval Exception:
-- Unknown system exception
-- MAXScript callstack:
-- thread data: threadID:26028
-- ------------------------------------------------------
-- [stack level: 0]
-- In top-level
74 uvMod = UVWunwrap()
75 uvMod.setMapChannel 2
76 addModifier obj uvMod
77
78 -- pack( method, spacing, normalize, rotate, fillHoles )
79 uvMod.pack 1 0.02 true false false
How do I go about resolving something like this?
EDIT:
I get it to run as long as I do not choose method 1 as first param. But when it runs it still doesn't perform the packing, wierd.
.
Create an object.
Add Unwrap UVW modifier.
Open the UV Editor and run this:
Tools and Scripts for Autodesk 3dsMax
That works...
...wierd :/ does it matter whether the uvedit window is open or not!?!?
Fixed it, but now there is another problem
I got it working by adding a select obj before pack but now I ran into another wall:
When changing the map channel in the UVW Unwrap modifier manually you get a popup asking if you would like to Move the UVs from the current channel to the newly selected one or Abandon them. When setting the map channel via script it moves the UVs and there is no param to let me change that...stuck again
.
I don't know, but in all of my scripts that packs the UVs the UV Editor is open.
Tools and Scripts for Autodesk 3dsMax
Thank you anyway :)
Thank you anyway :)