Home Technical Talk

(Maya) Looking to hotkey Assign New Material Lambert

polycounter lvl 6
Offline / Send Message
Stu2Prof polycounter lvl 6
Hi guys Im currently doing some blocking out and need to fire on quick textures to get a sense of scale and layout. Im finding the "assign favourite material" section at the bottom of the marking menu a bit awkward and long and was want to hotkey the lambert function. Sadly I cant find where it is in the hotkey menu. Any help you can give me?

Replies

  • throttlekitty
    Offline / Send Message
    throttlekitty ngon master
    Sure, try this in the hotkey editor:

    <div>string $objs[] = `ls -sl`;
    
    </div><div>string $myLambert = `shadingNode -asShader lambert`;
    
    </div><div>string $sg = `sets -renderable true -noSurfaceShader true -empty -name ($myLambert + "SG")`;
    
    </div><div>defaultNavigation -connectToExisting -source $myLambert -destination $sg;
    
    </div><div>for ($obj in $objs) {
    
    </div><div>&nbsp; &nbsp; select $obj;
    
    </div><div>&nbsp; &nbsp; hyperShade -assign $myLambert;
    
    </div><div>&nbsp; &nbsp; }
    
    </div><div>select $myLambert;</div>


    And here's a pic of the hotkey editor if you've never done this. Also, you can search the commands for a hotkey function, but there's no premade entry for this particular thing.

  • Animatexyz
    Offline / Send Message
    Animatexyz polycounter lvl 2
    I know this is pretty old but it still works in 2020. Thank you! This is a huge time saver for getting base materials added before going into Substance Painter.
  • oglu
    Offline / Send Message
    oglu polycount lvl 666
    I use shift + t hotkey to create new materials.

    Or use the node editor and a stored tab.
  • Animatexyz
    Offline / Send Message
    Animatexyz polycounter lvl 2
    oglu said:
    I use shift + t hotkey to create new materials.

    That's a great tip! I didn't know about that hotkey. Most of the time I'm working in the Hypershade editor for material creation. This script is just a fast way of adding a basic material to individual meshes for baking material id's and segmenting out parts of the mesh in Painter. 

Sign In or Register to comment.