From b1efb4928bc1c4dca4fa36a6566dc1690ebdc5e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20V=C3=A1ssquez=20P=C3=A9rez?= Date: Fri, 2 Dec 2016 17:20:13 -0800 Subject: [PATCH] Hopefully this will finally fix the merging issues I had. --- ScriptUI Panels/yToolBox.jsx | 4 ++++ yScripts/y_BindBetween2.jsx | 4 ++-- yScripts/y_colorProbe.jsx | 4 ++-- yScripts/y_puppetRig.jsx | 6 +++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ScriptUI Panels/yToolBox.jsx b/ScriptUI Panels/yToolBox.jsx index 32afe68..5b9a16d 100644 --- a/ScriptUI Panels/yToolBox.jsx +++ b/ScriptUI Panels/yToolBox.jsx @@ -1,3 +1,4 @@ +<<<<<<< HEAD var scriptUIPanel = this; YTB = { @@ -122,3 +123,6 @@ YTB.init(); #include "../yScripts/y_CPOffset.jsx"; #include "../yScripts/y_puppetRig.jsx"; #include "../yScripts/y_stopMotionLayer.jsx"; +======= +var scriptUIPanel = this; YTB = { info : { name : "yToolBox", ver : 0.5, status : "alpha", url : "yorchnet.com", description : "My mixed bag of tools" }, resources : { icon : new File('../yScripts/yNet.png'), header : new File('../yScripts/header.png') }, appearence : { buttonHeight : 30, buttonWidth : 126 }, tools : [], createUI : function createUI() { var res ="group\ {\ orientation:'column',\ alignment:['fill','fill'],\ margins:[0,0,0,0]\ header: Group\ {\ orientation:'column',\ alignment:['center','top'],\ margins:[0,0,0,0]\ title: Image\ {\ icon:'" + this.resources.header.path + '/' + this.resources.header.name + "',\ preferredSize: [175, 35]},\ ver: StaticText\ {\ text:'" + this.info.ver + "',\ alignment:['center','center']\ }\ desc: StaticText\ {\ text:'" + this.info.description + "',\ alignment:['center','center']\ },\ },\ main: Group\ {\ orientation:'column',\ alignment:['fill','fill'],\ alignChildren:['center','center'],\ },\ footer: Group\ {\ alignment:['center','bottom'], \ icn_app: Image {icon:'" + this.resources.icon.path + '/' + this.resources.icon.name + "',preferredSize: [15, 18]},\ txt_info: StaticText { text:'"+ this.info.url + "', alignment:['fill','center'] },\ }, \ }"; this.window.grp = this.window.add( res ); this.window.layout.layout(true); this.customizeUI(); //EventHandlerAssignment this.window.onResize = this.resize; this.window.onClose = this.close; this.window.onDraw = this.autoLayout; }, customizeUI : function customizeUI() { var g = this.window.graphics; var orange = g.newBrush(g.BrushType.SOLID_COLOR, [1, .45, 0, 1]); this.window.grp.main.graphics.backgroundColor = orange; }, addTool : function addTool( aTool ) { /**** TO DO ****/ // Check that the tool object is unique. // Call for a window resize so it refreshes propperly. this.tools.push( aTool ); var btn = this.window.grp.main.add( aTool.btnLauyout ); btn.onClick = aTool.activate; btn.yTool = aTool; // add a reference to the tool so I can access info on it later... //alert(btn.onClick); this.window.layout.layout(true); }, //EVENT HANDLERS resize : function resize() { this.layout.resize(); }, close : function close() { YTB = null; delete this; }, init : function init() { this.window = ( scriptUIPanel instanceof Panel ) ? scriptUIPanel: new Window( "palette" , this.info.name , undefined, { resizeable : true } ); this.createUI(); } }; YTB.init(); #include "../yScripts/y_setStructure.jsx"; #include "../yScripts/y_colorProbe.jsx"; #include "../yScripts/y_BindBetween2.jsx"; #include "../yScripts/y_CPOffset.jsx"; #include "../yScripts/y_puppetRig.jsx"; #include "../yScripts/y_GenericNewScript.jsx"; +>>>>>>> 84e17ed... Adapted all scripts to work on their own and with the toolbox. diff --git a/yScripts/y_BindBetween2.jsx b/yScripts/y_BindBetween2.jsx index 9816cf7..9891417 100644 --- a/yScripts/y_BindBetween2.jsx +++ b/yScripts/y_BindBetween2.jsx @@ -93,7 +93,7 @@ function YBindBetween2() } this.activate = function activate() { - this.yTool.yMainFunction(); + yBindBetween2.yMainFunction(); } this.run = function run() { @@ -212,5 +212,5 @@ if (typeof(YTB)=='undefined') } else { - YTB.addTool(new YBindBetween2()); + yBindBetween2 = YTB.addTool(new YBindBetween2()); } diff --git a/yScripts/y_colorProbe.jsx b/yScripts/y_colorProbe.jsx index d2bb677..e6ac20c 100755 --- a/yScripts/y_colorProbe.jsx +++ b/yScripts/y_colorProbe.jsx @@ -63,7 +63,7 @@ function YColorProbe() } this.yMainFunction = function yMainFunction() { - app.beginUndoGroup(this.yTool.info.name); // yTool is a refernece to the Tool object, because THIS in this context returns the ButtonObject.... + app.beginUndoGroup( yColorProbe.info.name ); // yTool is a refernece to the Tool object, because THIS in this context returns the ButtonObject.... //It works with Sampled layers at a 100% scale only. try @@ -124,5 +124,5 @@ if (typeof(YTB)=='undefined') } else { - YTB.addTool(new YColorProbe()); + yColorProbe = YTB.addTool(new YColorProbe()); } diff --git a/yScripts/y_puppetRig.jsx b/yScripts/y_puppetRig.jsx index 0ab1367..5ef8718 100755 --- a/yScripts/y_puppetRig.jsx +++ b/yScripts/y_puppetRig.jsx @@ -4,9 +4,9 @@ function YPuppetRigTool() this.info = { name : "yPuppetRig", - version : 0.33, + version : 0.0, stage : "development", - description : "Tools for streamlining puppet-based animation rigs.", + description : "Tool to create nulls at puppet pin locations, and link the latter to the former.", url : "yorchnet.com" }; this.appearence = @@ -98,7 +98,7 @@ function YPuppetRigTool() } this.activate = function activate() { - this.yTool.yMainFunction(); + yPuppetRigTool.yMainFunction(); } /**/