Set Attributes using MEL

Using this short MEL script, we can change the values of our attributes of our selected objects. This is particularly useful when the attribute is not available in the channelbox and/or the attribute spread sheet.

// Get selected objects
string $sel[] = `ls -sl`;
// For loop to set attributes to each object in selection
for ($item in $sel)
{
setAttr ($item + ".visibility") 1; // Replace attribute accordingly
}
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *