Reorganized the ToolBox and encapsulated it into a Signle namespace YTB, the tool bundling doesn't work yet

renaissance
yorch 11 years ago
parent 1238e7949e
commit 6d01d35cd0

File diff suppressed because one or more lines are too long

@ -4,10 +4,10 @@ yGeneric_data.scriptName = 'YTBGen';
yGeneric_data.scriptDesc = 'YToolBox Generic Script is the base for adding tools.'; yGeneric_data.scriptDesc = 'YToolBox Generic Script is the base for adding tools.';
yGeneric_data.scriptVer = '0.1a'; yGeneric_data.scriptVer = '0.1a';
yGeneric_data.webLink = 'yorchnet.com'; yGeneric_data.webLink = 'yorchnet.com';
yGeneric_data.img = yToolBox_data.icon; yGeneric_data.img = YTB.icon;
//if yToolBox Exists add it to its tool list. //if yToolBox Exists add it to its tool list.
if (typeof(yToolBox_data)!=='undefined'){ if (typeof(YTB)!=='undefined'){
//it should be called from toolbox. //it should be called from toolbox.
yGeneric_data.buttonWidth=76; yGeneric_data.buttonWidth=76;
@ -46,7 +46,7 @@ function build_yGeneric_data_UI(){
yGeneric_data.activate = build_yGeneric_data_UI ; yGeneric_data.activate = build_yGeneric_data_UI ;
//alert(); //alert();
//CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own. //CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own.
//if (typeof(yToolBox_data)=='undefined'){ //if (typeof(YTB)=='undefined'){
yGeneric_data.activate(); yGeneric_data.activate();
//}else{ //}else{
//} //}

@ -6,15 +6,15 @@ yMultiRenamer_data.scriptVer = '0.1a';
yMultiRenamer_data.webLink = 'yorchnet.com'; yMultiRenamer_data.webLink = 'yorchnet.com';
//if yToolBox Exists add it to its tool list. //if yToolBox Exists add it to its tool list.
if (typeof(yToolBox_data)!=='undefined'){ if (typeof(YTB)!=='undefined'){
yToolBox_data.tools.push(yMultiRenamer_data); YTB.tools.push(yMultiRenamer_data);
//it should be called from toolbox. //it should be called from toolbox.
yMultiRenamer_data.buttonWidth=76; yMultiRenamer_data.buttonWidth=76;
yMultiRenamer_data.buttonHeight=30; yMultiRenamer_data.buttonHeight=30;
yMultiRenamer_data.btnLayout = "btn_"+yMultiRenamer_data.scriptName+": Button { preferredSize: ['"+ yToolBox_data.buttonWidth+"','"+ yToolBox_data.buttonHeight+"'], text:'"+yMultiRenamer_data.scriptName+"', helpTip:'"+yMultiRenamer_data.scriptDesc+"' }"; yMultiRenamer_data.btnLayout = "btn_"+yMultiRenamer_data.scriptName+": Button { preferredSize: ['"+ YTB.buttonWidth+"','"+ YTB.buttonHeight+"'], text:'"+yMultiRenamer_data.scriptName+"', helpTip:'"+yMultiRenamer_data.scriptDesc+"' }";
} }
@ -167,10 +167,10 @@ function build_yMultiRenamer_data_UI(){
yMultiRenamer_data.activate = build_yMultiRenamer_data_UI ; yMultiRenamer_data.activate = build_yMultiRenamer_data_UI ;
//CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own. //CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own.
if (typeof(yToolBox_data)=='undefined'){ if (typeof(YTB)=='undefined'){
yMultiRenamer_data.activate(); yMultiRenamer_data.activate();
}else{ }else{
} }
// a= yMultiRenamer() // a= yMultiRenamer()

@ -6,15 +6,15 @@ yMultiRenamer_data.scriptVer = '0.2a';
yMultiRenamer_data.webLink = 'yorchnet.com'; yMultiRenamer_data.webLink = 'yorchnet.com';
//if yToolBox Exists add it to its tool list. //if yToolBox Exists add it to its tool list.
if (typeof(yToolBox_data)!=='undefined'){ if (typeof(YTB)!=='undefined'){
yToolBox_data.tools.push(yMultiRenamer_data); YTB.tools.push(yMultiRenamer_data);
//it should be called from toolbox. //it should be called from toolbox.
yMultiRenamer_data.buttonWidth=76; yMultiRenamer_data.buttonWidth=76;
yMultiRenamer_data.buttonHeight=30; yMultiRenamer_data.buttonHeight=30;
yMultiRenamer_data.btnLayout = "btn_"+yMultiRenamer_data.scriptName+": Button { preferredSize: ['"+ yToolBox_data.buttonWidth+"','"+ yToolBox_data.buttonHeight+"'], text:'"+yMultiRenamer_data.scriptName+"', helpTip:'"+yMultiRenamer_data.scriptDesc+"' }"; yMultiRenamer_data.btnLayout = "btn_"+yMultiRenamer_data.scriptName+": Button { preferredSize: ['"+ YTB.buttonWidth+"','"+ YTB.buttonHeight+"'], text:'"+yMultiRenamer_data.scriptName+"', helpTip:'"+yMultiRenamer_data.scriptDesc+"' }";
} }
@ -141,11 +141,11 @@ yMultiRenamer_data.activate = build_yMultiRenamer_data_UI ;
//CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own. //CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own.
/* /*
if (typeof(yToolBox_data)=='undefined'){ if (typeof(YTB)=='undefined'){
*/ */
yMultiRenamer_data.activate(); yMultiRenamer_data.activate();
/*}else{ /*}else{
} }
*/ */
// a= yMultiRenamer() // a= yMultiRenamer()

@ -8,15 +8,15 @@ yOffsetCornerPin_data.scriptVer = '0.1a';
yOffsetCornerPin_data.webLink = 'yorchnet.com'; yOffsetCornerPin_data.webLink = 'yorchnet.com';
//if yToolBox Exists add it to its tool list. //if yToolBox Exists add it to its tool list.
if (typeof(yToolBox_data)!=='undefined'){ if (typeof(YTB)!=='undefined'){
yToolBox_data.tools.push(yOffsetCornerPin_data); YTB.tools.push(yOffsetCornerPin_data);
//it should be called from toolbox. //it should be called from toolbox.
/* /*
yOffsetCornerPin_data.buttonWidth=76; yOffsetCornerPin_data.buttonWidth=76;
yOffsetCornerPin_data.buttonHeight=30; yOffsetCornerPin_data.buttonHeight=30;
*/ */
yOffsetCornerPin_data.btnLayout = "btn_"+ yOffsetCornerPin_data.scriptName+": Button { preferredSize: ['"+ yToolBox_data.buttonWidth+"','"+ yToolBox_data.buttonHeight+"'], text:'"+yOffsetCornerPin_data.scriptName+"', helpTip:'"+yOffsetCornerPin_data.scriptDesc+"' }"; yOffsetCornerPin_data.btnLayout = "btn_"+ yOffsetCornerPin_data.scriptName+": Button { preferredSize: ['"+ YTB.buttonWidth+"','"+ YTB.buttonHeight+"'], text:'"+yOffsetCornerPin_data.scriptName+"', helpTip:'"+yOffsetCornerPin_data.scriptDesc+"' }";
} }
@ -102,7 +102,7 @@ function build_yOffsetCornerPin_data_UI(){
yOffsetCornerPin_data.activate =processCornerPins ; yOffsetCornerPin_data.activate =processCornerPins ;
//CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own. //CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own.
if (typeof(yToolBox_data)=='undefined'){ if (typeof(YTB)=='undefined'){
yOffsetCornerPin_data.activate(); yOffsetCornerPin_data.activate();
}else{ }else{
} }

@ -6,14 +6,14 @@ yColorProbe_data.scriptVer = '0.2a';
yColorProbe_data.webLink = 'yorchnet.com'; yColorProbe_data.webLink = 'yorchnet.com';
//if yToolBox Exists add it to its tool list. //if yToolBox Exists add it to its tool list.
if (typeof(yToolBox_data)!=='undefined'){ if (typeof(YTB)!=='undefined'){
yToolBox_data.tools.push(yColorProbe_data); YTB.tools.push(yColorProbe_data);
//it should be called from toolbox. //it should be called from toolbox.
/* yColorProbe_data.buttonWidth=76; /* yColorProbe_data.buttonWidth=76;
yColorProbe_data.buttonHeight=30; yColorProbe_data.buttonHeight=30;
*/ */
yColorProbe_data.btnLayout = "btn_"+yColorProbe_data.scriptName+": Button { preferredSize: ['"+ yToolBox_data.buttonWidth+"','"+ yToolBox_data.buttonHeight+"'], text:'"+yColorProbe_data.scriptName+"', helpTip:'"+yColorProbe_data.scriptDesc+"' }"; yColorProbe_data.btnLayout = "btn_"+yColorProbe_data.scriptName+": Button { preferredSize: ['"+ YTB.buttonWidth+"','"+ YTB.buttonHeight+"'], text:'"+yColorProbe_data.scriptName+"', helpTip:'"+yColorProbe_data.scriptDesc+"' }";
} }
@ -83,7 +83,7 @@ function build_yColorProbe_data_UI(){
yColorProbe_data.activate =yColorProbe ; yColorProbe_data.activate =yColorProbe ;
//CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own. //CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own.
if (typeof(yToolBox_data)=='undefined'){ if (typeof(YTB)=='undefined'){
yColorProbe_data.activate(); yColorProbe_data.activate();
}else{ }else{
} }

@ -20,9 +20,9 @@ yPuppetRig_data.buttonWidth=76;
yPuppetRig_data.buttonHeight=30; yPuppetRig_data.buttonHeight=30;
//if yToolBox Exists add it to its tool list. //if yToolBox Exists add it to its tool list.
if (typeof(yToolBox_data)!=='undefined'){ if (typeof(YTB)!=='undefined'){
yToolBox_data.tools.push(yPuppetRig_data); YTB.tools.push(yPuppetRig_data);
yPuppetRig_data.btnLayout = "btn_"+ yPuppetRig_data.scriptName+": Button { preferredSize: ['"+yToolBox_data.buttonWidth+"','"+ yToolBox_data.buttonHeight+"'], text:'"+yPuppetRig_data.scriptName+"', helpTip:'"+yPuppetRig_data.scriptDesc+"' }"; yPuppetRig_data.btnLayout = "btn_"+ yPuppetRig_data.scriptName+": Button { preferredSize: ['"+YTB.buttonWidth+"','"+ YTB.buttonHeight+"'], text:'"+yPuppetRig_data.scriptName+"', helpTip:'"+yPuppetRig_data.scriptDesc+"' }";
} }
function build_yPuppetRig_data_UI(){ function build_yPuppetRig_data_UI(){
@ -55,13 +55,13 @@ yPuppetRig_data.res = "window { \
},\ },\
info: Group { \ info: Group { \
alignment:['center','bottom'], \ alignment:['center','bottom'], \
icn_app: Image {icon:'"+ yToolBox_data.icon.path+'/'+ yToolBox_data.icon.name+"',preferredSize: [15, 18]},\ icn_app: Image {icon:'"+ YTB.icon.path+'/'+ YTB.icon.name+"',preferredSize: [15, 18]},\
txt_info: StaticText { text:'"+yPuppetRig_data.string_info+"', alignment:['fill','center'] },\ txt_info: StaticText { text:'"+yPuppetRig_data.string_info+"', alignment:['fill','center'] },\
}\ }\
}\ }\
}"; }";
//if (typeof(yToolBox_data)!=='undefined'){ //if (typeof(YTB)!=='undefined'){
yPuppetRigDialog = new Window (yPuppetRig_data.res); // Creates Window yPuppetRigDialog = new Window (yPuppetRig_data.res); // Creates Window
//} //}
//yPuppetRigDialog.onDraw = customColors(yPuppetRigDialog); //yPuppetRigDialog.onDraw = customColors(yPuppetRigDialog);
@ -70,7 +70,7 @@ yPuppetRig_data.res = "window { \
//yPuppetRigDialog.grp.info.icn_app.image = yToolBox_data.icon.substring(3,yToolBox_data.icon.length); //yPuppetRigDialog.grp.info.icn_app.image = YTB.icon.substring(3,YTB.icon.length);
yPuppetRigDialog.grp.btn_01.onClick = runRigPin; //Defines Button Action yPuppetRigDialog.grp.btn_01.onClick = runRigPin; //Defines Button Action
yPuppetRigDialog.grp.btn_02.onClick = runRigLayer; //Defines Button Action yPuppetRigDialog.grp.btn_02.onClick = runRigLayer; //Defines Button Action
yPuppetRigDialog.grp.btn_03.onClick = runRigAll; //Defines Button Action yPuppetRigDialog.grp.btn_03.onClick = runRigAll; //Defines Button Action
@ -239,7 +239,7 @@ function setPropsFromUI(){
//CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own. //CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own.
if (typeof(yToolBox_data)=='undefined'){ if (typeof(YTB)=='undefined'){
yPuppetRig_data.activate(); yPuppetRig_data.activate();
}else{ }else{
} }

@ -8,15 +8,15 @@ ySetProject_data.scriptVer = '0.1a';
ySetProject_data.webLink = 'yorchnet.com'; ySetProject_data.webLink = 'yorchnet.com';
//if yToolBox Exists add it to its tool list. //if yToolBox Exists add it to its tool list.
if (typeof(yToolBox_data)!=='undefined'){ if (typeof(YTB)!=='undefined'){
yToolBox_data.tools.push(ySetProject_data); YTB.tools.push(ySetProject_data);
//it should be called from toolbox. //it should be called from toolbox.
/* /*
ySetProject_data.buttonWidth=76; ySetProject_data.buttonWidth=76;
ySetProject_data.buttonHeight=30; ySetProject_data.buttonHeight=30;
*/ */
ySetProject_data.btnLayout = "btn_"+ ySetProject_data.scriptName+": Button { preferredSize: ['"+ yToolBox_data.buttonWidth+"','"+ yToolBox_data.buttonHeight+"'], text:'"+ySetProject_data.scriptName+"', helpTip:'"+ySetProject_data.scriptDesc+"' }"; ySetProject_data.btnLayout = "btn_"+ ySetProject_data.scriptName+": Button { preferredSize: ['"+ YTB.buttonWidth+"','"+ YTB.buttonHeight+"'], text:'"+ySetProject_data.scriptName+"', helpTip:'"+ySetProject_data.scriptDesc+"' }";
} }
@ -77,7 +77,7 @@ function build_ySetProject_data_UI(){
ySetProject_data.activate = ySetProject ; ySetProject_data.activate = ySetProject ;
//CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own. //CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own.
if (typeof(yToolBox_data)=='undefined'){ if (typeof(YTB)=='undefined'){
ySetProject_data.activate(); ySetProject_data.activate();
}else{ }else{
} }

@ -6,14 +6,14 @@ yStopMotion_data.scriptVer = '0.1a';
yStopMotion_data.webLink = 'yorchnet.com'; yStopMotion_data.webLink = 'yorchnet.com';
//if yToolBox Exists add it to its tool list. //if yToolBox Exists add it to its tool list.
if (typeof(yToolBox_data)!=='undefined'){ if (typeof(YTB)!=='undefined'){
yToolBox_data.tools.push(yStopMotion_data); YTB.tools.push(yStopMotion_data);
//it should be called from toolbox. //it should be called from toolbox.
/* yStopMotion_data.buttonWidth=76; /* yStopMotion_data.buttonWidth=76;
yStopMotion_data.buttonHeight=30; yStopMotion_data.buttonHeight=30;
*/ */
yStopMotion_data.btnLayout = "btn_"+yStopMotion_data.scriptName+": Button { preferredSize: ['"+ yToolBox_data.buttonWidth+"','"+ yToolBox_data.buttonHeight+"'], text:'"+yStopMotion_data.scriptName+"', helpTip:'"+yStopMotion_data.scriptDesc+"' }"; yStopMotion_data.btnLayout = "btn_"+yStopMotion_data.scriptName+": Button { preferredSize: ['"+ YTB.buttonWidth+"','"+ YTB.buttonHeight+"'], text:'"+yStopMotion_data.scriptName+"', helpTip:'"+yStopMotion_data.scriptDesc+"' }";
} }
@ -95,7 +95,7 @@ function build_yStopMotion_data_UI(){
yStopMotion_data.activate = yStopMotionLayer ; yStopMotion_data.activate = yStopMotionLayer ;
//CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own. //CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own.
if (typeof(yToolBox_data)=='undefined'){ if (typeof(YTB)=='undefined'){
yStopMotion_data.activate(); yStopMotion_data.activate();
}else{ }else{
} }

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save