aescripts + aeplugins
Discussions
Sign In
General
How to make a dockable script?
Itay Assouline
March 2017
i made a simple after effects script, and i want to know how to turn it to a floating script...
when i put it in the scriptsUI folder it just shows me 2 screens...
here is the script:
//UI Creation
var myWindow = new Window("palette");
var myMessage = myWindow.add("statictext");
myMessage.text = "תסריט להפיכת טקסט. נעשה על ידי איתי אסולין";
var buttons = myWindow.add("panel", undefined, "buttons");
var HebrewThis = buttons.add("button", undefined, "HebrewThis!");
var Cancel = buttons.add("button", undefined, "Cancel");
buttons.orientation = "row";
//UI Creation End.//
//Function creations
//Hebrew this button
HebrewThis.onClick = function(){
app.beginUndoGroup("AddEffect");
var curItem = app.project.activeItem;
var selectedLayers = curItem.selectedLayers;
// check if comp is selected
if (curItem == null || !(curItem instanceof CompItem)){
// if no comp selected, display an alert
alert("בבקשה בחר שכבה");
} else {
// define the layer in the loop we're currently looking at
var myLayer = app.project.activeItem.layer(1);
var curVal = myLayer.property("Scale").value;
myLayer.property("Scale").setValue([-100, 100]);
var Text = selectedLayers[0].Text.Animators.addProperty("ADBE Text Animator");
myText.property("ADBE Text Selectors").addProperty("ADBE Text Selector");
myText.property("ADBE Text Animator Properties").addProperty("ADBE Text Scale 3D").setValue([-100, 100]);
}
// close the undo group
app.endUndoGroup();
}
//Hebrew this button ended.
//cancel button
Cancel.onClick = function(){
app.beginUndoGroup("AddEffect");
var curItem = app.project.activeItem;
var selectedLayers = curItem.selectedLayers;
// check if comp is selected
if (curItem == null || !(curItem instanceof CompItem)){
// if no comp selected, display an alert
alert("בבקשה בחר שכבה");
} else {
// define the layer in the loop we're currently looking at
var myLayer = app.project.activeItem.layer(1);
var curVal = myLayer.property("Scale").value;
myLayer.property("Scale").setValue([100, 100]);
var myAnim = selectedLayers[0].Text.Animators.property("ADBE Text Animator");
myAnim.property("ADBE Text Selectors").property("ADBE Text Selector");
myAnim.property("ADBE Text Animator Properties").property("ADBE Text Scale 3D").setValue([100, 100]);
}
// close the undo group
app.endUndoGroup();
}
myWindow.show();
thanks!:)
Lloyd Alvarez
March 2017
I think a better place to ask this question is the scripting forum:
https://forums.adobe.com/community/aftereffects_general_discussion/ae_scripting/content
This discussion has been closed.
All Discussions
Categories
All Discussions
2.3K
General
407
Product Discussions
1.8K
Powered by Vanilla