top of page

My first maxscript - PrepareToPeel

Whenever Unwrap UVW modifier is added on a mesh it defaults to display Thick seams and also to displaying the green Map Seams. I never want those on, so I wrote a little script to add to my quad menu called PrepareToPeel which adds the UnwrapUVW modifier with those settings the other way: Thin seams, and No Map seams.

Note : It isn't intended to work on multiple object selections, just on one editable poly.

Here is the script (bearing in mind there may be a more efficient way to write this):

macroScript PrepareToPeel category: "tomofnz"

(

on isEnabled return

(

selection.count == 1 and classOf selection[1].baseobject == Editable_Poly

)

on execute do

(

(

-- Add an Unwrap UVW modifier, in Poly mode

modPanel.addModToSelection (Unwrap_UVW ()) ui:on

subobjectLevel = 3

-- Configure the display settings ... but notice they don't update correctly

$.modifiers[#unwrap_uvw].unwrap4.setThickOpenEdges off

$.modifiers[#unwrap_uvw].unwrap5.setShowMapSeams off

subobjectLevel = 0

-- To bypass the update not being quite right, add a second Unwrap which will immediately get discarded to refresh the first one properly

modPanel.addModToSelection (Unwrap_UVW ()) ui:on

subobjectLevel = 0

)

(

-- discard the second Unwrap ... And now we have Thin Seams and No Map Seams showing correctly in the first case

deleteModifier $ 1

)

subobjectLevel = 3

)

)

2014-09-21 12_39_52-Customize User Interface.png

Featured Posts
Recent Posts
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page