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 …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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