Beauty Salon α-BET (alphabet)

space001
Blender3d Collada dae modeling Use Papervision3d on Progression3 and 4 http://a-bet.secret.jp/#/access
more whaison works.
whaison space
space002
http://whaison.jugem.jp/ https://jp.pinterest.com/whaison/ https://www.instagram.com/whaison/ https://whaison.amebaownd.com/
https://suzuri.jp/whaison
http://whaison.blogspot.com/
http://whaison.tumblr.com/ http://qiita.com/users/whaison http://www.behance.net/whaison https://github.com/whaison/ https://bitbucket.org/whaison http://serato.com/user/whaison http://whaison.hatenablog.jp/

typo memo
http://d.hatena.ne.jp/whaison/


dayNote
http://www.myspace.com/whaison http://ameblo.jp/whaison/ http://blog.crooz.jp/whaison/ http://blog.crooz.jp/whaisoncafe/ http://nenpyo.org/whaison

fulldisk
http://full.shin-gen.jp/
http://whaison.client.jp/
http://www.dclog.jp/whaison/
featured forums.
space004
forum.unity3d.com/

forums.unrealengine.com.

Progression Forum.

FlashDevelop Forum.

Papervision3D Forum.

FlexUserGroup Forum.

SparkProjectForum.





Twitter







Mobile
qrcode
Calendar
SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
22232425262728
293031    
<< December 2019 >>
New Entries
Archives
Categories
Recent comment
  • FlashDevelopでフォント埋め込み
    感謝!! (12/24)
  • cocos2d-x-3.0rc0 ,c++ ,cpp でTexturePacker で 吐き出した、plist と png でパラパラアニメーションのコード例
    whaison (04/17)
  • Blender2.67にbvh(web上に2500個以上ころがってる)入れてそのBoneオブジェクトをUnity4.0のmecanimで使う
    whaison (08/19)
  • Apple Dev Center 「Certificates, Identifiers & Profiles」で Adhoc をつくってXCode4.6.1でArchiveしてipaを書き出し
    whaison (04/30)
  • Flash CS6でプロパティーパネルで物理演算のジャンプの高さを設定できるCitrus Engine
    whaison (03/01)
  • 「Flash以外、例えばKinectとか」ON TOKYO (会場:高田馬場4-11-8 Floor 6階 ) 短縮URL http://bit.ly/dI0Bfx
    uka (03/02)
  • App Store Review Guidelines アップル社のアプリ審査基準ガイドライン和訳 Apple が 開発者を悩ませ ユーザーをハッピーにしたいガイドライン。w
    whaison (01/25)
  • Unity3d では ADOBE JAPAN OSAKIで行われたFITC 2010 TOKYOでは、 「iOS用にパブリッシュするためには、フリー版ではなくて、有料版を買ってください。さらに追加のパッケージである、"iOS Package (for Development)"を買ってください」とのことだった。
    whaison (01/25)
  • enjoy Adidas-Futsal-Park
    whaison (01/16)
  • MacBookAir にFlashPlayer入れたらなった。Mac Flash Player 10.1/10.2でUstream などでカメラが認識されないバグそんなときはUstreamProducer!でもなくiPhoneだと直ぐにライブ配信できた
    whaison (01/14)
simple sintax high lighter2.0
space003
SyntaxHighlighter2.0用 の貼り付けコード作成する!
ブログパーツ-BLOG PARTS.
Profile
Links
Recommend
Admin
無料ブログ作成サービス JUGEM
Seach this site
            
2015.06.18 Thursday
透明png32[.png]から3Dソフトでよく使うアルファチャンネル付きTarga[.tga]を自動作成するJSXをこさえたよ。
透明png32[.png]から3Dソフトでよく使うアルファチャンネル付きTarga[.tga]を自動作成するJSXをこさえたよ。

http://www.mediafire.com/download/p4ol421aaad1i0k/pngToTga.jsx.zip








 
#target photoshop
//
// pngToTga.jsx
//
//
// Generated Thu Jun 18 2015 18:07:14 GMT+0900
//
cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };
//
//==================== pngToTga ==============
//
var myFilePathStr="";
var myFilePathArr=new Array();
var myFilePathDir="";
var myFileNameStr="";
var myFileNameArr=new Array();
var myFileNameDotArr=new Array();
var myCharacterBaseName="";
var TgaFilePath="";
function pngToTga() {
// //Tga保存先設定&#149;
function step0(){
//JSの場所
/*
const SELF = (function(){
try {app.documents.test()}
catch(e) {return File(e.fileName)}
})();
//$.writeln(SELF instanceof File);
// $.writeln(SELF);
// $.writeln(SELF.path)   
myFilePathStr=SELF.path;
$.writeln("myFilePathStr"+myFilePathStr+"")   
$.writeln("$.fileName"+$.fileName)   
*/
//Tga保存先設定
myFilePathDir = activeDocument.path;
$.writeln("myFilePathDir= "+myFilePathDir+"")   
myFileNameStr=activeDocument.name;
$.writeln("myFileNameStr= "+myFileNameStr+"")   
myFileNameArr=myFileNameStr.split ("_");
$.writeln("myFileNameArr= "+myFileNameArr+"")
myFileNameDotArr=myFileNameStr.split (".");
$.writeln("myFileNameArr.length= "+myFileNameArr.length+"")
if(myFileNameArr.length>1){
//ネームルール用
myCharacterBaseName=myFileNameArr[0]+"_"+myFileNameArr[1]+"_"+myFileNameArr[2]+"_";
$.writeln("myCharacterBaseName= "+myCharacterBaseName+"")   
TgaFilePath=myFilePathDir+"/"+myCharacterBaseName+"tga.tga";
}else{
//普通ファイル用
myCharacterBaseName=myFileNameDotArr[0]+"_";
$.writeln("myCharacterBaseName= "+myCharacterBaseName+"")   
TgaFilePath=myFilePathDir+"/"+myCharacterBaseName+"tga.tga";
}
$.writeln("TgaFilePath= "+TgaFilePath+"")   
}  
//TGAに保存する。
function step1(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var desc2 = new ActionDescriptor();
desc2.putInteger(cTID('BtDp'), 32);
desc2.putInteger(cTID('Cmpr'), 0);
desc1.putObject(cTID('As  '), cTID('TrgF'), desc2);
//desc1.putPath(cTID('In  '), new File("/Share/jsx_mel/Sotai/sd_0016_victoria/sd_0016_victoria_tga.tga"));
desc1.putPath(cTID('In  '), new File(TgaFilePath));
desc1.putInteger(cTID('DocI'), 2139);
desc1.putBoolean(cTID('Cpy '), true);
desc1.putBoolean(cTID('LwCs'), true);
executeAction(sTID('save'), desc1, dialogMode);
};
// 選択範囲 透明部分チャンネル
function step2(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty(cTID('Chnl'), sTID("selection"));
desc1.putReference(cTID('null'), ref1);
var ref2 = new ActionReference();
ref2.putEnumerated(cTID('Chnl'), cTID('Chnl'), cTID('Trsp'));
desc1.putReference(cTID('T   '), ref2);
executeAction(sTID('set'), desc1, dialogMode);
};
// 複製選択範囲 chara
function step3(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty(cTID('Chnl'), sTID("selection"));
desc1.putReference(cTID('null'), ref1);
desc1.putString(cTID('Nm  '), "chara");
executeAction(sTID('duplicate'), desc1, dialogMode);
};
// 作成レイヤー
function step4(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putClass(cTID('Lyr '));
desc1.putReference(cTID('null'), ref1);
executeAction(sTID('make'), desc1, dialogMode);
};
// 選択範囲を反転
function step5(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
executeAction(sTID('inverse'), undefined, dialogMode);
};
// 描画色を黒に設定
function step6(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty(cTID('Clr '), cTID('FrgC'));
desc1.putReference(cTID('null'), ref1);
var desc2 = new ActionDescriptor();
desc2.putUnitDouble(cTID('H   '), cTID('#Ang'), 359.994506835938);
desc2.putDouble(cTID('Strt'), 0);
desc2.putDouble(cTID('Brgh'), 0);
desc1.putObject(cTID('T   '), cTID('HSBC'), desc2);
desc1.putString(cTID('Srce'), "photoshopPicker");
executeAction(sTID('set'), desc1, dialogMode);
};
// 塗り潰し
function step7(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var desc2 = new ActionDescriptor();
desc2.putUnitDouble(cTID('Hrzn'), cTID('#Pxl'), 1);
desc2.putUnitDouble(cTID('Vrtc'), cTID('#Pxl'), 1);
desc1.putObject(cTID('From'), cTID('Pnt '), desc2);
desc1.putInteger(cTID('Tlrn'), 32);
desc1.putBoolean(cTID('AntA'), true);
desc1.putEnumerated(cTID('Usng'), cTID('FlCn'), cTID('FrgC'));
executeAction(sTID('fill'), desc1, dialogMode);
};
// レイヤーを作成
function step8(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putClass(cTID('Lyr '));
desc1.putReference(cTID('null'), ref1);
executeAction(sTID('make'), desc1, dialogMode);
};
// 描画色の設定 白
function step9(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty(cTID('Clr '), cTID('FrgC'));
desc1.putReference(cTID('null'), ref1);
var desc2 = new ActionDescriptor();
desc2.putUnitDouble(cTID('H   '), cTID('#Ang'), 359.994506835938);
desc2.putDouble(cTID('Strt'), 0);
desc2.putDouble(cTID('Brgh'), 100);
desc1.putObject(cTID('T   '), cTID('HSBC'), desc2);
desc1.putString(cTID('Srce'), "photoshopPicker");
executeAction(sTID('set'), desc1, dialogMode);
};
// 選択範囲すべて
function step10(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty(cTID('Chnl'), sTID("selection"));
desc1.putReference(cTID('null'), ref1);
desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('Al  '));
executeAction(sTID('set'), desc1, dialogMode);
};
//描画色 白で塗り潰し
function step11(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var desc2 = new ActionDescriptor();
desc2.putUnitDouble(cTID('Hrzn'), cTID('#Pxl'), 1);
desc2.putUnitDouble(cTID('Vrtc'), cTID('#Pxl'), 1);
desc1.putObject(cTID('From'), cTID('Pnt '), desc2);
desc1.putInteger(cTID('Tlrn'), 32);
desc1.putBoolean(cTID('AntA'), true);
desc1.putEnumerated(cTID('Usng'), cTID('FlCn'), cTID('FrgC'));
executeAction(sTID('fill'), desc1, dialogMode);
};
// 白で塗り潰したレイヤーを 黒の裏に移動
function step12(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
desc1.putReference(cTID('null'), ref1);
var ref2 = new ActionReference();
ref2.putIndex(cTID('Lyr '), 1);
desc1.putReference(cTID('T   '), ref2);
desc1.putBoolean(cTID('Adjs'), false);
desc1.putInteger(cTID('Vrsn'), 5);
executeAction(sTID('move'), desc1, dialogMode);
};
// レイヤー1の表示を使用しない
function step13(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putName(cTID('Lyr '), "レイヤー 1");
desc1.putReference(cTID('null'), ref1);
desc1.putBoolean(cTID('MkVs'), false);
executeAction(sTID('select'), desc1, dialogMode);
};
// レイヤーを結合&#135;
function step14(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
executeAction(sTID('mergeLayersNew'), desc1, dialogMode);
};
// 選択範囲すべて
function step15(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty(cTID('Chnl'), sTID("selection"));
desc1.putReference(cTID('null'), ref1);
desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('Al  '));
executeAction(sTID('set'), desc1, dialogMode);
};
//コピー
function step16(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
executeAction(sTID('copyEvent'), undefined, dialogMode);
};
// TGA開く
function step17(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
//desc1.putPath(cTID('null'), new File("/Share/jsx_mel/Sotai/sd_0016_victoria/sd_0016_victoria_tga.tga"));
desc1.putPath(cTID('null'), new File(TgaFilePath));
executeAction(sTID('open'), desc1, dialogMode);
};
// アルファチャンネル1選択
function step18(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putName(cTID('Chnl'), "アルファチャンネル 1");
desc1.putReference(cTID('null'), ref1);
executeAction(sTID('select'), desc1, dialogMode);
};
// 選択範囲すべて
function step19(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putProperty(cTID('Chnl'), sTID("selection"));
desc1.putReference(cTID('null'), ref1);
desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('Al  '));
executeAction(sTID('set'), desc1, dialogMode);
};
// ペースト
function step20(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
desc1.putEnumerated(cTID('AntA'), cTID('Annt'), cTID('Anno'));
executeAction(sTID('paste'), desc1, dialogMode);
};
// 表示:RGBチャンネル
function step21(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var list1 = new ActionList();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Chnl'), cTID('Chnl'), cTID('Rd  '));
list1.putReference(ref1);
var ref2 = new ActionReference();
ref2.putEnumerated(cTID('Chnl'), cTID('Chnl'), cTID('Grn '));
list1.putReference(ref2);
var ref3 = new ActionReference();
ref3.putEnumerated(cTID('Chnl'), cTID('Chnl'), cTID('Bl  '));
list1.putReference(ref3);
desc1.putList(cTID('null'), list1);
executeAction(sTID('show'), desc1, dialogMode);
};
// 保存
function step22(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
executeAction(sTID('save'), undefined, dialogMode);
};
step0();      ////Tga保存先設定
step1();      //  //TGAに保存する。
step2();      //// 選択範囲 透明部分チャンネル
step3();      // // 複製選択範囲 chara
step4();      //// 作成レイヤー
step5();      //// 選択範囲を反転
step6();      //// 描画色を黒に設定
step7();      //// 塗り潰し
step8();      // // レイヤーを作成
step9();      // // 描画色の設定 白
step10();      //// 選択範囲すべて
step11();      ////描画色 白で塗り潰し
step12();      //// 白で塗り潰したレイヤーを 黒の裏に移動
step13();      // // レイヤー1の表示を使用しない
step14();      //// レイヤーを結合&#135;&#140;&#139;&#141;&#135;
step15();      //// 選択範囲すべて
step16();      ////コピー
step17();      //// TGA開く
step18();      // // アルファチャンネル1選択
step19();      //// 選択範囲すべて
step20();      //// ペースト
step21();      // // 表示:RGBチャンネル
step22();      // 保存
};
//=========================================
//                    pngToTga.main
//=========================================
//
pngToTga.main = function () {
pngToTga();
};
pngToTga.main();
// EOF
"pngToTga.jsx"
// EOF



変換元のatnはこんな内容
| whaison | jsx(ExtendScriptToolKit) | 19:31 | comments(0) | - | pookmark |
Comment




whaisonStudyNoteBook をFaceBookで いいね!





Share |