Hopefully this will finally fix the merging issues I had.

This commit is contained in:
Jorge Vássquez Pérez
2016-12-02 17:20:13 -08:00
parent 4ca84b5fee
commit b1efb4928b
4 changed files with 11 additions and 7 deletions
+4
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
var scriptUIPanel = this; var scriptUIPanel = this;
YTB = YTB =
{ {
@@ -122,3 +123,6 @@ YTB.init();
#include "../yScripts/y_CPOffset.jsx"; #include "../yScripts/y_CPOffset.jsx";
#include "../yScripts/y_puppetRig.jsx"; #include "../yScripts/y_puppetRig.jsx";
#include "../yScripts/y_stopMotionLayer.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.
+2 -2
View File
@@ -93,7 +93,7 @@ function YBindBetween2()
} }
this.activate = function activate() this.activate = function activate()
{ {
this.yTool.yMainFunction(); yBindBetween2.yMainFunction();
} }
this.run = function run() this.run = function run()
{ {
@@ -212,5 +212,5 @@ if (typeof(YTB)=='undefined')
} }
else else
{ {
YTB.addTool(new YBindBetween2()); yBindBetween2 = YTB.addTool(new YBindBetween2());
} }
+2 -2
View File
@@ -63,7 +63,7 @@ function YColorProbe()
} }
this.yMainFunction = function yMainFunction() 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. //It works with Sampled layers at a 100% scale only.
try try
@@ -124,5 +124,5 @@ if (typeof(YTB)=='undefined')
} }
else else
{ {
YTB.addTool(new YColorProbe()); yColorProbe = YTB.addTool(new YColorProbe());
} }
+3 -3
View File
@@ -4,9 +4,9 @@ function YPuppetRigTool()
this.info = this.info =
{ {
name : "yPuppetRig", name : "yPuppetRig",
version : 0.33, version : 0.0,
stage : "development", 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" url : "yorchnet.com"
}; };
this.appearence = this.appearence =
@@ -98,7 +98,7 @@ function YPuppetRigTool()
} }
this.activate = function activate() this.activate = function activate()
{ {
this.yTool.yMainFunction(); yPuppetRigTool.yMainFunction();
} }
/**/ /**/