Layer.translate() making layer disappear

Hi,
Experienced a strange problem trying to move layers with layer.translate(). I had a pretty peculiar case of a bunch of 1px tall and 400px wide dividers as simple artLayers stacked on top of each other. Then I tried to move them vertically to even spacing, i.e. move first one 10px, second 20px, etc. However what happened is that seemingly randomly some layers disappeared after the translate()-operation. When layer disappeared, layer.bounds was correctly [0, 0, 400, 1] before operation, and [0, 0, 0, 0] after operation ie. the pixels really seemed to disappear. I also tried making sure there is no selection and setting the layer as selected before moving, but same results.
What helped was making the height bigger, e.g. adding an almost invisible dropshadow. It's like Photoshop CS6 would make a rounding error in bounds calculation and decide it became empty. Anyone with similar experience, workarounds?
Matias

You are aware that the lines will all end up atop one another with those settings?
The AM code seems to provide a different result from the DOM code in that the Layers have proper bounds.
#target photoshop
var HEIGHT = 5
app.preferences.rulerUnits = Units.PIXELS
var doc = app.activeDocument
for (var i=0; i < doc.artLayers.length; i++) {
    var layer = doc.artLayers[i]
    doc.activeLayer = layer
    doc.resizeCanvas (doc.width, doc.height + HEIGHT, AnchorPosition.BOTTOMCENTER)
//    layer.translate(0, -HEIGHT);
    moveLayer (0, -HEIGHT);
function moveLayer (theX, theY) {
// =======================================================
var idmove = charIDToTypeID( "move" );
    var desc3 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref2 = new ActionReference();
        var idLyr = charIDToTypeID( "Lyr " );
        var idOrdn = charIDToTypeID( "Ordn" );
        var idTrgt = charIDToTypeID( "Trgt" );
        ref2.putEnumerated( idLyr, idOrdn, idTrgt );
    desc3.putReference( idnull, ref2 );
    var idT = charIDToTypeID( "T   " );
        var desc4 = new ActionDescriptor();
        var idHrzn = charIDToTypeID( "Hrzn" );
        var idPxl = charIDToTypeID( "#Pxl" );
        desc4.putUnitDouble( idHrzn, idPxl, theX );
        var idVrtc = charIDToTypeID( "Vrtc" );
        var idPxl = charIDToTypeID( "#Pxl" );
        desc4.putUnitDouble( idVrtc, idPxl, theY );
    var idOfst = charIDToTypeID( "Ofst" );
    desc3.putObject( idT, idOfst, desc4 );
executeAction( idmove, desc3, DialogModes.NO );

Similar Messages

  • Adobe Premiere Pro Video editing layer disappeared

    I was working with Adobe Premiere Pro and then the video editing layer disappeared, it left me with Audio editing layer tho.

    Try dragging down this line:

  • HDR Pro Merge dialog box does not appear. The layer disappear. What are the solutions?

    HDR Pro Merge dialog box does not appear.
    The layer disappear. What are the solutions?

    Hi Noel,
    Actually, I just checked my scratch disk available space and it says ot is over 1.7 TB!!  I am only using the C drive as my scratch drive, as that is my only drive.  Anyway, I appreciate your help! Still will not function properly.  Maybe I should try reinstalling Photoshop.
    Cheers,
    Russ

  • Translation Problem – Region Disappearing

    Translation Problem – Region Disappearing
    I recently started working on translating my application to German. When I apply my xlif file I have a problem with the contents of all my report regions using Vertical Report Look 2 disappear.
    The report region is still visible, however the report contents (corresponding to the report template) have completely disappeared.
    When I switch back to English (setting FSP_LANGUAGE_PREFERANCE) the report contents are once again visible.
    I am using theme 7.
    Thanks in advance.
    -Immanuel

    Hi Joel,
    Dont worry about that last request, i have already fixed the problem.
    If anyone else has this problem they can fix it by creating a custom report template with the following code:
    Report template Before Rows:
    <table summary="Vertical" class="t7vertical3" align="center" border="0" cellspacing="0" cellpadding="0">
    Include the following in your Theme.css (or theme_V2.csss in the case of theme 7):
    table.t7vertical3 {border:0px #bbbbbb solid;border-collapse:collapse;background:#ffffff;font-size:8pt;}
    table.t7vertical3 tr {border-top:1px;}
    table.t7vertical3 td.L{font-weight:bold;vertical-align:top;padding:2px;white-space:nowrap;width:30%;text-align:right;border:0px #bbbbbb solid;background:#999999;color:#ffffff;border:1px #bbbbbb solid;}
    table.t7vertical3 td{padding:2px;border:1px #bbbbbb solid;text-align:left;}
    Cheers,
    Immanuel

  • Making .SWFs disappear in replacement for other ones

    Oooh boy, I feel embarrased coming back here again but...
    I was able to get my previous problem sorted out, by doing this:
    on (Release) {
    loadMovieNum("swfs/epictrance.swf",25);
    I feel stupid. But now that I have constructed my swf, and have editted the position, I have to ask, is there like a ._visible=false code for foreign .swfs or something? How does one go about making it so choosing another button will remove that .swf, and change it to another. It was bad enough that I was only able to find one guide to importing swfs the way I needed, I doubt there will be one for making them disappear.
    Previous discussion:
    http://forums.adobe.com/message/5150720#5150720

    As I said, you need to learn to use the help documents.  Your other response indicated nothing was found... that only indicates you still need to learn how to use them because they contain all of the information you have been asking for.
    If you are using loadMovieNum() to load the movie, the compliment for it to unload a movie is unloadMovieNum(). 
    You should be cautious in using that particular loading function though, especially in picking a seemingly arbitrary value for the "Num"... you could be replacing some other content that lives at that level that you don't want to remove.  Sticking with loadMovie will be safer... you just need to find the info for using it.
    Also, if you are just starting out coding with Flash, you should break the habit of putting code on objects like you show. Instead, assign instance names to the objects and keep the code in the timeline.  If you were to name the button "loadBtn", then the timeline version of its code would be....
    loadBtn.onRelease = function(){
         loadMovieNum("swfs/epictrance.swf",25);

  • Unselecting checkbox not making answer disappear

    Hi all
    I almost have this bit of code working how i want it too, but just have one query. i would just like to set it up so that if a user unchecks the checkbox the answer disappears, at the momment the answer does disappear if you check another checkbox, which is fine, but if a user unselects a checkbox, so there are no checkboxes selected then there should be no answer being shown.
    Hope this makes sense and that someone can help
    Thanks
    See code below
    checkBox1a.selected = false;
    ans1 = 0;
    var checkboxListener:Object = new Object();
    checkboxListener.click = function(evt_obj:Object) {
    if (evt_obj.target.selected) {
      //evt_obj.target.label = "Selected!";
      checkBox1b.selected = false;
      checkBox1c.selected = false;
      checkbox1d.selected = false;
      ans1 = 0;
      trace(ans1);
      txtOutput.text="No it's the wrong Answer!";
    } else {
      //evt_obj.target.label = "Unselected!";
      ans1 = 0;
      trace(ans1);
    checkBox1a.addEventListener("click", checkboxListener);
    checkBox1b.selected = false;
    ans1 = 0;
    var checkboxListener:Object = new Object();
    checkboxListener.click = function(evt_obj:Object) {
    if (evt_obj.target.selected) {
      checkBox1a.selected = false;
      checkBox1c.selected = false;
      checkbox1d.selected = false;
      //evt_obj.target.label = "Selected!";
      ans1 = 1;
      trace(ans1);
      txtOutput.text="Brilliant You got the Right Answer!";
    } else {
      //evt_obj.target.label = "Unselected!";
      ans1 = 0;
      trace(ans1);
    checkBox1b.addEventListener("click", checkboxListener);

    You are creating/duplicating code that won't work for you.  You can only have one listener by that variable name, and you can combine the listener functions into one... the following would replace all of your code.
    checkBox1a.selected = false;
    ans1 = 0;
    var checkboxListener:Object = new Object();
    checkboxListener.click = function(evt_obj:Object) {
    if (evt_obj.target.selected) {
      checkBox1a.selected = false;
      checkBox1b.selected = false;
      checkBox1c.selected = false;
      checkBox1d.selected = false;
      evt_obj.target.selected = true;
      if(evt_obj.target != checkBox1b){
         txtOutput.text="No it's the wrong Answer!";
         ans1 = 0;
      } else {
         txtOutput.text="Brilliant You got the Right Answer!";  
         ans1 = 1;
    } else {
      ans1 = 0;
    // here is where you will do whatever you are calling "making answer disappear"
    checkBox1a.addEventListener("click", checkboxListener);
    checkBox1b.addEventListener("click", checkboxListener);
    checkBox1c.addEventListener("click", checkboxListener);
    checkBox1d.addEventListener("click", checkboxListener);

  • Layer disappear when using blur gallery

    The same thing happens on all three blur gallery effects (field blur, iris blur, tilt shift). Once I pick the filter the layer becomes empty. The strange thing is that when I manipulate any of the controls the object appears, but once I stop holding the mousebutton down on the input. The object disappears again. When i apply the settings (enter or the ok buttoon). The layer is empty. WTF?!?
    I have used these filters a lot, this just happend suddenly. And I can't fix it. Restart does not help.
    Adobe Photoshop CS6 running on MacBook Pro 2.3 GHz i7, osx 10.8.3.

    You are probably right about the video card, because a full restart of the computer solved the problem. 
    Ola
    On Tue, Jun 4, 2013 at 12:11 AM, Chris Cox <[email protected]

  • Move Tool makes the layer disappear

    I'm having so many problems with CS5 bugs...so here's another one.
    If I try to move a layer, sometimes it will completely disappear. This is usually right after I have pasted something but it can also happen with type.
    If the layer is Type, I can select the type and find that it's moved off into Siberia (off the page) and I can then bring it back.
    If it's bitmap, I can't find the thing again and have to delete the layer and repaste.
    Any clue what's up or how to fix it?

    In Photoshop, Edit - Preferences - Peformance, look for the [  ] Enable OpenGL Drawing setting.  Disable and restart Photoshop to test.
    I haven't used a touchscreen, but I can imagine the driver that's intended to interpret touches to move things around could interfere with normal mouse operations.
    Also, one other thing that's very basic but worth checking:  If your mouse is wireless check the batteries.  Also try a different mouse.  Physical mouse problems could possibly be a factor.
    Just a comment about what you mentioned in the original post:  Photoshop doesn't really seem buggy when the system its being run on is solid.  It's a very demanding application, and it can seem as though it's faulty when some of the complex things it relies upon - such as the OpenGL implementation on your GPU - are actually at the root cause.
    -Noel

  • 3D layer disappears in After Effects CS6

    When I turn a layer into a 3D layer it disappears.  If i turn draft 3D on it will reappear, or if I preComp it will reappear. continuous rasterize is not on so its not that.  Active camera is set in preview window, so its not front view thing.
    this is driving me nuts ... any help is welcome.

    1. Make sure you are looking at the Active Camera.
    2. If that doesn't fix the problem tell us more about your comp and post a screenshot with all layers showing and the u key pressed twice to show us anything you have changed in the layer properties.

  • Layer disappeared from timeline

    I'm creating some banners with Edge Animate for the first time.
    I started with the biggest one, now I need to create some more downscaled versions.
    Clearly the easiest and fastes way is to duplicate the edge project and modify the layers size position etc...
    Duplicating the project folder and changing the file name didn't work for me (gave error "edge can't read the html file"), so I managed to do it with "save as" and changing the "project1.an" name to a new one in a clean folder. When opened, Edge creates all the assets referencing the new name.
    Everything  ok until here, but then I noticed that the top layer "link" (it was a hidden clickable div with the banner link) has disappeared from timeline, but it's still present in the "elements" tab.
    The link was still working, then after a couple of cmd+return it disappeared also from the stage.
    I created a new rectangular div with the tool, but the new one is also not present in the timeline but only in the "elements" tab.
    Now I'm worried that this could cause problems on publishing or future edits. Am I doing something wrong?
    Thanks for your help.

    Never mind, after this post I already found the answer.
    I had checked without noticing the button at the bottom of timeline "Only Show Animated Elements".
    Unchecking all the layers were there.
    Hope this can help if anyone has accidentally the same problem!

  • Form layer disappears when I zoom in (mouse scroll...not actually changing anything)

    Beginning a brand new comp...using solid black layer and camera...apply Trapcode Form to solid layer. It appears. When I try to blow the comp up (just scrolling in with the mouse wheel to make it bigger), it disappears. No setting other than default. Cannot see form layer unless I zoom back out. Just plain annoying, since I can only see it when I am zoomed waaaaaay out (and therefore cannot see what I am editing).

    Screenshots, comp settings, settings in Form, computer specs, AE version used. We need a lot more info.
    Mylenium

  • Layer disappear

    I am facing some problem while using wizard and layers. There are 2 layers and each has a graph and a table in it. What I want to do is that when the user presses a button in one layer, the contents of that layer should disappear and the contents of new layer appear. Currently, when I press the button, the contents of the new layer appear but the contents of the old layer do not disppear. Can anyone please guide me on how to do this?

    Hi,
    Link the two layers  and name the event with a name.
    And in the properties of the pushbutton under "Action" tab select customer action and specify the name of that event.

  • A layer disappears whenever I change another layer

    Hello wise Photoshop helpers!
    One of my layers continues to disappear whenever I change another layer in my file, no matter what I do to the other layers.
    If I try to erase something on another layer the one disappears.
    I also cannot locate where this illusive layer is because it never goes away when I hit the Eye to make my layers disappear or appear. It only disappears when I change something on the doc
    (i.e. type, paint, order of layers, etc.)
    When I save and restart, the layer is back but if I try to continue editing, it goes away again.
    I need to get this done but it's very difficult without all of may layers being visible so I feel as if I'm working in the dark. :/ Please help!
    Thank you!
    ~Kelly

    Thank you so much for responding!
    I have three adjustment layers that have a little chain next to them on the layers panel that i assume would mean they are linked. To what though, i am not quite sure.
    When I say "disapear" I mean it disapears from view on the actual image. I cannot find where this layer is located on the layers panel. When I make all my layers not visible with the visibility being turned off, It still remains, and there are no layers visible on the layers panel but I can see it on the image itself.
    Then if I edit the doc in anyway other than visibility, then the layer disapears from view on the actual image.
    Also, once I save and restart Photoshop, it always comes back. I could continue working without the layer but then I will have to continue to restart photoshop to see how it looks all together with the disapearing layer. lol
    Thank you so much for any help you can provide!
    -Kelly

  • Renaming layer disappears (Bug Report)

    Renaming layer in the timeline may disappear on you.
    This video shows you how to work around it.
    However, this is a bug that needs to be addressed.
    Wayne Barron
    Dark Effects Production

    On further testing I think the issue may not be directly related to layer masks at all.
    Basically the issue is that the Gradient tool colors don't update to the 'default foreground/background colors' in cases where it seems that they should.
    One example of such a case (as illustrated in the original post) is when the Gradient tool keeps the black/white color combo used for a layer mask in a previous document after switching to the current document where a non-masked layer is targeted and the default fg/bg colors have correctly reverted to white/white.
    Example:
    layer mask targeted in doc1 - notice synchronised Gradient and default fg/bg colors
    after switching to non-masked layer in doc2, Gradient is still black/white although default fg/bg colors have reverted appropriately to white/white
    Bug or not, it's something I wanted to point out as it seems inconsistent.

  • Cookie cutter image in new layer disappears

    I have a background graphic. To that I added a couple rectangles in separate laters, then text in more layers that went onto the rectangles. Afterward, I wanted an arrow shape. Easy enough.
    Click NEW LAYER
    Cookie Cutter
    Select the arrow type
    Drag it into the right shape
    Click the green checkmark to ok.
    Whamo, it disappears, both from the page and the layer palette.

    Here are the tools showing up on my screen:
    Move tool
    Zoom
    Hand
    Eyedropper
    Rectangular Marquee
    Lasso
    Magic Wand
    Quick Selection
    Horizontal Type
    Recompose
    Cookie Cutter
    Straighten
    Red Eye Removal
    Spot Healing Brush
    Clone Stamp
    Eraser
    Brush
    Smart Brush
    Paint Bucket
    I don't see either a Line Tool or Custom Shape Tool in that location. It must be elsewhere, or perhaps inside one of those listed?

Maybe you are looking for

  • Envy 5530 wont install on windows 8.1

    I bought an envy 5530 about a year ago and used it on my win7 desktop great.  I recently bought a win8.1 laptop and have been trying, in vane, to install this printer.  The os is 64bit on the laptop.  I even used the recommended full software solutio

  • Macbook or Macbook Pro?

    I'm in the market for a new notebook, and I don't know if I should get a macbook or macbook pro. I will be carrying this computer around school almost everyday, and using it mainly for word processing and web browsing. However, occasionally, I will b

  • Can't print a CD jewel case insert!!

    I have been trying for a long time to get a answer about itunes not being able to print a CD jewel case insert. I have spoken to many tech. support people. Some I have their names and call back numbers, which shows how much they been trying to help m

  • Steps for java apis and mdm

    Hi all , How we can work with JAVA APIs and MDM . Please tell step by step ways. thanks in advance. Thnks nm

  • Error 1714 the older version of Nokia...

    Hi, I have a N80 and the last PcSuite, the PcSuite work fine under bluetooth connection but don't work by USB, after erasing and reinstaling some times and running pcsuit cleaner, i try to install the Nokia Connectivity Cable driver and give me this