| sidebar_position | 3 |
|---|
An EditAddIn panel is a persistent, non-blocking UI strip that's auto-docked in Studio Pro's panel area, beneath the main or editor surface toolbar. Its open/closed state persists in saved files.
classfactory.xml— declares the script ascategory="EditAddIn"withsubCategorymatching the intended context andgroupNamefor panel location.skin/skin.xml— a<Form>defines the panel controls, referenced by theformNameattribute.scriptname.js— can inherit fromCCL.JS.Component(CCL) and add control parameters tothis.paramListininitialize().
<ScriptClass
classID="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
metaClassID="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
category="EditAddIn"
subCategory="Engine"
name="My Panel"
sourceFile="scriptname.js"
functionName="createInstance">
<Attribute id="groupName" value="Song.AddInPanel"/>
<Attribute id="formName" value="MyPanelForm"/>
</ScriptClass>
<ScriptMetaClass classID="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}">
<ScriptClassResource id="Class:ImageResource" url="theme://$package/ToolbarIcon"/>
</ScriptMetaClass>subCategoryspecifies the Studio Pro environment context:Engine(Song),Project,Show.groupNamecontrols docking location. Values:"Song.AddInPanel","Project.AddInPanel","Show.AddInPanel","MusicOnly.AddInPanel","AudioOnly.AddInPanel","SongOnly.AddInPanel".formNamereferences a<Form name="MyPanelForm">inskin.xml.metaClassIDandScriptMetaClassbind an icon to the script for a toolbar button. See classfactory.xml - ScriptMetaClass for icon resource details.
<Form name="MyPanelForm" attach="all fitsize" windowstyle="floating">
<!-- panel controls here -->
</Form>include_file("resource://{main}/sdk/cclapp.js");
MyPanel.prototype = new CCL.JS.Component();
function MyPanel()
{
this.initialize = function(context)
{
return CCL.JS.Component.prototype.initialize.call(this, context);
}
this.terminate = function()
{
return CCL.JS.Component.prototype.terminate.call(this);
}
}
// Function name matches classfactory.xml functionName.
function createInstance(args)
{
__init(args);
return new MyPanel();
}This example inherits CCL.JS.Component, which provides the interface set. The call to the base initialize() creates the instance-bound this.paramList and sets its controller. If adding parameters, call the base initializer first, then add them before returning the result. Controls in the form bind to parameters with matching names.