Does rehash() not work with AETemplates?
It does rehash, it works but it doesnt update whats allready built no. rehash doesnt remove allready defined stuff. It still needs to be run.
So read onward. AE templates work like this:
It checks whether or not the gui for the template is loaded, if not it runs the template. Net effect is that you only get this to happen you for the first, and only first time call the template.
This is called lazy evaluataion, maya doesnt go around doing the guis all the time, it would be slow, it just hides the templates and then just hows them again you can change anything you like in the template in between maya does not care.
Now templates still need to be updated. Well theres 2 mechanims for this which you choose depends on what you are up to.
[li]I. If your interested in JUST testing that your template change works then just simply delete the template type if it exists:resetAE;
or for just one template:
It is important that you not attempt this for any gui update because it would be the wrong way to do things. Just for bootstrapping your new code.
[li]II. Now when custom AE items update you will need to refresh their content, for this purpose you should build the initial layout in
editorTemplate -callCustom AEbuildFunction AERefreshWhatYouBuilt Any Additional Attributes you want[/li]