Skip to content

Instantly share code, notes, and snippets.

@manhha00
Last active November 28, 2017 02:16
Show Gist options
  • Save manhha00/25183ab2f28072f214a059314275ab56 to your computer and use it in GitHub Desktop.
Save manhha00/25183ab2f28072f214a059314275ab56 to your computer and use it in GitHub Desktop.
maya - mel - change textField when selected something
proc updateUi()
{
string $sld[] = (`ls -sl`);
print $sld[0];
textField -edit -tx $sld tfd ;
}
scriptJob -ct "SomethingSelected" "updateUi()";
global proc test()
{
if (`window -ex testUI` == true)
{
deleteUI("testUI");
}
window -w 310 -h 60 -t ("testUI") testUI;
columnLayout ;
rowColumnLayout -nc 2 -cw 3 50 -cw 2 250 -w 300;
text -l "Joint name : " -w 100 -al "left"; // joint family name
textField -tx "Object Name" tfd ;
setParent "..";
separator -style "none" -w 300 -h 4;
showWindow testUI;
}
test()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment