"use strict"; let fs = require("fs"); let path = require("path"); module.exports = { load() { this.init(); }, unload() { // Editor.log("卸載執行"); }, /** 初始化 */ init() { // this.createDirectory(); }, /** 創建Spine節點 */ setBlend(...args) { // Editor.log("文件0: " + JSON.stringify(args[0])); // Editor.log("文件1: " + JSON.stringify(args[1])); // Editor.log("文件2: " + JSON.stringify(args[2])); Editor.Scene.callSceneScript("blendset", "set-blend", { args: args }, function (err, response) { Editor.log(response); // let info = JSON.parse(response); // let path = info.path; // let url = info.url; }); }, messages: { /** 打開面板 */ "open-panel"() { Editor.Panel.open("blendset"); }, /** 保存按鈕點擊 */ "set-click"(event, ...args) { this.setBlend(...args); }, /** 面板加載完成 */ "panel-load-finish"(evnet, ...args) { Editor.Scene.callSceneScript("blendset", "get-default-info", { args: args }, function (err, response) { // Editor.log("callSceneScript: " + response); Editor.Ipc.sendToPanel("blendset", "setDefault", response); }); }, }, }