Save Automatic Flatten UV ?

Hello,

I'm new here so about me :

I'm benoît from Belgium and CG instructor and 3D realtime dev. I have skills in 3D with 3ds max, XSI and Blender, PHP programming and MySQL.

Here is my questions :

I would like to save the automatic flatten uv after texture baking :

- The goal is to select all objects in the scenes who have an Automatic Flatten UV applied on.

- After all objects are selected i would like to save each uvmap in a tempory folder (system folder by default?)

- Change each selected objects uvmap channel from 3 to 1.

- Load and re apply the saved UV map.

I know how I must do this in logic but not with maxscript as I just discover it an do not found a clear and complet commande reference...I dig the maxscript reference but it's not clear for me, maybe I've not my eyes at the good place...

Thanks for all helps, suggest or coments.

Comments

Comment viewing options

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

So you basically want the

So you basically want the flattened UVs to be in map channel 1 instead of map channel 3, right?
Is the whole Saving/Loading process even needed? When I change the mapping channel in the Unwrap modifier, the UVs do not change in any aspect, so I guess there is no need to save and load them back in again? Maybe you are fully aware of this and really need to save out the UVs, but if not could you not just change the mapping channel in the RenderToTexture Dialog before texture baking? Or if already baked, you could use this to change the channel afterwards:

for obj in objects where obj.modifiers[#Automatic_Flatten_UVs] != undefined do
(
		max modify mode -- open modify panel
		m = obj.modifiers[#Automatic_Flatten_UVs]
		modPanel.setCurrentObject m -- select Unwrap_UVW modifier
		m.unwrap.setMapChannel 1
)--end for

If you really need to save and load the UVs this might get complicated, because MaxScript will always open the Save File and Load File dialogs. Maybe Anubis can help you on that topic, he has already contributed to it in this thread:
http://area.autodesk.com/forum/autodesk-3ds-max/maxscript/transfering-uv...

Cheers

Never get low & slow & out of ideas

Svennovich's picture

Were you able to solve this?

Were you able to solve this? I'm trying to do the same,
swapping uv's from channel 3 to 1
with saving the uv's external or maybe in 3ds max directly...but do not find it;

please let me know, would be great help :)

thanks

Comment viewing options

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