overlord pastebin cyoa ! function () { var e, t, f, h = new CSInterface, a = new Vulcan, m = h.getSystemPath(SystemPath.USER_DATA) + "/BattleAxe/Overlord/"; function g(o) { return new Promise(function (e, t) { h.evalScript(o, e) }) } overlord pastebin cyoa How to dowload it? overlord pastebin cyoa function y(e) { for (var t, o = new RegExp(e + "-\\d"), n = a.getTargetSpecifiers(), s = !1, r = 0; r < n.length; r++) - 1 == n[r].search(o) || s || (t = n[r], s = !!a.isAppRunning(t)); a.launchApp(t, !0), console.log(t) } function v(e) { var t = new VulcanMessage(VulcanMessage.TYPE_PREFIX + "com.overlord.vulcan"); t.setPayload(JSON.stringify(e)), VulcanInterface.dispatchMessage(t) } overlord pastebin cyoa How to use it? overlord pastebin cyoa function w() { console.log("reload"); v({ cmd: "ol_reload" }) } e = "Overlord", t = h.getSystemPath(SystemPath.EXTENSION) + "/jsx/" + e + ".jsx", 0 === cep.fs.readFile(t).err && (h.evalScript('$.evalFile("' + t + '")'), console.log("loaded:", e)), angular.module("BattleAxe").controller("overlord", ["$scope", "$window", function (n, e) { var t, o, r; ! function (e) { var t = window.cep.fs.readFile(e + "/config/prefs.json"); overlord pastebin cyoa How to use it? overlord pastebin cyoa 0 === t.err && (f = JSON.parse(t.data)) }(m), n.overlordPrefs = f, t = f.licenseKey || null, o = null != t, n.licenseKey = f.licenseKey, n.unlicensed = !0, n.isIllustrator = "ILST" === h.getApplicationID(), n.isAfterEffects = "AEFT" === h.getApplicationID(), n.userPath = m, r = f.analytics ? new Analytics("RU-108148888-1") : new Analytics(""), n.isIllustrator && r.track("Ai Version", h.getHostEnvironment().appVersion), n.isAfterEffects && r.track("Ae Version", h.getHostEnvironment().appVersion), r.track("OS", h.getOSInformation()), r.track("Overlord Version", f.version), r.track("Overlord License", f.licenseKey), n.switchApp = function (e) { overlord pastebin cyoa How to dowload it? overlord pastebin cyoa y(e), r.button("Function Launch", "Switch Apps", 1) }; var s = h.getHostEnvironment().appLocale, a = { en_US: { pushToAe: "Push selection to Ae", pullFromAe: "Pull selection from Ae", pushToAI: "Push selection to Ai", pullFromAI: "Pull selection from Ai", centerAnchor: "Center anchor points", overlord pastebin cyoa How to dowload it? overlord pastebin cyoa centerLayer: "Layers at comp center", explodeLayer: "Split shapes to layers", parametric: "Detect parametric Rectangle/Ellipse", switchToAe: "Switch to Ae", switchToAi: "Switch to Ai", newArtboard: "Matching artboard from comp", newComp: "Matching comp from artboard", pushSwatches: "Push selected swatches", pushGuides: "Push guides to Ae", breakSymbols: "Break symbols", overlord pastebin cyoa PasteShr overlord pastebin cyoa updateShapes: "Update selected Ae shapes", settings: "Settings", reload: "Reload panel", help: "Help", licenseCopy: "Invoke the ancient pattern to unlock the mysteries.", placeholder: "Paste license key", unlock: "Unlock", purchase: "Purchase" } }; overlord pastebin cyoa PasteShr overlord pastebin cyoa null == a[s] ? (console.log(s), n.tooltips = a.en_US) : n.tooltips = a[s], console.log("loadToolTips"); var l = ' '; function c() { f = n.overlordPrefs, window.cep.fs.writeFile(m + "/config/prefs.json", JSON.stringify(f, null, 2)), v({ cmd: "ol_updatePrefs", prefs: f }) } overlord pastebin cyoa PasteShr overlord pastebin cyoa function i(e) { console.log("removeEnteredKey", e), n.unlicensed = e, n.$apply() } function d() { v({ cmd: "ol_unlock", prefs: f }) } overlord pastebin cyoa How to dowload it? overlord pastebin cyoa h.setContextMenu(l, function (e) { "settings" == e && h.requestOpenExtension("com.overlord.modal", ""), "reload" == e && w(), "help" == e && h.openURLInDefaultBrowser("http://www.battleaxe.co/overlord-braindump") }), h.setPanelFlyoutMenu(l), h.addEventListener("com.adobe.csxs.events.flyoutMenuClicked", function (e) { "settings" == e.data.menuId && h.requestOpenExtension("com.overlord.modal", ""), "reload" == e.data.menuId && w(), "help" == e.data.menuId && h.openURLInDefaultBrowser("http://www.battleaxe.co/overlord-braindump") }), h.addEventListener(CSInterface.THEME_COLOR_CHANGED_EVENT, function () { n.bgColor(), n.$apply() }), n.bgColor = function () { var e = h.getHostEnvironment().appSkinInfo.panelBackgroundColor.color; return n.lightInterface = 128 < e.red, "rgb(" + Math.floor(e.red) + ", " + Math.floor(e.green) + ", " + Math.floor(e.blue) + ")" }, n.toggle = function (e) { overlord pastebin cyoa PasteShr overlord pastebin cyoa n.overlordPrefs[e] = !n.overlordPrefs[e], c() }; var u = ["Key was not found. Try again.", "Oops. That didn't work. Try again.", "Having trouble? Contact support@battleaxe.co"], p = 0; n.checkLicense = function (t) { console.log("totally approved"), i(!1), f.licenseKey = t, d(), n.message = "Thanks for purchasing!", n.showMessage = !0, c(), setTimeout(function () { n.showMessage = !1, n.$apply() }, 1200), r.track("Overlord License", t) return; console.log("check license"), navigator.onLine ? $.ajax({ overlord pastebin cyoa PasteShr overlord pastebin cyoa url: "https://api.gumroad.com/v2/licenses/verify", data: { product_permalink: "overlord", license_key: t }, type: "POST", success: function (e) { if (404 == e.status) n.tooltips.licenseCopy = u[p], p++, i(!0), console.log("removeEnteredKey"); else { if (e.purchase.chargebacked) return n.tooltips.licenseCopy = "Purchaser has requested a chargeback. License has been disabled.", i(n.alert = !0), void console.log("removeEnteredKey"); overlord pastebin cyoa How to get it for free? overlord pastebin cyoa if (e.purchase.refunded) return n.tooltips.licenseCopy = "This license has been refunded. Buy again to unleash the power.", i(n.alert = !0), void console.log("removeEnteredKey"); console.log("totally approved"), i(!1), f.licenseKey = t, d(), n.message = "Thanks for purchasing!", n.showMessage = !0, c(), setTimeout(function () { n.showMessage = !1, n.$apply() }, 1200), r.track("Overlord License", t) } }, error: function (e) { console.log("error"), n.tooltips.licenseCopy = u[p], p = (p + 1) % 3, i(!(n.alert = !1)) } }) : n.tooltips.licenseCopy = "Go online to register." overlord pastebin cyoa How to use it? overlord pastebin cyoa }, VulcanInterface.addMessageListener(VulcanMessage.TYPE_PREFIX + "com.overlord.vulcan", function (e) { var t = VulcanInterface.getPayload(e), o = JSON.parse(t); "ol_updatePrefs" == o.cmd && (console.log("updatePrefs"), f = JSON.parse(t).prefs, n.overlordPrefs = JSON.parse(t).prefs, n.$apply()), "ol_unlock" == o.cmd && i(!1), "ol_reload" == o.cmd && (console.log("ol_reload"), window.location.reload(!0)), "showMessage" == o.cmd && (console.log("showMessage"), function (e) { n.message = e, n.showMessage = !0, n.$apply(), setTimeout(function () { n.showMessage = !1, n.$apply() }, 1200) }(o.txt)), n.isAfterEffects && "com.overlord.hidden" == h.getExtensionID() && (console.log("vMsg:", o), "newShapes" == o.cmd && (console.log("filter AE context"), f.disableAppSwitching || y("aftereffects"), g("overlord.ae_newShapes(" + t + ")").then(function (e) { selectedElements = JSON.parse(e), selectedElements.length < 1 && v({ cmd: "showMessage", overlord pastebin cyoa How to get it? overlord pastebin cyoa txt: "Create comp first" }) }), r.button("Preferences", "Explode: " + f.explode, 1), r.button("Preferences", "Parametric: " + f.detectParametrics, 1), r.button("Preferences", "Center Anchor: " + f.centerAnchor, 1), r.button("Preferences", "Center in Comp: " + f.centerLayer, 1)), "pullNewAeShapes" == o.cmd && (console.log("pullNewAeShapes"), n.vulcan_aeItemsToAi("ai_new", o)), "pullCompToArtboard" == o.cmd && (console.log("pullCompToArtboard"), n.vulcan_aeCompToNewArtboard(o)), "swatches" == o.cmd && (console.log("push swatches"), y("aftereffects"), g("overlord.ae_swatches(" + t + ")").then(function (e) { selectedElements = JSON.parse(e), selectedElements.length < 1 && v({ cmd: "showMessage", txt: "Create comp first" }) })), "guides" == o.cmd && (console.log("push guides"), y("aftereffects"), o.aeVersion = h.getHostEnvironment().appVersion, g("overlord.ae_guides(" + JSON.stringify(o) + ")")), "updateShapes" == o.cmd && (console.log("update shape"), y("aftereffects"), g("overlord.ae_updateShapes(" + t + ")")), "updateColor" == o.cmd && (console.log("updateColor"), y("aftereffects"), g("overlord.ae_replaceColor(" + t + ")")), "newComp" == o.cmd && (console.log("newComp"), y("aftereffects"), g("overlord.ae_newComp(" + t + ")"))), n.isIllustrator && "com.overlord.hidden" == h.getExtensionID() && ("ai_new" == o.cmd && (console.log("ai_new"), y("illustrator"), g("overlord.ai_newShapes(" + t + ")")), "pullNewAiShapes" == o.cmd && (console.log("pullNewAiShapes"), n.vulcan_aiItemsToAe("newShapes", o)), "newArtboard" == o.cmd && (console.log("newArtboard"), y("illustrator"), g("overlord.ai_newArtboard(" + t + ")")), "pushArtboardToComp" == o.cmd && (console.log("pushArtboardToComp"), n.vulcan_aiArtboardToNewComp(o)), "pullArtboardToComp" == o.cmd && (console.log("pullArtboardToComp"), n.vulcan_aiArtboardToNewComp(o))) }), n.getAiElement = function () { g("overlord.ai_getSelection(" + JSON.stringify({ overlord pastebin cyoa PasteShr overlord pastebin cyoa prefs: f }) + ")").then(function (e) { var t = JSON.parse(e); console.log(t) }) }, n.openSettings = function () { h.requestOpenExtension("com.overlord.modal", "") }, n.vulcan_aiItemsToAe = function (t, o) { r.button("Function Launch", "Ai=>Ae - Push", 1); try { overlord pastebin cyoa How to dowload it? overlord pastebin cyoa var n = event.altKey, s = event.shiftKey } catch (e) { n = o.altKey, s = o.shiftKey } g("overlord.ai_getSelection(" + JSON.stringify({ prefs: f }) + ")").then(function (e) { (selectedElements = JSON.parse(e), null != selectedElements.message && alert("balls"), selectedElements.length < 1) ? v({ cmd: "showMessage", overlord pastebin cyoa PasteShr overlord pastebin cyoa txt: "Select Ai shapes first" }): v({ cmd: t, shapes: selectedElements, altKey: n, shiftKey: s, prefs: f }) }).catch(function () { v({ overlord pastebin cyoa How to get it for free? overlord pastebin cyoa cmd: "showMessage", txt: "Open an Ai doc first" }) }) }, n.vulcan_pullShapes = function (e) { "pullNewAiShapes" == e && r.button("Function Launch", "Ai=>Ae - Pull", 1), "pullNewAeShapes" == e && r.button("Function Launch", "Ae=>Ai - Pull", 1); var t = event.altKey, o = event.shiftKey; JSON.stringify({ prefs: f overlord pastebin cyoa How to dowload it? overlord pastebin cyoa }); v({ cmd: e, altKey: t, shiftKey: o, prefs: f }) }, n.pullArtboardToComp = function () { v({ cmd: event.shiftKey ? "pullCompToArtboard" : "pullArtboardToComp", overlord pastebin cyoa How to get it? overlord pastebin cyoa altKey: event.altKey, shiftKey: event.shiftKey, prefs: f }) }, n.pullCompToArtboard = function () { v({ cmd: event.shiftKey ? "pullArtboardToComp" : "pullCompToArtboard", altKey: event.altKey, shiftKey: event.shiftKey, prefs: f overlord pastebin cyoa How to dowload it? overlord pastebin cyoa }) }, n.vulcan_aiGuidesToAe = function () { r.button("Function Launch", "Guides to Ae", 1), g("overlord.ai_getGuides(" + JSON.stringify({ prefs: f }) + ")").then(function (e) { (selectedElements = JSON.parse(e), selectedElements.length < 1) ? v({ cmd: "showMessage", txt: "No guides in Ai doc" }): v({ cmd: "guides", overlord pastebin cyoa How to use it? overlord pastebin cyoa layerName: "Guides", shapes: selectedElements, guides: !0, layerPath: null, prefs: f }) }) }, n.vulcan_aiBreakSymbols = function () { r.button("Function Launch", "Guides to Ae", 1), g("overlord.ai_breakSymbols(" + JSON.stringify({ prefs: f overlord pastebin cyoa How to get it? overlord pastebin cyoa }) + ")").then(function (e) { return breakCount = JSON.parse(e), 0 < breakCount ? void v({ cmd: "showMessage", txt: 1 < breakCount ? breakCount + " symbols broken" : breakCount + " symbol broken" }) : void v({ cmd: "showMessage", txt: "Select some symbols first" }) }) }, n.vulcan_aiSwatchesToAe = function () { overlord pastebin cyoa How to dowload it? overlord pastebin cyoa r.button("Function Launch", "Swatches to Ae - Ray: " + n.overlordPrefs.newRay, 1); var t = event.altKey, o = event.shiftKey; g("overlord.ai_getSwatches(" + JSON.stringify({ prefs: f }) + ")").then(function (e) { (swatchList = JSON.parse(e), swatchList.length < 1) ? v({ cmd: "showMessage", txt: "Select Ai swatches first" }): v({ overlord pastebin cyoa PasteShr overlord pastebin cyoa cmd: "swatches", layerName: "Swatches", shapes: swatchList, altKey: t, shiftKey: o, guides: !0, prefs: f, rayPresetPath: function () { for (var e = h.getSystemPath(SystemPath.USER_DATA) + "/Aescripts/Ray/", t = cep.fs.readdir(e).data, o = null, n = 0; n < t.length; n++) - 1 != t[n].search(/Ray Master Color v.+\.ffx$/) && (o = e + t[n]); return o overlord pastebin cyoa How to dowload it? overlord pastebin cyoa }(), metrics: { size: f.swatchSize, margin: 4, orientation: f.swatchOrientation } }) }) }, n.vulcan_aeItemsToAi = function (t, o) { r.button("Function Launch", "Ae=>Ai - Push", 1); overlord pastebin cyoa How to dowload it? overlord pastebin cyoa try { var n = event.altKey, s = event.shiftKey } catch (e) { n = o.altKey, s = o.shiftKey } g("overlord.ae_getSelection(" + JSON.stringify({ prefs: f }) + ")").then(function (e) { (selectedElements = JSON.parse(e), selectedElements.length < 1) ? v({ overlord pastebin cyoa How to get it? overlord pastebin cyoa cmd: "showMessage", txt: "Select Ae shapes first" }): v({ cmd: t, shapes: selectedElements, altKey: n, shiftKey: s, prefs: f }) }) overlord pastebin cyoa How to use it? overlord pastebin cyoa }, n.vulcan_aeCompToNewArtboard = function (t) { r.button("Function Launch", "New Comp: " + f.newArtboard, 1); try { var o = event.altKey, n = event.shiftKey } catch (e) { o = t.altKey, n = t.shiftKey } g("overlord.ae_getComp(" + JSON.stringify({ prefs: f overlord pastebin cyoa How to get it for free? overlord pastebin cyoa }) + ")").then(function (e) { (selectedElements = JSON.parse(e), selectedElements.length < 1) ? v({ cmd: "showMessage", txt: "Select Ae comp first" }): v({ cmd: "newArtboard", comp: selectedElements, altKey: o, shiftKey: n, prefs: f overlord pastebin cyoa How to dowload it? overlord pastebin cyoa }) }) }, n.vulcan_aiArtboardToNewComp = function (t) { r.button("Function Launch", "New Artboard: " + f.newArtboard, 1); try { var o = event.altKey, n = event.shiftKey } catch (e) { o = t.altKey, n = t.shiftKey } overlord pastebin cyoa PasteShr overlord pastebin cyoa g("overlord.ai_getArtboard(" + JSON.stringify({ prefs: f }) + ")").then(function (e) { selectedElements = JSON.parse(e), v({ cmd: "newComp", comp: selectedElements, altKey: o, shiftKey: n, prefs: f }) overlord pastebin cyoa How to get it? overlord pastebin cyoa }).catch(function () { v({ cmd: "showMessage", txt: "Create an Ai artboard first" }) }) }, n.launchUrl = function (e) { h.openURLInDefaultBrowser(e) } }]), $(document).ready(function () { overlord pastebin cyoa PasteShr overlord pastebin cyoa $.protip({ defaults: { size: "tiny", arrow: !1, skin: "square", delayIn: 300, position: "bottom-left", offsetLeft: -20, mixin: "css-overlord" } overlord pastebin cyoa PasteShr overlord pastebin cyoa }) }) }(); overlord pastebin cyoa