Daemonecles
01-29-2013, 08:12 PM
Hey guys!
Just had a question that I'm having problems googling/searching on the forum...I'm trying to dynamically load a shelf so that it always appears in its most updated state on the user's computer. Here's what I've figured out so far:
I am using Maya.env and added a line
$MAYA_STARTUP_SCRIPT_PATH = (shared directory where I have a startup.mel file)
The startup.mel file says:
//check to see if shelf exists
string $install_shelfName = "andres";
string $install_shelfPath = "/usr/people/andres-w/andresShelfMaster/shelf_andres.mel";
int $install_shelfExists = `layout -q -ex $install_shelfName`;
if ($install_shelfExists == 1){
print "Deleting existing Andres shelf\n";
deleteUI -layout $install_shelfName;
}
//add shelf
print "Adding Andres Shelf\n";
loadNewShelf $install_shelfPath;
So this doesn't quite work to remove the old shelf cleanly...and using the command deleteShelfTab requires hitting OK and doesn't work either. Any help would be most appreciated! Also I'm probably doing this completely wrong so...thanks for pointing me in the right direction ahead of time!
Background: Can't use userSetup.mel since it's getting overridden by our pipeline in some way that I'm not sure of...
Just had a question that I'm having problems googling/searching on the forum...I'm trying to dynamically load a shelf so that it always appears in its most updated state on the user's computer. Here's what I've figured out so far:
I am using Maya.env and added a line
$MAYA_STARTUP_SCRIPT_PATH = (shared directory where I have a startup.mel file)
The startup.mel file says:
//check to see if shelf exists
string $install_shelfName = "andres";
string $install_shelfPath = "/usr/people/andres-w/andresShelfMaster/shelf_andres.mel";
int $install_shelfExists = `layout -q -ex $install_shelfName`;
if ($install_shelfExists == 1){
print "Deleting existing Andres shelf\n";
deleteUI -layout $install_shelfName;
}
//add shelf
print "Adding Andres Shelf\n";
loadNewShelf $install_shelfPath;
So this doesn't quite work to remove the old shelf cleanly...and using the command deleteShelfTab requires hitting OK and doesn't work either. Any help would be most appreciated! Also I'm probably doing this completely wrong so...thanks for pointing me in the right direction ahead of time!
Background: Can't use userSetup.mel since it's getting overridden by our pipeline in some way that I'm not sure of...
