Photoshopのレイヤーに含まれる黒色成分を取り除き、アルファ化するスクリプトです。ayato@web(http://www.ayatoweb.com/)さんで公開されているPhotoshop用アクション「Un-Multiply」を参考にScripting Listenerプラグインでスクリプトに起こしたものです。
Photoshopのアクションからでも十分有用なものですが、複数のレイヤーの黒背景を取り除きたかった為、スクリプト化してみました。下記は日本語版 Photoshop用です。
スクリプトで生成されるアルファチャンネル名を変数化した為、日本語版Photoshopだけでなく、英語版等の海外言語版Photoshopでも動作します。
スクリプト動作検証環境
Microsoft Windows, Adobe Photoshop CS5, CS6
スクリプトダウンロード
ScriptName: OM_Un-Multiply_AM.jsx
- v1.0.1 2017/02/18: Download
キュメント内にアルファチャンネル1~5が存在する場合、エラーとなる為、アルファチャンネル名を変数に置き換え、チャンネル名の書き換え用のスクリプトを追記。これで英語版Photoshop等でも動作します。
選択レイヤーが非表示の場合、レイヤーを表示する判定を追加。
- v1.0.0 2017/02/16:
Un-Multiplyをスクリプト化。
OM_Un_Multiply_AMの動作内容
黒色背景成分を透明アルファ化する手順は下記の通りです。
- 黒色を透明アルファ化させたいレイヤーを選択します。
- レイヤーのレッドチャンネルを選択します。
- レッドチャンネルに演算でグリーンチャンネルをブレンドモード「比較(明)」でアルファチャンネル1を生成します。
- アルファチャンネル1に演算でブルーチャンネルをブレンドモード「比較(明)」でアルファチャンネル2を生成します。
- アルファチャンネル2に演算でレッドチャンネルをブレンドモード「除算」でアルファチャンネル3を生成します。
- アルファチャンネル2に演算でグリーンチャンネルをブレンドモード「除算」でアルファチャンネル4を生成します。
- アルファチャンネル2に演算でブルーチャンネルをブレンドモード「除算」でアルファチャンネル5を生成します。
- アルファチャンネル3をコピーし、レッドチャンネルにペーストします。
- アルファチャンネル4をコピーし、グリーンチャンネルにペーストします。
- アルファチャンネル5をコピーし、ブルーチャンネルにペーストします。
- アルファチャンネル2を選択範囲として読み込みます。
- 1.で選択したレイヤーを選択します。
- 選択範囲内のピクセルをDeleteキーで削除します。
- 選択範囲を解除します。
- アルファチャンネル1~5を削除します。
- 黒色成分が透明アルファ化されます。
スクリプトコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
var docRef = app.activeDocument; var layRef = docRef.activeLayer; var scriptName = "OM_Un-Multiply_AM"; var alphaChnl1 = scriptName + "_" + "alphaChnl1", alphaChnl2 = scriptName + "_" + "alphaChnl2", alphaChnl3 = scriptName + "_" + "alphaChnl3", alphaChnl4 = scriptName + "_" + "alphaChnl4", alphaChnl5 = scriptName + "_" + "alphaChnl5"; // 選択レイヤーが非表示の場合、レイヤーを表示する。 if (layRef.visible) { main(); } else { layRef.visible = true; main(); layRef.visible = false; }; // メイン関数 function main() { // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1154 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1088 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idRd = charIDToTypeID( "Rd " ); ref1088.putEnumerated( idChnl, idChnl, idRd ); desc1154.putReference( idnull, ref1088 ); executeAction( idslct, desc1154, DialogModes.NO ); // ======================================================= var idMk = charIDToTypeID( "Mk " ); var desc1155 = new ActionDescriptor(); var idNw = charIDToTypeID( "Nw " ); var idChnl = charIDToTypeID( "Chnl" ); desc1155.putClass( idNw, idChnl ); var idUsng = charIDToTypeID( "Usng" ); var desc1156 = new ActionDescriptor(); var idT = charIDToTypeID( "T " ); var ref1089 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref1089.putEnumerated( idChnl, idOrdn, idTrgt ); var idLyr = charIDToTypeID( "Lyr " ); var idOrdn = charIDToTypeID( "Ordn" ); var idMrgd = charIDToTypeID( "Mrgd" ); ref1089.putEnumerated( idLyr, idOrdn, idMrgd ); desc1156.putReference( idT, ref1089 ); var idClcl = charIDToTypeID( "Clcl" ); var idClcn = charIDToTypeID( "Clcn" ); var idLghn = charIDToTypeID( "Lghn" ); desc1156.putEnumerated( idClcl, idClcn, idLghn ); var idSrctwo = charIDToTypeID( "Src2" ); var ref1090 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idGrn = charIDToTypeID( "Grn " ); ref1090.putEnumerated( idChnl, idChnl, idGrn ); desc1156.putReference( idSrctwo, ref1090 ); var idClcl = charIDToTypeID( "Clcl" ); desc1155.putObject( idUsng, idClcl, desc1156 ); executeAction( idMk, desc1155, DialogModes.NO ); // ======================================================= var idsetd = charIDToTypeID( "setd" ); var desc192 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref107 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref107.putEnumerated( idChnl, idOrdn, idTrgt ); desc192.putReference( idnull, ref107 ); var idT = charIDToTypeID( "T " ); var desc193 = new ActionDescriptor(); var idNm = charIDToTypeID( "Nm " ); desc193.putString( idNm, alphaChnl1 ); var idChnl = charIDToTypeID( "Chnl" ); desc192.putObject( idT, idChnl, desc193 ); executeAction( idsetd, desc192, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc225 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref140 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref140.putName( idChnl, alphaChnl1 ); desc225.putReference( idnull, ref140 ); executeAction( idslct, desc225, DialogModes.NO ); // ======================================================= var idMk = charIDToTypeID( "Mk " ); var desc1157 = new ActionDescriptor(); var idNw = charIDToTypeID( "Nw " ); var idChnl = charIDToTypeID( "Chnl" ); desc1157.putClass( idNw, idChnl ); var idUsng = charIDToTypeID( "Usng" ); var desc1158 = new ActionDescriptor(); var idT = charIDToTypeID( "T " ); var ref1091 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref1091.putEnumerated( idChnl, idOrdn, idTrgt ); desc1158.putReference( idT, ref1091 ); var idClcl = charIDToTypeID( "Clcl" ); var idClcn = charIDToTypeID( "Clcn" ); var idLghn = charIDToTypeID( "Lghn" ); desc1158.putEnumerated( idClcl, idClcn, idLghn ); var idSrctwo = charIDToTypeID( "Src2" ); var ref1092 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idBl = charIDToTypeID( "Bl " ); ref1092.putEnumerated( idChnl, idChnl, idBl ); desc1158.putReference( idSrctwo, ref1092 ); var idClcl = charIDToTypeID( "Clcl" ); desc1157.putObject( idUsng, idClcl, desc1158 ); executeAction( idMk, desc1157, DialogModes.NO ); // ======================================================= var idsetd = charIDToTypeID( "setd" ); var desc192 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref107 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref107.putEnumerated( idChnl, idOrdn, idTrgt ); desc192.putReference( idnull, ref107 ); var idT = charIDToTypeID( "T " ); var desc193 = new ActionDescriptor(); var idNm = charIDToTypeID( "Nm " ); desc193.putString( idNm, alphaChnl2 ); var idChnl = charIDToTypeID( "Chnl" ); desc192.putObject( idT, idChnl, desc193 ); executeAction( idsetd, desc192, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc225 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref140 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref140.putName( idChnl, alphaChnl2 ); desc225.putReference( idnull, ref140 ); executeAction( idslct, desc225, DialogModes.NO ); // ======================================================= var idMk = charIDToTypeID( "Mk " ); var desc1159 = new ActionDescriptor(); var idNw = charIDToTypeID( "Nw " ); var idChnl = charIDToTypeID( "Chnl" ); desc1159.putClass( idNw, idChnl ); var idUsng = charIDToTypeID( "Usng" ); var desc1160 = new ActionDescriptor(); var idT = charIDToTypeID( "T " ); var ref1093 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref1093.putEnumerated( idChnl, idOrdn, idTrgt ); desc1160.putReference( idT, ref1093 ); var idClcl = charIDToTypeID( "Clcl" ); var idClcn = charIDToTypeID( "Clcn" ); var idblendDivide = stringIDToTypeID( "blendDivide" ); desc1160.putEnumerated( idClcl, idClcn, idblendDivide ); var idSrctwo = charIDToTypeID( "Src2" ); var ref1094 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idRd = charIDToTypeID( "Rd " ); ref1094.putEnumerated( idChnl, idChnl, idRd ); desc1160.putReference( idSrctwo, ref1094 ); var idClcl = charIDToTypeID( "Clcl" ); desc1159.putObject( idUsng, idClcl, desc1160 ); executeAction( idMk, desc1159, DialogModes.NO ); // ======================================================= var idsetd = charIDToTypeID( "setd" ); var desc192 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref107 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref107.putEnumerated( idChnl, idOrdn, idTrgt ); desc192.putReference( idnull, ref107 ); var idT = charIDToTypeID( "T " ); var desc193 = new ActionDescriptor(); var idNm = charIDToTypeID( "Nm " ); desc193.putString( idNm, alphaChnl3 ); var idChnl = charIDToTypeID( "Chnl" ); desc192.putObject( idT, idChnl, desc193 ); executeAction( idsetd, desc192, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1161 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1095 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1095.putName( idChnl, alphaChnl2 ); desc1161.putReference( idnull, ref1095 ); executeAction( idslct, desc1161, DialogModes.NO ); // ======================================================= var idMk = charIDToTypeID( "Mk " ); var desc1162 = new ActionDescriptor(); var idNw = charIDToTypeID( "Nw " ); var idChnl = charIDToTypeID( "Chnl" ); desc1162.putClass( idNw, idChnl ); var idUsng = charIDToTypeID( "Usng" ); var desc1163 = new ActionDescriptor(); var idT = charIDToTypeID( "T " ); var ref1096 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref1096.putEnumerated( idChnl, idOrdn, idTrgt ); desc1163.putReference( idT, ref1096 ); var idClcl = charIDToTypeID( "Clcl" ); var idClcn = charIDToTypeID( "Clcn" ); var idblendDivide = stringIDToTypeID( "blendDivide" ); desc1163.putEnumerated( idClcl, idClcn, idblendDivide ); var idSrctwo = charIDToTypeID( "Src2" ); var ref1097 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idGrn = charIDToTypeID( "Grn " ); ref1097.putEnumerated( idChnl, idChnl, idGrn ); desc1163.putReference( idSrctwo, ref1097 ); var idClcl = charIDToTypeID( "Clcl" ); desc1162.putObject( idUsng, idClcl, desc1163 ); executeAction( idMk, desc1162, DialogModes.NO ); // ======================================================= var idsetd = charIDToTypeID( "setd" ); var desc192 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref107 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref107.putEnumerated( idChnl, idOrdn, idTrgt ); desc192.putReference( idnull, ref107 ); var idT = charIDToTypeID( "T " ); var desc193 = new ActionDescriptor(); var idNm = charIDToTypeID( "Nm " ); desc193.putString( idNm, alphaChnl4 ); var idChnl = charIDToTypeID( "Chnl" ); desc192.putObject( idT, idChnl, desc193 ); executeAction( idsetd, desc192, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1164 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1098 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1098.putName( idChnl, alphaChnl2 ); desc1164.putReference( idnull, ref1098 ); executeAction( idslct, desc1164, DialogModes.NO ); // ======================================================= var idMk = charIDToTypeID( "Mk " ); var desc1165 = new ActionDescriptor(); var idNw = charIDToTypeID( "Nw " ); var idChnl = charIDToTypeID( "Chnl" ); desc1165.putClass( idNw, idChnl ); var idUsng = charIDToTypeID( "Usng" ); var desc1166 = new ActionDescriptor(); var idT = charIDToTypeID( "T " ); var ref1099 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref1099.putEnumerated( idChnl, idOrdn, idTrgt ); desc1166.putReference( idT, ref1099 ); var idClcl = charIDToTypeID( "Clcl" ); var idClcn = charIDToTypeID( "Clcn" ); var idblendDivide = stringIDToTypeID( "blendDivide" ); desc1166.putEnumerated( idClcl, idClcn, idblendDivide ); var idSrctwo = charIDToTypeID( "Src2" ); var ref1100 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idBl = charIDToTypeID( "Bl " ); ref1100.putEnumerated( idChnl, idChnl, idBl ); desc1166.putReference( idSrctwo, ref1100 ); var idClcl = charIDToTypeID( "Clcl" ); desc1165.putObject( idUsng, idClcl, desc1166 ); executeAction( idMk, desc1165, DialogModes.NO ); // ======================================================= var idsetd = charIDToTypeID( "setd" ); var desc192 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref107 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref107.putEnumerated( idChnl, idOrdn, idTrgt ); desc192.putReference( idnull, ref107 ); var idT = charIDToTypeID( "T " ); var desc193 = new ActionDescriptor(); var idNm = charIDToTypeID( "Nm " ); desc193.putString( idNm, alphaChnl5 ); var idChnl = charIDToTypeID( "Chnl" ); desc192.putObject( idT, idChnl, desc193 ); executeAction( idsetd, desc192, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1167 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1101 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1101.putName( idChnl, alphaChnl3 ); desc1167.putReference( idnull, ref1101 ); executeAction( idslct, desc1167, DialogModes.NO ); // ======================================================= var idsetd = charIDToTypeID( "setd" ); var desc1168 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1102 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idfsel = charIDToTypeID( "fsel" ); ref1102.putProperty( idChnl, idfsel ); desc1168.putReference( idnull, ref1102 ); var idT = charIDToTypeID( "T " ); var idOrdn = charIDToTypeID( "Ordn" ); var idAl = charIDToTypeID( "Al " ); desc1168.putEnumerated( idT, idOrdn, idAl ); executeAction( idsetd, desc1168, DialogModes.NO ); // ======================================================= var idcopy = charIDToTypeID( "copy" ); executeAction( idcopy, undefined, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1169 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1103 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idRd = charIDToTypeID( "Rd " ); ref1103.putEnumerated( idChnl, idChnl, idRd ); desc1169.putReference( idnull, ref1103 ); executeAction( idslct, desc1169, DialogModes.NO ); // ======================================================= var idpast = charIDToTypeID( "past" ); var desc1170 = new ActionDescriptor(); var idinPlace = stringIDToTypeID( "inPlace" ); desc1170.putBoolean( idinPlace, true ); var idAntA = charIDToTypeID( "AntA" ); var idAnnt = charIDToTypeID( "Annt" ); var idAnno = charIDToTypeID( "Anno" ); desc1170.putEnumerated( idAntA, idAnnt, idAnno ); executeAction( idpast, desc1170, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1171 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1104 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1104.putName( idChnl, alphaChnl4 ); desc1171.putReference( idnull, ref1104 ); executeAction( idslct, desc1171, DialogModes.NO ); // ======================================================= var idcopy = charIDToTypeID( "copy" ); executeAction( idcopy, undefined, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1172 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1105 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idGrn = charIDToTypeID( "Grn " ); ref1105.putEnumerated( idChnl, idChnl, idGrn ); desc1172.putReference( idnull, ref1105 ); executeAction( idslct, desc1172, DialogModes.NO ); // ======================================================= var idpast = charIDToTypeID( "past" ); var desc1173 = new ActionDescriptor(); var idinPlace = stringIDToTypeID( "inPlace" ); desc1173.putBoolean( idinPlace, true ); var idAntA = charIDToTypeID( "AntA" ); var idAnnt = charIDToTypeID( "Annt" ); var idAnno = charIDToTypeID( "Anno" ); desc1173.putEnumerated( idAntA, idAnnt, idAnno ); executeAction( idpast, desc1173, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1174 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1106 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1106.putName( idChnl, alphaChnl5 ); desc1174.putReference( idnull, ref1106 ); executeAction( idslct, desc1174, DialogModes.NO ); // ======================================================= var idcopy = charIDToTypeID( "copy" ); executeAction( idcopy, undefined, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1175 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1107 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idBl = charIDToTypeID( "Bl " ); ref1107.putEnumerated( idChnl, idChnl, idBl ); desc1175.putReference( idnull, ref1107 ); executeAction( idslct, desc1175, DialogModes.NO ); // ======================================================= var idpast = charIDToTypeID( "past" ); var desc1176 = new ActionDescriptor(); var idinPlace = stringIDToTypeID( "inPlace" ); desc1176.putBoolean( idinPlace, true ); var idAntA = charIDToTypeID( "AntA" ); var idAnnt = charIDToTypeID( "Annt" ); var idAnno = charIDToTypeID( "Anno" ); desc1176.putEnumerated( idAntA, idAnnt, idAnno ); executeAction( idpast, desc1176, DialogModes.NO ); // ======================================================= var idsetd = charIDToTypeID( "setd" ); var desc1177 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1108 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idfsel = charIDToTypeID( "fsel" ); ref1108.putProperty( idChnl, idfsel ); desc1177.putReference( idnull, ref1108 ); var idT = charIDToTypeID( "T " ); var ref1109 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1109.putName( idChnl, alphaChnl2 ); desc1177.putReference( idT, ref1109 ); executeAction( idsetd, desc1177, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1178 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1110 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idChnl = charIDToTypeID( "Chnl" ); var idRGB = charIDToTypeID( "RGB " ); ref1110.putEnumerated( idChnl, idChnl, idRGB ); desc1178.putReference( idnull, ref1110 ); executeAction( idslct, desc1178, DialogModes.NO ); // ======================================================= var idInvs = charIDToTypeID( "Invs" ); executeAction( idInvs, undefined, DialogModes.NO ); // ======================================================= var idDlt = charIDToTypeID( "Dlt " ); executeAction( idDlt, undefined, DialogModes.NO ); // ======================================================= var idsetd = charIDToTypeID( "setd" ); var desc1179 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1111 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); var idfsel = charIDToTypeID( "fsel" ); ref1111.putProperty( idChnl, idfsel ); desc1179.putReference( idnull, ref1111 ); var idT = charIDToTypeID( "T " ); var idOrdn = charIDToTypeID( "Ordn" ); var idNone = charIDToTypeID( "None" ); desc1179.putEnumerated( idT, idOrdn, idNone ); executeAction( idsetd, desc1179, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1244 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1178 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1178.putName( idChnl, alphaChnl1 ); desc1244.putReference( idnull, ref1178 ); executeAction( idslct, desc1244, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1245 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1179 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1179.putName( idChnl, alphaChnl2 ); desc1245.putReference( idnull, ref1179 ); var idExtd = charIDToTypeID( "Extd" ); desc1245.putBoolean( idExtd, true ); executeAction( idslct, desc1245, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1246 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1180 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1180.putName( idChnl, alphaChnl3 ); desc1246.putReference( idnull, ref1180 ); var idExtd = charIDToTypeID( "Extd" ); desc1246.putBoolean( idExtd, true ); executeAction( idslct, desc1246, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1247 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1181 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1181.putName( idChnl, alphaChnl4 ); desc1247.putReference( idnull, ref1181 ); var idExtd = charIDToTypeID( "Extd" ); desc1247.putBoolean( idExtd, true ); executeAction( idslct, desc1247, DialogModes.NO ); // ======================================================= var idslct = charIDToTypeID( "slct" ); var desc1248 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref1182 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1182.putName( idChnl, alphaChnl5 ); desc1248.putReference( idnull, ref1182 ); var idExtd = charIDToTypeID( "Extd" ); desc1248.putBoolean( idExtd, true ); executeAction( idslct, desc1248, DialogModes.NO ); // ======================================================= var idDlt = charIDToTypeID( "Dlt " ); var desc1249 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var list263 = new ActionList(); var ref1183 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1183.putName( idChnl, alphaChnl5 ); list263.putReference( ref1183 ); var ref1184 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1184.putName( idChnl, alphaChnl4 ); list263.putReference( ref1184 ); var ref1185 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1185.putName( idChnl, alphaChnl3 ); list263.putReference( ref1185 ); var ref1186 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1186.putName( idChnl, alphaChnl2 ); list263.putReference( ref1186 ); var ref1187 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref1187.putName( idChnl, alphaChnl1 ); list263.putReference( ref1187 ); desc1249.putList( idnull, list263 ); executeAction( idDlt, desc1249, DialogModes.NO ); }; |
コメントを残す