Need a script to make layers from alpha channels

Hello,
I author interior room scenes with Scene7 Image Authoring Tool. In my S7 image document, I have to make a lot of individual  masks to define transparent regions that will, at a later point, render products, such as flooring, tiles, paint or carpet. The masks are all named descriptively, such as floor, counter, wall, etc. I then have to export the image as a Photoshop document. At this point my PS doc can have anywhere from 5-15 alpha channels.
I'd like to have a script that would do the following in PS:
1. Make a new layer for each alpha channel; for example: if there are 5 a.c., then I need 5 new layers.
2. Fill the layer with 65% gray.
3. I need each a.c. to get applied to each layer as a mask.
4. Take the name of the a.c. and apply it to the layer. example: if an a.c. is called Floor, then I need the layer to be called Floor, etc.
If anyone has an idea on how to do this, I would be grateful. Right now I have to do this manually so it would be very helpful to automate this process.

This is a professional forum, we do not help with jokes that will cost you your job.
Don't retire TechNet! -
(Don't give up yet - 13,225+ strong and growing)

Similar Messages

  • Need a script to make the browser fly over the screen, bouncing around

    I have heard about the youareanidiot.org virus. I need a script to make the browser fly over the screen, bouncing around. Do you have one?

    This is a professional forum, we do not help with jokes that will cost you your job.
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • Aperture, photoshop layers and Alpha channels - notes

    In examining Aperture 2.0 to see if I could use it instead of Adobe bridge in my workflow (which makes intense use of Photoshop) I found that Aperture (and, apparently, OS X) cannot properly display a preview for a .psd file with either layers or an alpha channel. In some cases, the preview image is simply an error message, in others the alpha channel is displayed as black. These problems make Aperture a non-starter for me.
    Searching this forum for information, solutions, and/or workarounds, I found some references, but nothing of high value. (Sorry, posters.) Started my own investigation, and discovered some things that might lead to a reasonable workaround. My notes are here:
    http://homepage.mac.com/bbarlow641/webinfonotebook/
    too long, I think, to put into a forum post. Sorry to link out to somewhere else, but if you're interested, it's worth a click. (Or the linked page may not have "high value" either. But it helped me to think through the problem.)
    Ben

    bbarlow641 wrote:
    Saving the file as a layered TIFF file would preserve the layers - that might be a good idea since Aperture doesn't recognize psb files. But any "saving as" step - as a psb or as a TIFF - creates a second (large) file, so I don't think it's an ideal solution.
    I don't know if that helps in your workflow, but the way I handle this is:
    • import the raw file into Aperture
    • open in external editor (i.e. PhotoShop; external editor format: tiff)
    • edit in PhotoShop
    • when saving I am asked if I want to save it as layered tiff (provided the preferences are set accordingly: File Handling / Ask before saving layered tiff files);
    • here two things are to be considered:
    _ the file extension used by PS is "tif", so it has to be changed to "tiff"
    _ on my MacBook Pro the Save As-dialog opens showing the correct file location (i.e., the correct subfolder inside the Aperture library), on my Mac Pro the initial location is somewhere else (remembered from the last saving procedure); I have to work around this by first command-clicking in the image window's title bar to open the edited file's location in the Finder, so that I can then drag it onto the Save As-dialog. This is actually slightly annoying, but I did not find out the reason so far.
    • Aperture automatically refreshes the saved file.
    This way I end up with just this one extra file. The whole procedure would be a bit simpler using referenced files instead of storing them in the library.
    My settings in PS do have the "Maximize Compatibility" option set (in the notebooked example, it's set to "ask", normally it's set to "always"). I'm using CS2. Maybe this setting works in CS3 to create the composite? I've heard several people here say that same thing, but it definitely doesn't do it for me...
    For me this works, and as far as I remember also worked in CS2; do you see a difference in file size between files saved both ways? How does Preview.app display the file saved with "Maximize Compatibility"?
    Since my first post, I've been trying to figure out how to add a PS action that would run an Applescript to tell GraphicConverter to open and close a file, creating a preview. But it seems that while an Applescript can trigger a Postscript action, the reverse (having a Postscript action trigger an Applescript) is not possible.
    Might something like a hot folder with an automator scripts attached to it be a possible workaround?
    Message was edited by: Bernhard Barkow

  • I need to mask video, and maintain the alpha channel for the masked video!

    I wanted to know how to mask video in Final Cut Pro 6, I am sure there are options to do so, can someone please help me with getting started. I want to be able to mask video and maintain an alpha channel.
    Thanks in advance,
    Sebastian

    Did you get anything to show up on the tv?  If you got a aura wallpaper then it's working.
    If you did then it's in extended desktop mode or a logical extension of the desktop to the right.  Drage the player off the right side of the screen to the right and it will appear on the TV.
    All the options are in System Preferences > Displays > Arrangement tab.

  • I need a script to replace layers. PS CS5

    Ok, let's say I need to replace layer (x) with layer (y), of course, Layer (y) is not in the composition.
    (NOTE: layer (y) is a Vector Smart Layer while layer (x) is a regular layer named "Layer 4")
    And yes each Layer (x) is named "Layer 4"
    The Problem is ... There are 59 of layer (x) in the composition, and I need to replace each and everyone with layer (y)!
    I would do it manually although it's time consuming, but there's also the problem that the PC slows down as I open the composition because it is 732MB and 900+ Layers, So I figured out the best way to do it is with a script, But unfortunately I have no idea how to type a script and when I googled it, I found 1 Script that can do so but it did not really work!

    Scripting is programming requires knowledge there is a Photoshop Scripting forum you can ask for help with your found script. They user there may help you modify it to work the way you want it to work if the script was not save in binary. However without some programming knowledge it may be a hard thing for you to do.

  • HELP! Need a script for renaming layers

    Hi-
    I've got an Illustrator CS6 document that has 500+ layers with individual words on them (a word cloud).  I'm needing to animate this in AE.  When I "Release to Layers (Sequence)", all of the layers become Layer 1, Layer 2, etc.  Is there a script that will rename all of those layers to be the text inside them? 
    i.e. Layer 1 has the word "Pencil" as a sub-layer, editable text.. I need to rename the Top-Layer Layer 1 to "Pencil".  I'm hoping there is a script that can do this so I don't have to manually rename all of the layers.
    I have found this script:
    var idoc = app.activeDocument;
    var ilayer = idoc.activeLayer;
    for (i=0; i<ilayer.layers.length; i++) {
        var isublayer = ilayer.layers[i];
        isublayer.name = isublayer.pageItems[0].name;
    But is doesn't seem to do what I need.
    Any help would be greatly appreciated!
    Thanks,
    -Mark

    Hi Carlos-
    Here is part of my layers pannel before Releasing to Layers:
    Here is part of my layers pannel after Releasing to Layers:
    So I want Layer 6 to be "Hideaway Backpack Straps" without having to rename it manually.
    Any help would be great!
    Thanks
    Mark

  • Need immediately script for Restore Datafiles from TAPE  Please.

    Hi All,
    Could you please provide me the script to restore 10 datafiles using RMAN which are stored on tape.

    Hi!
    1. Restore the whole database:
    run {
    allocate channel t1 type "sbt_tape" parms 'ENV=(TDPO_OPTFILE=/path/to/your/client/tdpo_file)';
    restore database;
    release channel t1;
    2. Restore a tablespace: (In the Example the USERS tablespace will be restored)
    run {
    allocate channel t1 type "sbt_tape" parms 'ENV=(TDPO_OPTFILE=/path/to/your/client/tdpo_file)';
    restore tablespace users;
    release channel t1;
    3. Restore a datafile: (In the example teh datafile number 5 will be restored)
    run {
    allocate channel t1 type "sbt_tape" parms 'ENV=(TDPO_OPTFILE=/path/to/your/client/tdpo_file)';
    restore datafile 5;
    release channel t1;
    In the above examples:
    - you need to change the location of your TDPO config file.
    - the database/tablespace/datafile will be only restored and not will be recovered
    Best Regards
    Norbert

  • One script to make multiple cells call one function or vice versa

    Please help.
    I need one script to make multiple cells reference one function or one cell reference multiple functions.
    Goal: On the enter event of cell c1, I want to make cells (this, Header.c1, Example.c1, rLabel) highlighted, and this would be for every other cell that is entered into, their corresponding column header and row header will be highlighted.
    I've tried combining cells: eg
    colourControls.hdfieldLoseFocus(this, HeaderRow.c1, Example.c1, rLabel);
    and I've also tried combining some scripts in the function:
    fieldObj.ui.oneOfChild.border.fill.color.value = "255,255,200";
      HeaderRow.fieldObj.ui.oneOfChild.border.fill.color.value = "255,255,200";
      ExampleRow.fieldObj.ui.oneOfChild.border.fill.color.value = "255,255,200";
    But they dont work. See the link to my form.
    http://www.winstonanddavid.com/example.com
    I tried testing the function with the cell 'c1' but it doesnt work.
    Also, I want to get rid of the multiple lines of script in every other cell.
    How can I do this?

    I played around with the ExtendScript Toolkit and cutted and pasted the previous script from here until I managed to get a script that actually works like I was thinking. I then added a code from the CS4 Reference Manual to move Layer1 to the top (just to see if it worked).
    I have no idea yet if the the code includes something that does not belong, but at least I get no errors. The current code is like this now:
    //Apply to myDoc the active document
    var layerName = LayerOrderType;
    var myDoc = app.activeDocument;
    //define first character and how many layers do you need
    var layerName
    var numberOfLayers=0;
    //Create the layers
    for(var i=0; i<=numberOfLayers; i++)
    { var layerName = "Background";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = "Picture";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = "Text";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = "Guides";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    // Moves the bottom layer to become the topmost layer
    if (documents.length > 0) {
    countOfLayers = activeDocument.layers.length;
    if (countOfLayers > 1) {
    bottomLayer = activeDocument.layers[countOfLayers-1];
    bottomLayer.zOrder(ZOrderMethod.BRINGTOFRONT);
    else {
    alert("The active document only has only 1 layer")

  • How can make byteArray from swf

    Hi all,
    i need to make byteArray from swf and save it into DB, because i need load the swf(in byteArray) to adobe air with URLLoader and loadBytes(). But I do not know how can i convert swf to byteArray, is it possible with php, or i need as3 script, which make byteArray...
    thanks for help!

    I don't know if you better post this in the Adobe AIR forum?

  • Photoshop CS6 using javaScript to truncate alpha channel name

    Hello,
    I'm a production artist and I work with PSD files that were created in Adobe Scene7 Image Authoring Tool. These PSDs contain a background layer along with 1-20 alpha channels. My script has to make a new blank layer for every alpha channel in the document. Then it fills the new layer with light gray. So far, my code accomplishes this. However, I'd like to apply the name of the alpha channel to the layer, but I need the name to be truncated. Every alpha channel starts with one or more characters followed by a backslash and then finishes with one or more characters. Here's an example:
    An alpha channel might be named:  Floor\floor
    In this example I need my layer name to be just:  floor. This means all character to the left of the backslash, including the backslash itself needs to be discarded. I was using the subSring() statement to do this. When I try to step through the code, line by line in ExtendScript, I immediately get an error that says Unterminated String Constant and Line 31 of my code is highlighted. I suspect it doesn't like the way I wrote the backslash character, although I surrounded it in double quotes to define it as a string.
    Can anyone tell me why I'm getting this error?
    Below is my code with lots of comments to walk you through the process. I wrote where the error occurs in red type.
    I'm new to JavaScript so I'm not sure my while loop is accurate.
    #target photoshop
    // The #target photoshop makes the script run in PS.
    // declare variable to contain the active document
    var myDoc=app.activeDocument;
    // declare variable to contain the number of alpha channels, excluding the RGB channels
    var alphaChan = myDoc.channels.length - 3;
    alert(alphaChan + " alpha channels exist");
    // create loop to make new layers based on number of alpha channels, fill layer with gray and apply alpha channel name to new layer
    for (a=0 ; a<alphaChan ; a+=1){
    // make new blank layer
    myDoc.artLayers.add();
    // fill blank layer with gray
    var color = new SolidColor();
    color.rgb.red = 161;
    color.rgb.green = 161;
    color.rgb.blue= 161;
    myDoc.selection.fill(color);
    //variable stores alpha channel name
    var alphaName = myDoc.channels[3+a];
    // variable stores lenght of alpha channel name
    var lz = alphaName.length;
    // declare index variable to initialize position of 1st  character of alpha channel name
    var x= 0 ;
    // truncate alpha channel name by removing all characters preceding the "\" symbol
    while (alphaName.subString(x) != "\"){          (ExtendScript gives an error for this line and highlights the backslash and surrounding quotation marks)
        alphaName = alphaName.subString((x+1),z);
        x+=1;
        z-=1;
    return alphaName;
    // remove the backslash from alpha channel name
    alphaName = alphaName.subString((x+1),z);
    //  apply truncated alpha channel name to corresponding layer
    myDoc.artLayers[a].name = alphaName;

    while (alphaName.subString(x) != "\"){ 
    should be
    while (alphaName.subString(x) != "\\"){ 

  • (CC) Save all Layer Masks as Alpha Channels

    Hello,
    I've looked everywhere and can't seem to find a script to do this. I am looking for a script to simply check every layer for a layer mask and if there is one, save it as an alpha channel. The layers may or may not be in groups. No need to delete the masks, just save them as alpha channels. I have a lot of images with a lot of masks and it's a pain trying to save them manually! I thought this would be pretty easy but from what I've been reading this might be a little over my head. I would really appreciate any assistance!
    Thank you in advance,
    Danny

    Any such script would fail with a error once it tried to exceed Photoshop 53 Alpha Channel limit.  If a document had 53 alpha channels to begin with the script would fail saving the first alpha channel it would try to save.  I know this for a have a script that tries to create my kind of collage template PSD files that has no Image layers but has alpha channels to map the locations where images will be populated.  I had to program the script to catch that there were more the 53 prototype image layers.
    IMO with the exception of the background layer all layers have Alpha Channel its actual pixel map. This invisible Alpha channel maps the layers actual pixels locations and is used in conjunction with any enable layer masks when pixels are rendered for the layer.  What I was trying to do was to create a collage template that had Alpha channel to map the locations of where Image would be placed. . I would open a document the size and resolution I wanted the collage to have. Then add an empty layer the use a selection tool to make a 4"x6" selection and fill with pixels..  Duplcate that layer for as many image I wanted. And I would position the layer where I want the image to be located.  I would then  run the script.  It would save Alpha channels for each image location and at the end flatten the layer image prototype stack to stamp the image locations onto the required background layer.  Once I reached 54 image layers  the script failed and I realized that my Collage Scripts and templates were limited to a maximum of 53 images.

  • Photoshop file to Shake -- alpha channel question

    I've been staring at my screen for an hour wondering about this, even though I know it must be simple, so any advice is greatly appreciated:
    I have a short video clip of a syringe with no needle. I want to add a VFX "needle" as a composite in Shake. I drew the needle as a .tiff file in Photoshop. I added an alpha channel in Photoshop, so I have R,G,B,A channels in my .tiff file drawing. The alpha channel has a white shape that corresponds to the needle drawing and black for the background. I was thinking that my alpha channel will mask out everything except the Photoshop "needle."
    I bring the Photoshop needle file into Shake and set up my Shake script as follows: "Needle" into the left hand input of an Over node and Syringe video into the right-hand input of the Over node.
    I was expecting to get just the needle "floating" on top of the syringe video clip, and I would position it to connect up with the syringe. What I got was the "needle" with its square white background floating on top of the syringe clip. My alpha channel from Photoshop did not mask out the white background.
    But when I load the needle into the viewer by itself and put my cursor over it and hit the "A" key, the alpha channel is plainly there -- a white area in the shape of the needle and black everywhere else.
    Also, in the Node View window, when I put the cursor over the needle and hit the "A" key, the thumbnail clearly shows the alpha channel, a white area in the shape of a needle and black everywhere else.
    But when I load the Over node into the viewer, the needle is surrounded by a white background. Does it work to build your mask in Photoshop and bring it into Shake? Is there a parameter in Shake that you have to set to make the Photoshop alpha channel active?
    Jim

    Thanks much, Zebulun. Toggling premultiply worked. In a side experiment, I later saved my Photoshop image as a .psd file rather than .tiff and when I brought that one into Shake, it came in with its clipping-path/mask working without using premultiply in the Over node. Not sure what the difference would be in how Shake treats the two file formats, but they both achieve the same end result.

  • Automation: Howto swap two areas in one Alpha Channel

    Dear Forum members,
    another question. I have an Image with some alpha channels. In my automation plugin i need to exchange two areas in one alpha channel. At the moment i'm trying to cut one area, move the other area to the place of the first and then paste the first area at the location of the second one. Is this the optimum way of doing? Or is there something smarter / faster ?
    Regards, Christof

    For the moment (because i'm too lazy to extend my hidden plugin right now) i've realized it from the automation plugin without any additional channels: Cut area 1, move area 2 to area 1, paste area 1 at the position of area 2. This should also be pretty fast, because Photoshop is doing all the work for me.

  • I am trying to figure out alpha channel, embedded in a .tiff?

    I was told I could use the alpha channel to mask off rivers, lakes  etc... on a satellite image of the ground. I need these selected areas to be black, whereas the rest could be white or transparent, but only on the alpha channel. (it makes my selected scenery area transparent so the water can seen through) then I suppose this can be saved all together with the original full color image as a tiff? or even .bmp would be fine. this is photo scenery for a flight simulator.   so if I can get this image correctly it will be compiled into a .bgl
    thanks anyone!!!?

    Hello, thanks for the point in the flightsim direction, and I have already mastered that method, which is very slow and I can only successfully work with very small areas at a time. Im using another method, very similar but I can get larger areas at once. but to compile in this program the final (.bmp or .tiff or whatever format) needs to have the water as an alpha channel in it. or so ive read. but there is very little about how to do that on the web. Ive even been to adobe's chat help 5 times now and haven't gotten 1 straight answer form anyone, in fact they all closed the window on me early with no explaination. I can create a watermask via layer as cut, and use it that way, but I am trying to figure out how to embed the watermask in a .tiff

  • Alpha channel for targa files in Elements 4?

    I've created a .psd, and I need it to be in the tga format, with an alpha channel. No option is provided to save an alpha channel. I've tried everything I can think of, including following the instructions here: http://www.adobe.com/support/downloads/detail.jsp?ftpID=1544
    I spent quite a bit of money for this program, but now I'm about to uninstall it, and put on an old copy of Photoshop 5.5. It's almost 1:00 AM, and I've got to get this done tonight.
    Why on earth did they break the format??? How about, um, letting the USER decide how to save transparency? Like with a checkbox or a dropdown? Duh. Gads. Yeesh. *sob*

    Barbara and Terri,
    Thanks so much for your comments!
    So, one solution is to select the whole image, and save the selection as a .TGA? That sounds like a workaround for a bug, which is fine with me. I'll try that out tonight.
    I was able to generate my .TGA last night by downloading and installing a free program, called "gimp". I loaded the .PSD in it, then saved it as .TGA, and it worked perfectly, first time. No contortions required. Maybe if they open-source photoshop, bugs like this can be fixed.
    We'll see if Second Life (the program I'm needing the file for) will recognize the alpha channel.

Maybe you are looking for

  • Webcams for Toshiba TV's

    What web cam (Toshiba preferably) is compatible with Toshiba TV 50L7300U - thanks?

  • AP Cheque Run - Sort Alphabetically

    Hello everyone, We are in the process of completing our user acceptance testing for E-Business R12.1.1. One issue is the ability to sort the cheque run in alphabetical format. At the moment, they are sorted in ascending order by cheque number. How do

  • Document open all way across desktop instead of where saved.

    What are the steps when the document that normally opens in the area you saved it on on the desktop, suddenly starts opening the entire way across the desktop including behind the columns of tool bars and links and pages, etc. and where you had saved

  • Can I transfer my CS5 files from my Windows 7 computer to my Mac Yosemite computer and have them work with CS6 for Mac?

    I am using Dreamweaver CS5 on a Windows 7 laptop.  I would like to change to Dreamweaver CS6 on my Mac running Yosemite.  Can I transfer my CS5 files from the  Windows computer to the Mac and will CS6 be able to work those files on the Mac?  I do not

  • Replacing my 2 week old Macbook Pro.

    i've had my MacBook Pro for about 2 weeks now within the first week i noticed problems with my display, well lid. it has bubbles on the top of the lid, the edge of the screen is popped out, and the lid won't close evenly now, if i go to an Apple Stor