Skip to content

Commit

Permalink
Merge pull request #3708 from Autodesk/bailp/EMSUSD-1187/disable-root…
Browse files Browse the repository at this point in the history
…-prim-type

EMSUSD-1187 disable root prim type UI
  • Loading branch information
seando-adsk authored Apr 11, 2024
2 parents 0b3fee5 + 05078cf commit dd753e7
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions plugin/adsk/scripts/mayaUsdTranslatorExport.mel
Original file line number Diff line number Diff line change
Expand Up @@ -260,22 +260,38 @@ global proc mayaUsdTranslatorExport_updateDefaultPrimList() {

}

global proc mayaUsdTranslatorExport_RootPrimCB() {
proc updateDefaultPrimOptionMenu(string $rootPrim) {
if (`optionMenuGrp -exists exportDefaultPrim` == 0){
return;
}
string $rootPrim = `textFieldGrp -q -text rootPrimField`;
optionMenuGrp -edit -deleteAllItems exportDefaultPrim;
string $menuName = `optionMenuGrp -q -fullPathName exportDefaultPrim`;
menuItem -parent ($menuName + "|OptionMenu") -l `getMayaUsdString("kExportDefaultPrimNoneLbl")`;
menuItem -parent ($menuName + "|OptionMenu") -l $rootPrim;
if(size($rootPrim) > 0){
menuItem -parent ($menuName + "|OptionMenu") -l $rootPrim;
optionMenuGrp -e -select 2 exportDefaultPrim;
} else {
mayaUsdTranslatorExport_updateDefaultPrimList();
}
}

proc updateRootPrimTypeOptionMenu(string $rootPrim) {
if (`optionMenuGrp -exists rootPrimTypePopup` == 0){
return;
}
if(size($rootPrim) > 0) {
optionMenuGrp -e -enable 1 rootPrimTypePopup;
} else {
optionMenuGrp -e -enable 0 rootPrimTypePopup;
}
}

global proc mayaUsdTranslatorExport_RootPrimCB() {
string $rootPrim = `textFieldGrp -q -text rootPrimField`;
updateDefaultPrimOptionMenu($rootPrim);
updateRootPrimTypeOptionMenu($rootPrim);
}

global proc mayaUsdTranslatorExport_AnimationCB() {
if (`checkBoxGrp -exists animationCheckBox` == 0)
return;
Expand Down

0 comments on commit dd753e7

Please sign in to comment.