Skip to content

Instantly share code, notes, and snippets.

@GoodBoyNinja
Created February 1, 2021 13:42
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Copy and paste this template and write any code related to your UI inside the "buildUI" function. You can use 'ScriptUI Dialog Builder' - https://scriptui.joonas.me/ and then export the code and paste it inside the "buildUI" function. Note: Your script becomes dockable only when you place it in the "scriptUI Panels" folder. Reboot After-Effects …
(function(thisObj) {
// Any code you write here will execute before the panel is built.
buildUI(thisObj); // Calling the function to build the panel
function buildUI(thisObj) {
var windowName = "your script name";
var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("window", windowName, undefined, {
resizeable: true
});
// Write any UI code here. Note: myPanel is your window panel object. If you add groups, buttons, or other UI objects make sure you use myPanel as their parent object, especially if you are using the only ScriptUI panel builder.
myPanel.onResizing = myPanel.onResize = function() {
this.layout.resize();
};
if (myPanel instanceof Window) {
myPanel.center();
myPanel.show();
} else {
myPanel.layout.layout(true);
myPanel.layout.resize();
}
}
// Write your helper functions here
})(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment