Adverti horiz upsell

May9 - Maya custom tools and prefs 1.10.9 for Maya (maya script)

May9 is a set of settings and tools for Autodesk Maya, from community user base.

License
Button download
2,629 Downloads

Compatibility

  • 2016

Operating Systems

  • Linux
  • Mac
  • Windows

History

Created:07/30/2015
Last Modified:06/06/2016
File Size: 23.3 MB

Feature Request

poly face z marking menu

Status:added
Date:10/15/2015
Submitted by:Firas Ershead Firas Ershead
on marking menu, after "select all" : can we add "select by shader". user select a face, "select by shader" will select all faces with same shader. //this is by Dragos Olariu // dragosholariu@yahoo.com global proc do_Sel_by_mat() { //////////////////////////////////////// //Obtains object name from a selected face. Removes the ".f[xx]" part. /////////////////////////////////////// string $face_sel[] = `ls -selection`; string $obj_sel = stringArrayToString($face_sel, ""); print $obj_sel; string $array[]; $array = stringToStringArray($obj_sel, "."); $array[1]=""; string $curent_obj = stringArrayToString($array, ""); print $curent_obj; //////////////////////////////////////// ///////////////////////////////////////// //////////////////////////////////////// string $faceSG = ""; //list array of faces string $selectedFaces[] = `filterExpand -ex true -sm 34`; // Get array of all Shading Groups string $shadingGroups[] = `ls -type shadingEngine`; for ( $shadingGroup in $shadingGroups ) { // If this facet is a member of the shading set for this // Shading Group, tag this as the facet's shader if ( `sets -isMember $shadingGroup $selectedFaces` ) { $faceSG = $shadingGroup; break; } } /////////////////////////////////////////////////////////////////// // Get name of Material from the above Shadergroup name. /////////////////////////////////////////////////////////////////// string $matName = ""; if ( "shadingEngine" == `nodeType $faceSG` && `connectionInfo -id ( $faceSG + ".surfaceShader" )` ) { $matName = rootNode( `connectionInfo -sfd ( $faceSG + ".surfaceShader" )` ); } select -cl; select -r $matName; select -tgl $curent_obj; materialSelect(); }

Comments on this feature request:

  • Davide Alidosi

    Davide Alidosi said about 9 years ago:

    I select a face, run do_Sel_by_mat, but: // Error: line 32: No object matches name:
  • Davide Alidosi

    Davide Alidosi said about 9 years ago:

    I've added this feature in 1.6.1, please update.

Post a comment: