You can customize AEnewNonNumericMulti.mel so that you can disable buttons such as the "Add New Item" button by doing the following:
Modify AEnewNonNumericMulti.mel in runTime/scripts/AETemplates to examine the type for $nodeName. For example, use one of the following two statements if you want to disable a field if the relevant node is of type “fooType”:
int $showField = nodeType( $nodeName ) != "fooType"; int $showField = !`objectType -isa "fooType" $nodeName`;
Set the managed state for each field appropriately by adding the flag " -m $showField " to the appropriate UI control to hide or show that field (for example, button, text, rowLayout). You also need to do something similar in AEreplaceNonNumericMulti to enable or disable the same field(s) when a new node is loaded using that template.
For example, if you source your own version of AEnewNonNumericMulti.mel, and enter:
whatIs “AEnewNonNumericMulti”;
Maya returns something along the lines of // Result: Mel procedure found in <somePath>/myAEnewNonNumericMulti.mel //
However, if you then open the Render Settings window, and select the Indirect Lighting tab, the original AEnewNonNumericMulti.mel file will be sourced, and the procedure will be redefined. If you now enter:
whatIs “AEnewNonNumericMulti”;
Maya returns something along the lines of // Result: Mel procedure found in <somePath>/runTime/scripts/AETemplates/AEnewNonNumericMulti.mel //
The latter confirms that the procedure used came from the default script file, and not from your own version.