uvIsland2selSet.mel 1.2.0 (maya script)

automatically convert UV shells to Selection Sets

Th_fig1

License Type:

Freeware

File ID:

4540

File Size:

12.3 KB

Created / Updated:

Mar 12, 2007 / Mar 13, 2007

Owner:

dwarren   More free downloads from this user See users marketplace items See this users portfolio Send a Private Message

Platforms:

windows

Downloaded:

42

Maya:

7.x, 8.x

Tags:



This is a Maya mel script I wrote to automatically create Selection Sets for UV islands in UV shells of UV mapped polygonal geometry, for export to Mudbox (which supports Maya's Selection Sets). This way you can easily select UV islands in Mudbox to Hide/Unhide/Remove etc. to speed up your sculpting workflow.

NOTE: Tested with Maya 7&Mudbox 1.0.4 rev 1760 on Windows. Should work with Maya 8 & Maya 8.5 as well (though not tested)

Just to clarify some terminology:
- I use the term "UV shell" to indicate a UV map that isn't empty
- I use the term "UV island" to indicate a smaller, self-contained section of a UV Shell.

(1) Installation:
(a) Unzip the uvIsland2selSet.mel script to your mel scripts folder (consult your Maya docs if you don't know the location)

(b) Unzip the i2s_32.bmp icon to your icons folder (consult your Maya docs if you don't know the location)

(c) Make a Shelf button that sources the script and icon (consult your Maya docs if you don't know how to do this)

(2) In Maya:
(a) Load a scene that contains one or several polygonal models where:
  • the geometry is as cleanly built for eventual export to Mudbox as possible
  • each piece of geometry has no parents and no children, and is essentially its' own single node hierarchy
  • each piece of geometry has been UV mapped
(b) Click on the blue i2s icon you created on your Shelf to begin the process.

(c) A Progress Bar will start, with more complex models taking more time to complete. ESC to stop the process (any garbage left by escaping is cleaned up). (Fig. 1)



(d) When complete, each UV island in each object's UV shell will have a corresponding named Selection Set generated. To see this, you can look in your Outliner (Fig. 2), or optionally (and preferably), you can use (e), below. The "_i_" is for "island".



(e) A uvIsland2selSet Window opens upon completion (Fig. 3), which contains the following for each poly object in the scene:


  • The Name of the object (as a header for a collapsable Window Frame, click the arrow to the left to collapse)
  • The Number of UV islands found in the UV shell for that object
  • The Time at the start of and at the completion of the detection operation
  • Export button, to export the model with selection sets (launches the Export Selection Options window, make sure you set to OBJ export with Groups toggled ON and Point Groups toggled OFF)
  • A List of the named Selection Sets the script created. You can:
  • click on one of the buttons under 'Pick a Selection Set' to select & highlight that set
  • type a new set name suffix (to something other than the automatically generated incremental numbers) in one of the corresponding fields under 'Modify Set Name'
  • click a 'Click To Modify' button to commit the change to both the Selection Set in the scene and the Selection Set button in the Window (Fig. 4)


(3) In Mudbox:
(a) Import the OBJ file(s) you saved out of Maya
(b) Click on the Object List. You'll see (Fig. 5):


  • A slightly renamed version of your model Object, right click and choose Rename Object to correct it (this has to be done because Mudbox parses the OBJ file to get the model's basenode name incorrectly it seems. A small problem.)
  • All of your named Selection Sets (modelname_i_ <whatever> modelname -- the posted image shows the default Selection Set names with default incremental numeric names exported from Maya)
(c) Hide/Unhide/Remove/etc. while you sculpt
Hopefully it works for you & you find it useful! Feedback is appreciated.

Cheers,

-DW

Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum to ask any questions.
Please rate my product in the Review section.

More from this artist