SONET which osi layer?

Hello world

I'm learning just on sonet. What OSI sonet layer is mapped with?

Thank you and have a nice day

Hi Sarah,.

It uses the layer 1 or we can say physical layer

http://compnetworking.about.com/od/hardwarenetworkgear/l/aa092800a.htm

hope this will help.

Thank you

Tags: Cisco Network

Similar Questions

  • Need a written conditional script which involves layer styles and pixelation. Possible payment may be negotiated.

    I am a freelance illustrator who uses extensively layer styles in my workflow.  As the pixelation and the implementation of a new layer style is constant and ongoing, I would like a way to rationalize the actions of 3-4 that I use currently in a single conditional script.  I am currently using CS6.  Here's the description detailed of how I want the script to run:

    (1) is the selected layer named "layer magic 1"?  Otherwise, go to the #2 line.  If Yes, go to the #8 line.

    (2) is the selected layer named "magic layer 2?  Otherwise, go to the #3 line.  If Yes, go to the #8 line.

    (3) is the selected layer named "layer Magic 3"?  Otherwise, go to the #4 line.  If Yes, go to the #8 line.

    (4) is the selected layer named "layer Magic 4?  Otherwise, go to line 5-7 bolt torque.  If Yes, go to the #8 line.

    (5) make the new layer.

    (6) new name "Layer1" layer magic

    (7) add the layer style (also nominated) "magical layer1.  Script concludes.

    (8) the layer is empty?  If Yes, go to the #9 line.  Otherwise, go to line 10-12 bolt torque.

    (9) queue dialog box: "the end of magic layers?  with the choice of the 'yes' or 'no '.

    • If "Yes" is selected, the layer is removed.  Script concludes.

    • If "no" is selected, the layer is kept (no change).  Script concludes.

    (10) rasterize layer.

    (11) rename the layer 'layer of paint '.

    (12) merge the layer down.  Go to the line of 5-7 bolt torque.

    I would prefer if possible javascript, because I will need for the script between my Mac desktop and my Windows Tablet of the Cintiq based on the port.  Any help would be greatly appreciated; It took me some time to try to learn the writing of scripts, but between labor day and the night in freelance, I managed only by creating extreme levels of frustration!  Laughing out loud!  PLEASE AND THANK YOU!

    Good guys, has been able to play a bit with what I learned between both of you and others and come to this:

    (1) function main() {}

    2)

    (3) var __indexOf = [] .indexOf | function (Item) {for (var i = 0, l = this.length; i)}< l;="" i++)="" {="" if="" (i="" in="" this="" &&="" this[i]="==" item)="" return="" i;="" }="" return="" -1;="">

    4)

    (5) var makeNewLayer = function() {}

    (6) var newLayer = doc.artLayers.add ();

    (7) newLayer.name = 'magic layer1.

    (8) newLayer.applyStyle('magic layer1');

    (9) doc.activeLayer = newLayer;

    10)            }

    11)

    (12) var doc = app.activeDocument;

    (13) lay = doc.activeLayer,

    (14) names = ['magic layer1',

    "(15) ' magical layer2.

    (16) ' magical layer3.

    ["(17) ' magic layer4"];

    18)

    (19) if (__indexOf.call (name, lay.name)< 0="" )="">

    (20) newLayer = doc.artLayers.add ();

    (21) makeNewLayer();

    (22) return;

    23)            }

    24)

    (25) if (doc.activeLayer.kind == LayerKind.NORMAL & doc.activeLayer.bounds [2] == 0 & doc.activeLayer.bounds [3] == 0) {}

    (26) var dialog = confirm (the ' magical sleep end? ");

    (27) if (dialogue) {}

    (28) app.activeDocument.activeLayer.remove ();

    29)                }

    (30) return;

    31)            }

    (32) var idrasterizeLayer = stringIDToTypeID ("rasterizeLayer");

    (33) var desc5 = new ActionDescriptor();

    (34) var idnull = charIDToTypeID ("null");

    (35) ref4 var = new ActionReference();

    (36) var idLyr = charIDToTypeID ("Lyr");

    (37) var idOrdn = charIDToTypeID ('Ordn');

    (38) var idTrgt = charIDToTypeID ("Trgt");

    (39) ref4.putEnumerated (idLyr, idOrdn, idTrgt);

    (40) desc5.putReference (idnull, ref4);

    (41) var idWhat = charIDToTypeID ('what');

    (42) var idrasterizeItem = stringIDToTypeID ("rasterizeItem");

    (43) var idlayerStyle = stringIDToTypeID ("layerStyle");

    (44) desc5.putEnumerated (idWhat, idrasterizeItem, idlayerStyle);

    (45) executeAction (idrasterizeLayer, desc5, DialogModes.NO);

    46)

    (47) doc.activeLayer.merge ();

    (48) doc.activeLayer.name = 'base paint layer;

    (49) makeNewLayer();

    (50) return;

    51)

    52)        }

    53)

    (54) main();

    I know it's a little ugly code lines 32-45, but (through other channels, thank you JJMack & c.pfaffenbichler!), I realized that there is no way to script, the rasterization of a "layer Style" others that using ScriptingListener.plugin.  DBarranca  Yes... I realized a little I "screwed the dog" on the diaper change after that I played with him for a while.  Also a little, visited account that the "new layer" you were a little enough to add was not going to solve my problem. ended up having to add a "new layer" on line 20.  Everything seems to work exactly as I intended at the moment.  I DO, however, like the idea of having an error message "cannot find the magic layer1 Style".  How would I want to add that in?

    Thanks again,

    -Eric P

  • The TCP 1 layer and Layer 2 Communication

    Hello

    I'm looking for possible ways to communicate on the layer 2 and layer OSI 1 (physical layer and layer of data binding).

    I have a this equipment with host interface is ethernet, this device works on OSI layer 1 or Layer 2 or we can say that working on the MAC layer communication device.

    Basically I want to exchage frames between the device and the host PC. If anyone has knowledge on this part please with me.

    The wincap dll using we can communicate on layer 1 and Layer 2

  • CC of PhotoShop will not play layer adjustment Actions properly

    My computer has CC PhotoShop installed on a Dell Windows 7 computer brand new. Previously, I used CS4 and it was working fine, but now I have problems with CC reading of any Action which a layer reported. I'm going to record an action consisting of edited such as curves, levels, brightness adjustment of the layer / who, etc., and then when I play back the adjustment of the applied layer is by default 0. For example, here I clicked on "Create new Action" and labeled "curves layer TEST":

    Untitled-2.jpg

    Add a new curves adjustment layer and the label "light":
    Untitled-3.jpg

    Then I add a few points of the curve (too thin to illustrate my question):

    Untitled-4.jpg

    Then, I hit the button to stop recording. But when I look at the values of the curve in the Actions area of the curve very layer I just recorded, it indicates the type of preset is default. Why didn't he tell Custom? The properties box read "Custom" I just change the curve!
    Untitled-5.jpg

    Anyway, I open my picture to juxtapose and play action liven up that I just created...

    Untitled-6.jpg

    and nothing happens to the image. Oh, he now has a curves on the top layer, but it is a straight line by default. What has become of the curve, I have edited and saved! ??

    Untitled-8.jpg

    What is the problem? This is the same process that I used in CS4, CS2 and every other incarnation of PhotoShop and it worked fine, until the CC. Is this a bug? Or is there a new process in the creation of adjustment layer?

    See if the libraries closing Panel, then by restarting photoshop makes a difference.

    Adjustment layer does not change recorded in action

    Photoshop CC: Apply a preset to a layer of setting using Actions does not work. (Mac)

  • Dealing with DRIVER_POWER_STATE_FAILURE BSOD

    After playing with some new display monitors, everything has been fine up until a few weeks ago, when I noticed that whenever I want to restart my computer, it would display the restart of the screen for about 10 minutes, then it would display a BSOD with the error being 'DRIVER_POWER_STATE_FAILURE.

    Fortunately, after it seems, the system will re-start very well on its own.

    Dump file:

    http://download1513.mediafire.com/7c4dcdr53qrg/hbru16n6y7i9vzo/040414-38796-01.dmp

    Any help and information on why this happens is greatly appreciated.

    -Ben

    Thank you very much!

    9F, {4, 12 c, fffffa8014fb35c0, fffff80402351810} error checking

    1 = 0x4

    2nd = 12 (time-out in seconds)

    Execute! locks to see what is happening:

    0: kd >! locks
    DUMP OF ALL RESOURCE OBJECTS *.
    KD: Scanning of locks which took place...

    Resource @ nt! IopDeviceTreeLock (0xfffff80400f47600) shared 1-wire owners
    Contention count = 12
    Discussions: fffffa8014fb35c0-01<*>
    KD: Scanning of locks which took place.

    Resource @ nt! PiEngineLock (0xfffff80400f47700) the exclusive property
    Contention count = 44
    NumberOfExclusiveWaiters = 1
    Discussions: fffffa8014fb35c0-01<*>
    Threads waiting on exclusive access:
    fffffa800ed20a00

    0: kd >! thread fffffa8014fb35c0
    WIRE Cid 0004.42f0 Teb fffffa8014fb35c0: 0000000000000000 Win32Thread: 0000000000000000 WAIT: (Executive) core criticism
    Mutant fffffa8009379db8 - owning thread fffffa8014516080
    The IRP list:
        fffffa8013c0d2c0: (0006, 03e8) flags: Mdl 00000000: 00000000
    Borrow not identity
    DeviceMap fffff8a00000c2e0
    Owning process fffffa8008499040 Image: System
    Joint process s/o Image: n/a
    Wait start TickCount 1036025 ticks: 19201 (0:00:05:00.015)
    Context switch count 302 IdealProcessor: 1 NoStackSwap
    Get_user_time 00:00:00.000
    KernelTime 00:00:00.000
    Win32 Start address nt! ExpWorkerThread (0xfffff80400d07160)
    Stack Init fffff880321b1c90 current fffff880321b1040
    Basic fffff880321b2000 limit fffff880321ac000 dial 0
    Priority 15 BasePriority 12 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5
    Child-SP RetAddr: Args to child: call Site
    fffff880 '321b 1080 fffff804' 00d0c7cb: fffffa80'00000001 00000000'00000000 00000000'00000001 00000000'00000000: nt! KiSwapContext + 0 x 76
    fffff880 '321b11c0 fffff804' 00d0b60f: 00000001' fffff880 '022f12e0 00000000' fffff804 00000000' 00000000 00ca 5412: nt! KiCommitThreadWait + 0x23b
    fffff880 '321b 1280 fffff880' 023b18dd: fffffa80'09379db8 fffff880 ' fffffa80 00000000' 11022100 00000000' 6f6d4400: nt! KeWaitForSingleObject + 0x1cf
    fffff880 '321b 1310 fffff880' 023b7ac5: fffffa80'09379 c 50 fffff880 '321b 1400 fffffa80' 137c0df0 00000000' 00000000: ndis! ndisUnbindProtocol + 0 x 95
    "fffff880 '321b 1430 fffff880' 023b943e: fffffa80 ' 11022101 fffffa80'1103 d 101 fffffa80 ' 110221a 0 fffffa80'1103 020 d: ndis! ndisCloseMiniportBindings + 0 x 225
    fffff880'321b14f0 fffff880'0239 c 940: fffffa80'110221 has 0 fffffa80 '110221-0 fffffa80' 13c0d2c0 fffffa80'11022050: ndis! ndisPnPRemoveDevice + 0x21e
    "fffff880 '321b 1680 fffff880' 0239c6f5: fffffa80 '110221-0 fffffa80 ' 11022050 fffff880' 321b 1760 fffffa80 ' 13c0d200: ndis! ndisPnPRemoveDeviceEx + 0 x 84
    fffff880 '321b16b0 fffff880' 023ab685: fffffa80'13c0d2c0 fffff880 '321b 1720 fffffa80' 110221a 0 00000000 00000000': ndis! ndisPnPIrpSurpriseRemoval + 0 x 109
    "fffff880 '321b16f0 fffff804' 0105b8f7: fffffa80'11022001 fffffa80 ' 11022050 00000000 00000001' fffff880 ' 009aa180: ndis! ndisPnPDispatch + 0x2ee49
    "fffff880'321 b 1750'01177 fffff804 39 d: 00000000 ' 00000017 fffff880 '321b 1819 fffffa80' 0ece6bd0 fffffa80 ' 1103fa10: nt! IopSynchronousCall + 0xc7
    "fffff880 '321b17c0 fffff804' 011775e6: fffff8a0 ' 173883 c 0 00000000'00000088 fffffa80 ' 1103fa10 00000000' 00000000: nt! IopRemoveDevice + 0xd9
    fffff880'321 b 1880'01177501 fffff804: fffffa80'0ece6bd0 00000000 00000000' fffff8a0 '05dbac01 fffff880' b 321, 1930: nt! PnpSurpriseRemoveLockedDeviceNode + 0xaa
    fffff880'321b18d0 fffff804'01177468: 00000000'00000000 00000000'00000000 fffff8a0 '05dbacd0 fffffa80' 0ece6bd0: nt! PnpDeleteLockedDeviceNode + 0x5d
    fffff880 '321b 1910 fffff804' 01176bcb: 00000000 00000000' fffff880 '321b1a70 fffff8a0' 06dfed00 00000000'00000003: nt! PnpDeleteLockedDeviceNodes + 0 x 98
    fffff880 '321b 1970 fffff804' 010062e5: fffff880'321b1b88 00000000 00000000' fffff8a0 ' 16893700 fffff8a0' 00000000: nt! PnpProcessQueryRemoveAndEject + 0x2c3
    fffff880'321b1ae0 fffff804'01069346: fffff8a0 173883 c 0 00000000'00000000 00000000'00000001 00000580'00000000: nt! PnpProcessTargetDeviceEvent + 0x9d
    "fffff880 '321b1b20 fffff804' 00d072a1: fffffa80 '14fb35c0 fffff8a0' 06dfed00 fffff804 ' c 0106905 fffffa80 ' 14126ca 0: nt! PnpDeviceEventWorker + 0x2ea
    fffff880 '321b1b80 fffff804' 00c9bfd9: fffffa80 ' 14a3e630 00000000'00000080 fffff804'00 d 07160 fffffa80 ' 14fb35c0: nt! ExpWorkerThread + 0 x 142
    fffff880 '321b1c10 fffff804' 00d507e6: fffff880'009aa180 fffffa80 '14fb35c0 fffffa80' 08495b 00 fffffa80'08499040: nt! PspSystemThreadStartup + 0 x 59
    fffff880'321b1c60 00000000' 00000000: fffff880 '321b 2000 fffff880' 321ac000 00000000'00000000 00000000'00000000: nt! KiStartSystemThread + 0x16

    We have a list of the IORP and a bit of a more informative text in the stack. We can see some NDIS calls, so this may indicate that we are dealing with something of associated network. The driver Interface specification NDIS (Network) is an application programming interface (API) for network (NIC) interface cards. The NDIS form the logical link control sublayer (LLC), which is the top layer of the OSI (Layer 2) data link layer. Therefore, the NDIS acting as interface between the sublayer Media Access Control (MAC), which is the bottom layer of the data link layer, and the network layer (Layer 3).

    The NDIS is a library of functions often referred to as a "wrapper" that hides the underlying complexity of the NIC hardware and serves as a standard interface for pilots of level 3 network protocol and at the hardware level MAC drivers. Another common LLC is the Data-Link Interface ODI (Open).

    Let's go and take a look at the IRP in the discussion thread:

    0: kd >! fffffa8013c0d2c0 PRI 7
    IRP is active with 3 batteries 3 is current (= 0xfffffa8013c0d420)
    No Mdl: No system buffer only: thread fffffa8014fb35c0: Irp stack trace.
    Flags = 00000000
    ThreadListEntry.Flink = fffffa8014fb3990
    ThreadListEntry.Blink = fffffa8014fb3990
    IoStatus.Status = 00000000
    IoStatus.Information = 00000000
    RequestorMode = 00000000
    Cancel = 00
    CancelIrql = 0
    ApcEnvironment = 00
    UserIosb = fffff880321b1780
    UserEvent = fffff880321b1790
    Overlay.AsynchronousParameters.UserApcRoutine = 00000000
    Overlay.AsynchronousParameters.UserApcContext = 00000000
    Overlay.AllocationSize = 00000000 - 00000000
    CancelRoutine = 00000000
    UserBuffer = 00000000
    & Tail.Overlay.DeviceQueueEntry = fffffa8013c0d338
    Tail.Overlay.Thread = fffffa8014fb35c0
    Tail.Overlay.AuxiliaryBuffer = 00000000
    Tail.Overlay.ListEntry.Flink = 00000000
    Tail.Overlay.ListEntry.Blink = 00000000
    Tail.Overlay.CurrentStackLocation = fffffa8013c0d420
    Tail.Overlay.OriginalFileObject = 00000000
    Tail.Apc = 00000000
    Tail.CompletionKey = 00000000
    cmd flg cl device file completion-context
    [0, 0] 0 0 00000000 00000000 00000000 - 00000000

    Args: 00000000 00000000 00000000 00000000
    [0, 0] 0 0 00000000 00000000 00000000 - 00000000

    Args: 00000000 00000000 00000000 00000000
    > [1B, 17] 0 fffffa8011022050 0 00000000 00000000 - 00000000
    \Driver\vwifimp
    Args: 00000000 00000000 00000000 00000000
    IO to check information:
    No information available - the auditor is probably disabled

    ^^ Microsoft Virtual WiFi Miniport driver.

    We will now go ahead and start! devstack the address pinned to vwifimp.sys:

    0: kd >! devstack fffffa8011022050
    ! DevObj! DrvObj! DevExt ObjectName
    > fffffa8011022050 \Driver\vwifimp fffffa80110221a0 NDMP22
    fffffa801103fa10 \Driver\vwifibus fffffa8011057c40 00000090
    ! DevNode fffffa800ece6bd0:
    DeviceInst is ' {5d624f94-8850-40c3-a3fa-a4fd2080baf3} \vwifimp_wfd\5&2032a077&0&02»
    ServiceName is "vwifimp".

    ^^ Here we see also mention of virtual WiFi Bus driver.

    -------------------

    1. with all this said, please remove and replace Kaspersky with 8 built-in Windows Defender for purposes of troubleshooting Windows temporary, as it is most likely originally NETBIOS conflicts:

    Kaspersky - remove http://support.Kaspersky.com/common/service.aspx?El=1464

    Windows Defender (how put on after the withdrawal)- http://www.eightforums.com/tutorials/21962-Windows-Defender-turn-off-Windows-8-a.html

    2 in your list of drivers loaded, dtsoftbus01.sys figure who is the driver for Daemon Tools. Daemon Tools is a very popular cause of BSOD in 7/8 base systems. Please uninstall Daemon Tools. Alternative imaging programs are: MagicISO, Power ISO, etc.

    Kind regards

    Patrick

  • error in NDIS.sys

    Hello

    I have a problem that I get "BSOD_system_service_exception (ndis.sys)" for about a month. I also learned to know that when I use internet, this problem occurred which means that it is network related issue. Please help me solve this problem. I really want to get rid of this

    Thank you

    Younes

    Thanks for the crash dump!

    The attached file of the DMP is to bug checking SYSTEM_SERVICE_EXCEPTION (3B) .

    This indicates that an exception happened during execution of a routine that passes from non-preferred to the privileged code code.

    This error has been linked to the excessive use of expanded memory and resulting from user mode graphics drivers enjambment and passing data incorrect of the kernel code.

    ------------------

    By default, the fault of the accident is labelled as ndis.sys which is NOT the real cause.

    The driver Interface specification NDIS (Network) is an application programming interface (API) for network (NIC) interface cards. The NDIS form the logical link control sublayer (LLC), which is the top layer of the OSI (Layer 2) data link layer. Therefore, the NDIS acting as interface between the sublayer Media Access Control (MAC), which is the bottom layer of the data link layer, and the network layer (Layer 3).

    The NDIS is a library of functions often referred to as a "wrapper" that hides the underlying complexity of the NIC hardware and serves as a standard interface for pilots of level 3 network protocol and at the hardware level MAC drivers. Another common LLC is the Data-Link Interface ODI (Open).

    ------------------

    1. remove and replace avast! with Windows 8 built-in temporary Windows Defender for troubleshooting purposes:

    avast! removal - http://www.avast.com/uninstall-utility

    Windows Defender (how put on after the withdrawal)- http://www.eightforums.com/tutorials/21962-Windows-Defender-turn-off-Windows-8-a.html

    2 uninstall Connectify.

    3 in your list of drivers loaded, listed dtsoftbus01.sys which is the driver of Daemon Tools. Daemon Tools is a very popular cause of BSOD in 7/8 base systems. Please uninstall Daemon Tools. Alternative imaging programs are: MagicISO, Power ISO, etc.

    4. TuneUpUtilities uninstall and if you use it to clean registry, please do not continue to do so.

    Kind regards

    Patrick


  • Connect the 2 locations using RV016 router to fill 2 different networks.

    I have a RV016 connected to a comcast cable modem to slot 1 with IP 192.168.6.1

    I have a RV016 connected to a comcast cable modem at the 2 with 192.168.10.1 IP location

    I installed a VPN tunnel from gateway to gateway between 2 routers RV016.

    I have a LAN in slot 1 with the IP 192.168.1.1, which connects to the internet through an Adtran router with 4 lines of T1 servile.

    I have a LAN with IP 192.168.5.1 2 location that connects to the internet through an Adtran router with 3 T1 lines servile.

    I like a computer to location 2 to connect to the RV016 in the local Comcast modem to the Comcast modem at location 1 in the RV016 to slot 1 then go out to the local network at location 1 and communicate with an application server on LAN 1.

    Help, please.

    You can't do that with a RV016. The RV016 only supports layer 3 tunnel. This means that the two ends are different networks with different subnets. The traffic between them is not filled.

    If you want to really two bridged networks, i.e. join in a single LAN with a single IP subnet and a single broadcast domain you need a layer 2 tunnel, for example a tunnel L2TPv3. That works on layer 2, which is on the MAC addresses inside your networks. In this way, you can use the same IP subnet at both ends and on each side, it seems that the other side is connected to the same ethernet network.

    The RV016 does not support the tunneling of layer 2. You can create an IPSec tunnel, which is layer 3. If there is really a need for a tunnel layer 2, you get different devices. I recommend that you evaluate if a layer 2 connection is really necessary or not.

  • Impossible to transform object MASK

    I am trying to change my image, which is currently the mask, and instead of turning an entire image. Is to transform the background. How to do this?Screen Shot 2016-09-11 at 8.42.30 PM.pngScreen Shot 2016-09-11 at 8.38.45 PM.png

    You capture shows your content of layer and the layer mask are linked. They should transform set.   However, the layer mask is a little weird.  He reveals the area of the layer that has no content, so the blue sky at the bottom of the poster.  The mask is also hide a lot of content which the layer is the blue sky at the bottom of the poster and the content of the layers does not work.

    What you should see when you change the bounding box of transformation shown is layer parts that show should change the size or move it by moving the box.  If you remove the link to the content of the layer mask. You can size and move the layer mask and the content of the layer independently.

    I think you're confusing what you see because of the strange layer mask.  Your layer mask is not like as is approval of the contents of the layer. The layer mask is not like its content of lower layers.

  • Minesweeper point on body / hand puppet together to deal a simple skin? (2)

    Hello

    I have a problem similar to that in post claytor1999 Minesweeper point on body / hand puppet together to deal a simple skin?, when you drag a body hand moves with him. I tried to remove layers, the order of the different layers, etc. Could someone take a look at the Illustrator file: Adobe Creative Cloud and the character animation project folder: Adobe Creative Cloud? Appreciate it.

    Nice character!

    A few tips:

    (1) updated for Preview 3 (which looks like to you use Preview 2), and then create a new project and reimport the file I - This avoids having the 'old' version of behaviours of the previous version (that are good to keep things looking the same, but in your case it did not work in any case, better to get the new behaviors)

    (2) because the key in his right hand is very close to his body, the mesh closes upward - you can see this by checking the option Show Mesh at the bottom of the Panel of puppets and by selecting the layer "body" (or any which another layer on the same mesh). You can fix a few different ways:

    • (A) move the key to be a little further away from the leg (and same for the Toolbox on the other side: that it overlaps do not body)
    • (B) change the lattice extension in the properties of 3-to-1 Panel. This solves the problem with the key, but not the box tool
    • (C) change the images box & key to tools to make their own net. For a subpuppet (i.e. the layer group) you can just check the Warp option independently in the properties panel. But 'skins' (i.e. non-groupes) do not have this option. If you add a '+' in front of the name in artificial intelligence, Ch will automatically define Warp Indpendently for you (and for skin, automatically create a surrounding the group to enable it to happen). Thus, rename 'tools' to '+ tools' artificial intelligence. You'll probably also want to divide one for the left hand and the other for right hand tools as they move independently.

    (3) you probably want to add some fixed handles to prevent the body from flopping autour when your head moves. Do it with the Pin tool in the control panel of the puppet, with the selected organization. And then to add keyboard triggers for change of hands, etc.

  • Related: How show different layers of a file linked .psb

    Hi all

    Lets say I have a multilayer psd file, each layer describes a scene of a mobile application, stacked one on the other. Can I use "place bound" to integrate the mobile file in the presentation. and of course, it shows which displayed layer when you saved the .psd file. Now, I want to fix several instances of this .psb file, each indicating a different layer (form app). For example if the .psb file has 4 layers, I want to drop 4 copies of each showing one of the layers in the original file. Any solution? I won't save as many times and original layers remain stacked one on the other.

    Thank you

    Without fully understanding what you are wanting to do, I think that layers can be an avenue in which you could look at. You can save the presentation different comps in your dynamic object and access it via the properties panel in your main document.

  • Question of VLAN to control package mgt Nexus 1000v

    In the documentation of 1000v of last year he suggested that package VSM and control data use different VLAN. However, in the last 2010 document Cisco now has:

    «Cisco recommends to use the same VLAN for control, package and management, but you don't place data traffic on this VLAN.» Flexibility, you can configure separate VLANs. »

    Cisco also provides "Although the management interface is not used to Exchange data between the MSM and VEM, it is used to establish and maintain the connection between the MSM and VMware VirtualCenter Server".

    In a 'high security' deployment of the 1000v, I'm not quite clear what would look like architecture. VCenter clearly needs to connect to the management interface. Control/data packets can stay on a layer 2 VLAN and not be routable to other networks. I'm not a networking guy, but have need to interface with our network team help design, deploy our 1000v. Would put us the control/package/mgt all on a VIRTUAL LAN, then use the ACL to restrict the traffic of just vCenter and other stations approved management work?

    It seems to me the best solution would be a local network VIRTUAL package control information which is the layer 2 only and therefore no gateway or routing. Then place the management interface VLAN another which have Layer 3 connectivity and set the ACLs on the routing to limit what devices can talk to the management interface.

    Thoughts?

    We changed practices version 1.1 to 1.2 with respect to VLANs. There was a lot of pushing all VLANs was exaggerated and confusing to Setup. In a 'high security' configuration, I agree with your last paragraph. I put on a management VLAN is routable and stick control and packages on a non-routable network of L2.

    It's a perfectly acceptable Setup.

    If you go to ACL do not forget the VSM needed connections the following. You need access to vCenter, ssh/telnet access, monitoring of the access, and we use the network interface of pulsation of backup for VSM HA. The heart beat is pure L2 between two VSMs so keep that in mind.

    Louis

  • Possibility to save script palette menus and load curves?

    Is it possible to Photoshop CS4 script palette menus? Specifically, the "save curves preset...". ' and 'load curves Preset"... the range of settings.

    I have 600 photos, some of which have layer > new adjustment layer > curves applied.

    I want to save the curves using the name of the image. Later, I want to be able to load the appropriate curve.

    For example, for image001.tif, the curve would be image001.acv

    (I already have a loop set up to browse files and get the file names.)



    I can't help with Applescript (or even know if it is possible to do it with only Applescript). And to my knowledge you can't have things script in dialog boxes like load or save the curve directly. But here's the javascript code which will load and save settings.

    First of all the easy part, defining an adjustment of the layer of a file.

    function loadCurves( file ) {
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID( "AdjL" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
            var desc1 = new ActionDescriptor();
            desc1.putPath( charIDToTypeID( "Usng" ), new File( file ) );
        desc.putObject( charIDToTypeID( "T   " ), charIDToTypeID( "Crvs" ), desc1 );
        executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
    };
    

    The code to write that file .acv an adjustment layer is a bit more involved and does not work with all color modes

    // Works with RGB or CMYK images.
    // Does not work at all with greyscale, or indexColor
    // Does not work correctly with Lab
    File.prototype.writeByte = function(b) {
      this.write(String.fromCharCode(b));
    };
    File.prototype.writeShort = function(ET,s) {
      var self = this;
    if(ET == "BE"){
      self.writeByte(s & 0xFF);
      self.writeByte((s >> 8) & 0xFF);
    }else{
      self.writeByte((s >> 8) & 0xFF);
      self.writeByte(s & 0xFF);
    }
      return self;
    };
    function convertBCD( num ){
        var res = new Array;
        if(num > 16 ){
            res.unshift(1);
            num = num - 16;
        }else{
            res.unshift(0);
        }
        if(num > 8 ){
            res.unshift(1);
            num = num - 8;
        }else{
            res.unshift(0);
        }
        if(num > 4 ){
            res.unshift(1);
            num = num - 4;
        }else{
            res.unshift(0);
        }
        if(num > 2 ){
            res.unshift(1);
            num = num - 2;
        }else{
            res.unshift(0);
        }
        if(num == 1 ){
            res.unshift(1);
        }else{
            res.unshift(0);
        }
        return res;
    };
    function getCurve( numberOfPoints ){
        this.getPoints = function(){
            this.tempArray = new Array;
            this.tempArray.push( rawDesc.charCodeAt( pointer ) );
            pointer = pointer + 2;// set pointer to next point
            this.tempArray.push( rawDesc.charCodeAt( pointer ) );
            return this.tempArray;
        }
    
        this.pointsArray = new Array;
        for( var i = 0; i < numberOfPoints; i++ ){
            pointer = pointer + 2;// next point
            this.pointsArray.push( this.getPoints() );
        }
        pointer = pointer + 2;// next curve
        return this.pointsArray;
    };
    
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID( 'Lyr ' ), charIDToTypeID( 'Ordn' ), charIDToTypeID( 'Trgt' ) );
    var rawDesc = executeActionGet( ref ).getList( stringIDToTypeID( 'adjustment' ) ).getObjectValue( 0 ).getData( stringIDToTypeID( 'legacyContentData' ) );
    
    var pointer = 2;// used to read rawData similar to reading a file
    var flag = rawDesc.charCodeAt( pointer );// char at offset 2 always == 1 so use to validate data
    if( flag != 1 ) forceError;// unknown problem with rawData
        pointer = 6;// update pointer to BCD byte
        var bcd = rawDesc.charCodeAt( pointer );
        if( bcd < 0 || bcd > 31 ) forceError;// check for valid value
        if( bcd == 0 ) forceError;// an empty adjustment - no curves to process
        var bcdArray = convertBCD( bcd );
        var numberOfCurves = bcdArray.toString().match(/(1)/g).length;
        var curvesArray = new Array;
        pointer = 8;// set pointer to start of curve data
        for(var i = 0; i < numberOfCurves; i++ ){
            var numberOfPoints = rawDesc.charCodeAt( pointer );
            curvesArray.push( getCurve( numberOfPoints ) );
        }
    // now need to map rawData curves in curvesArray to known channel curves
    var acvArray = new Array;
    if( bcdArray[0] == 1 ) {
        acvArray.push( curvesArray.shift() );
    } else {
        acvArray.push( [ [0,0],[255,255] ] );
    }
    if( bcdArray[1] == 1 ) {
        acvArray.push( curvesArray.shift() );
    } else {
        acvArray.push( [ [0,0],[255,255] ] );
    }
    if( bcdArray[2] == 1 ) {
        acvArray.push( curvesArray.shift() );
    } else {
        acvArray.push( [ [0,0],[255,255] ] );
    }
    if( bcdArray[3] == 1 ) {
        acvArray.push( curvesArray.shift() );
    } else {
        acvArray.push( [ [0,0],[255,255] ] );
    }
    if( bcdArray[4] == 1 ) {
        acvArray.push( curvesArray.shift() );
    } else {
        acvArray.push( [ [0,0],[255,255] ] );
    }
    var myACV = new File('~/desktop/myCurve.acv');
    myACV.open('w');
    myACV.writeShort( 'LE','4' );// acv header
    myACV.writeShort( 'LE','5' );// acv header
    for( var i = 0; i< 5; i++ ) {
        var numberOfPoints = acvArray[i].length;
        myACV.writeShort( 'LE', numberOfPoints.toString() );
        for( var p = 0; p < numberOfPoints; p++ ){
            myACV.writeShort( 'LE', acvArray[i][p][0].toString() );
            myACV.writeShort( 'LE', acvArray[i][p][1].toString() );
        }
    }
    myACV.close();
    

    I wrote this earlier. It may be possible to simply write the header of acv, then add the raw data from the descriptor to work with other modes of.

    Also, neither verifies that the selected layer is a curves adjustment layer and will fail if it is not.

  • Cannot save layers moved into PSE10

    NB: I use the word 'Register' in the sense of the printer, that is to say "well aligned".

    I frequently edit multilayer maps, in which each layer must be recorded accurately (to the exact pixel) with canvas. In older versions of PES, when I tried to import layers from another file, I disable mode "maximizes" in the menu window and drag the imported layers to one image on the other.  By pressing the SHIFT key at the same time, new layers would be recorded accurately on the new canvas in the same relative position they were on the old canvas (if the images are of different sizes, the old canvas would focus on the new).

    In PSE10 there is no 'Maximize' mode, so I use the 2 - up option in the menu layout. However, pressing the SHIFT key doesn't seem to work more, and new layers come in their original positions.  Apart from manually you align layers, I don't find a way to save them.  'Align' options are not useful to do this, that they re - calculate the center of the layer, based on its content. I need the layer must be harmonized as it was on the old canvas, regardless of the contents of the layer.

    I'm sure that I'm very stupid, and there is a perfectly simple way to do it - I can't find it!

    To activate the window > images > float images. Go in Edition > Preferences and select 'allow floating documents' option.

    It will allow you to make the floating documents which is not sticky to the application.

    (not sure if this is the same as the old unMaximized option).

  • Paste a shape as a mask when there are several layers?

    I have a couple of layers that I applied the auto vector command in order to hide. I want to now draw a rectangle rounded on part of my canvas, cut this rectangle with corners rounded and right-click on the drawing area and choose Edition > paste as mask, so the picture will be revealed due to the rounded rectangle shape. It works with a single layer, but now that I have several layers and masks vector auto I don't know which image/layer for click straight on and do with?

    Thanks for any help.1.png2.png

    Instead of cutting the rounded rectangle, leave it at the top of the stack of items, select all three objects, then select Modify > mask > Group as mask (or you can right click to select the group in the mask). This command will apply the object higher in the selection as a mask for the items below.

  • "Change layers in ACR" might be executed or by script?

    I am trying to integrate the Dr. Brown: Script CS5: change the layers in ACR (http://www.russellbrown.com/scripts.html)

    in an existing workflow, not my choice.

    Here is my delemna. I'm provided CMYK PSD files, and my final backup files must be CMYK PSD.

    ACR via Bridge wants TIFFs, script Dr. Brown wants RGB. I know that I can batch convert TIFF or RGB, if necessary, but I think a action/script running in each open file could be simpler and less subject to error or oversight, as each image will be individually opened and edited in any case.

    The way I am treated this manually is as follows:

    Open PSD CMYK.

    Duplicate the Image

    Convert the Dupe in RGB

    Run the script of "Layers in ACR" on RGB Dupe

    Brand changes and click OK in the ACR

    + Shift + drag resulting RGB Dupe layer in the original document of CMKY (centered)

    Close the Dupe without saving changes

    This gives me a new layer of ACR'ed to blend/mask in my original necessary file.

    I tried the action of these steps and everything is working properly through ACR... but... the action is not which actually layer Dupe/cab ' ed more at the Original (drag and drop) document. The ACR Dupe'ed is closed so that the original file is left unchaged.

    How can I automate the transfer of the Dupe to the Original layer?

    I made a good many changes to Dr. Borwns layers of change in the script of the cab. Here are some of the most important changes.

    1. now supports color RGB, CMYK, Lab and grayscale modes. If the document is not embedded tiff RGB is converted to RGB using RGB profile for work in Photohsop.

    2 now supports vector masks.

    3. the density and the pen of the mask Panel settings are now kept for channel and vector masks.

    4. now, to keep the name of the original layer.

    5. don't use a State in history.

    It is a script of CS5. It can work in CS4, but I didn't test.

    On my system when the document canvas size get above about 20-25 members ACR really slows down. Well above that and it takes too much time or crashes. So I would say that this script is not designed for documents with sizes really big canvas in high resolution.

    I could not find a way to replace the contents of a smart object with a tiff file and do not have the ACR dialog show when the ACR are set to change the TIFF in ACR. Because of this it really cannot be registered by an action, the ACR dialog box will always show. If you install the script in the scripts folder, it can be called from an action like any other script. It just does not work in batch mode.

    Support the transparent layer is still is not ideal because ACR does not support transparency. If it was my script, I drop the support of the transparent layer instead of trying to force ACR to do something is was not designed to do.

    // c2011 Adobe Systems, Inc. All rights reserved.
    // Produced and Directed by Dr. Brown ( a.k.a Russell Preston Brown )
    // Written by Tom Ruark because I wrote listener! I get credit for all listener code.
    
    /*
    @@@BUILDINFO@@@ Dr Browns Edit Layer in ACR.jsx 1.1.1
    */
    
    // enable double clicking from the Macintosh Finder or the Windows Explorer
    #target photoshop
    
    // save some state so we can restore
    // we pop the ACR dialog so users can cancel out and we are in a bad state
    var historyDocument = app.activeDocument;
    var historyState = app.activeDocument.activeHistoryState;
    var isCancelled = true;
    
    app.activeDocument.suspendHistory( 'Dr Browns Edit Layer in ACR', 'EditLayerInACR();');
    if( isCancelled ){
         if (historyDocument != app.activeDocument) {
              app.activeDocument.close( SaveOptions.DONOTSAVECHANGES );
         }
         app.activeDocument = historyDocument;
         app.activeDocument.activeHistoryState = historyState;
    }
    isCancelled ? 'cancel' : undefined;// do not localize cancel
    
    function EditLayerInACR(){
    // Show this message just once.
    // If I have preferences then I must of done this already.
    var message = "Special Instructions\r";
    message += "Make sure that you have set your Camera Raw Preferences to the following setting:\r";
    message += "(Automatically open all supported TIFFs)\r";
    message += "To access this preference setting, go to your Main Menu and select: Photoshop/Preferences/Camera Raw\r";
    message += " \rAlso, your default resolution for TIFF images in ACR must be set to 240ppi. If you see your layers change in size, then you know that your resolution is not set correctly.\r";
    message += "";
    
    var optionsID = "5714ecb5-8b21-4327-bf64-135d24ea7131";
    var showMessage = true;
    try {
        var desc = app.getCustomOptions(optionsID);
        showMessage = false;
    }
    catch(e) {
        showMessage = true;
    }
    
    if (showMessage) {
        alert(message);
        var desc = new ActionDescriptor();
        desc.putInteger(charIDToTypeID('ver '), 1);
        app.putCustomOptions(optionsID, desc);
    }
    
    var tempName = "Raw Smart Temp";
    var tempFile = new File( Folder.temp.toString() + "/" + tempName + ".tif" );
    
    try {
    
    // make sure active layer is a normal art layer
    if( app.activeDocument.activeLayer.typename != 'ArtLayer' || app.activeDocument.activeLayer.kind != LayerKind.NORMAL ) return 'cancel';
    
    // change image res to match defalut ACR 240
    if( app.activeDocument.resolution != 240 ) {
         var docRes = app.activeDocument.resolution;
         app.activeDocument.resizeImage(undefined, undefined, 240, ResampleMethod.NONE);
    }
    
    var channelMask = hasChannelMask();
    var vectorMask = hasVectorMask();
    var layerTransparency = HasLayerTransparency();
    
    // save channel mask if exists
    if( channelMask && !layerTransparency ) {
         var channelMaskSettings = getChannelMaskSettings();
        var tempAlpha = channelMaskToAlphaChannel();
         deleteChannelMask();
    }
    // save vector mask if exists
    if( vectorMask && !layerTransparency ) {
         var vectorMaskSettings = getVectorMaskSettings();
        app.activeDocument.pathItems[app.activeDocument.pathItems.length-1].duplicate( 'tempPath' );
         app.activeDocument.pathItems[app.activeDocument.pathItems.length-1].remove();
    }
    if( layerTransparency ) {
         if( channelMask ){// apply existing channel mask
             var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Msk ') );
              desc.putReference( charIDToTypeID('null'), ref );
              desc.putBoolean( charIDToTypeID('Aply'), true );
              executeAction( charIDToTypeID('Dlt '), desc, DialogModes.NO );
         }
         if( vectorMask ) {// save existing vector mask
              var vectorMaskSettings = getVectorMaskSettings();
              app.activeDocument.pathItems[app.activeDocument.pathItems.length-1].duplicate( 'tempPath' );
              app.activeDocument.pathItems[app.activeDocument.pathItems.length-1].remove();
         }
         var transMask = layerTransparencyToAlpha();
         // stamp visible
         var desc = new ActionDescriptor();
        desc.putBoolean( charIDToTypeID('Dplc'), true );
        executeAction( charIDToTypeID('MrgV'), desc, DialogModes.NO );
         // merge down
         executeAction( charIDToTypeID('Mrg2'), undefined, DialogModes.NO );
    }
    
    convertLayerToACRSmartObject();
    
    // create a  channel mask from original layer transparency
    // currently does not support a layer with transparency and existing channels mask.
    if( layerTransparency ) {
         alphaToChannelMask( transMask );
         transMask.remove();
         if( vectorMask ) {
              app.activeDocument.pathItems['tempPath'].select();
              createVectorMask();
              setVectorMaskDensity( vectorMaskSettings.density );
              setVectorMaskFeather( vectorMaskSettings.feather );
              app.activeDocument.pathItems['tempPath'].remove();
         }
    }
    // restore channel mask if needed
    if( channelMask && !layerTransparency ) {
         alphaToChannelMask( tempAlpha );
         setChannelMaskDensity( channelMaskSettings.density );
         setChannelMaskFeather( channelMaskSettings.feather );
         tempAlpha.remove();
    }
    // restore vector mask if needed
    if( vectorMask && !layerTransparency ) {
         app.activeDocument.pathItems['tempPath'].select();
         createVectorMask();
         setVectorMaskDensity( vectorMaskSettings.density );
         setVectorMaskFeather( vectorMaskSettings.feather );
         app.activeDocument.pathItems['tempPath'].remove();
    }
    
    // well at least this is the same!
    // replace contents of selected smart object
    var desc = new ActionDescriptor();
    desc.putPath( charIDToTypeID( "null" ), tempFile );
    executeAction( stringIDToTypeID( "placedLayerReplaceContents" ), desc, DialogModes.NO );
    
    tempFile.remove();
    
    // convert back to orginal resolution
    if( docRes != undefined ) app.activeDocument.resizeImage(undefined, undefined, docRes, ResampleMethod.NONE);
    
    isCancelled = false;// no errors so save to record
    } /* try block ender */
    catch(e) {
         if( tempFile.exists ) tempFile.remove();
    }
    
    //////////////////////////////////////////////////////////////////////////////
    /////////////////////// functions below /////////////////////////
    //////////////////////////////////////////////////////////////////////////////
    
    // see if i can tell that this layer has transparent pixels
    function HasLayerTransparency() {
        var hasTransparency = false;
         if( app.activeDocument.activeLayer.isBackgroundLayer ) return false;
        try {
            SelectLayerTransparency();
            var s = activeDocument.selection;
            if ( null != s && ! s.solid ) {
                activeDocument.selection.deselect();
                return true;
            }
            if ( (s[2].value - s[0].value) == activeDocument.width.value &&
                 (s[3].value - s[1].value) == activeDocument.height.value) {
                activeDocument.selection.deselect();
                return false;
            }
            activeDocument.selection.deselect();
        }
        catch(e) {
            activeDocument.selection.deselect();
            hasTransparency = false;
        }
        return hasTransparency;
    };
    function SelectLayerTransparency() {
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putProperty( charIDToTypeID( "Chnl" ), charIDToTypeID( "fsel" ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID( "Chnl" ), charIDToTypeID( "Chnl" ), charIDToTypeID( "Trsp" ) );
        desc.putReference( charIDToTypeID( "T   " ), ref );
        executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
    };
    function SaveAsTIFF( inFileName ) {
         var tiffSaveOptions = new TiffSaveOptions();
         tiffSaveOptions.embedColorProfile = true;
         tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
         tiffSaveOptions.alphaChannels =  false;
         tiffSaveOptions.layers = false;
         app.activeDocument.saveAs( new File( inFileName ), tiffSaveOptions, true, Extension.LOWERCASE );
    };
    // a color mode independent way to make the component channel active.
    function selectComponentChannel() {
        try{
            var map = {};
            map[DocumentMode.GRAYSCALE] = charIDToTypeID('Blck');// grayscale
            map[DocumentMode.RGB] = charIDToTypeID('RGB ');
            map[DocumentMode.CMYK] = charIDToTypeID('CMYK');
            map[DocumentMode.LAB] = charIDToTypeID('Lab ');
            var desc = new ActionDescriptor();
                var ref = new ActionReference();
                ref.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), map[app.activeDocument.mode] );
            desc.putReference( charIDToTypeID('null'), ref );
            executeAction( charIDToTypeID('slct'), desc, DialogModes.NO );
        }catch(e){}
    };
    // function to see if there is a raster layer mask, returns true or false
    function hasChannelMask(){
         if( app.activeDocument.activeLayer.isBackgroundLayer ) return false;
         var ref = new ActionReference();
         ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
         return executeActionGet( ref ).getBoolean( stringIDToTypeID( 'hasUserMask' ) );
    };
    // function to see if there is a vector layer mask, returns true or false
    function hasVectorMask(){
         if( app.activeDocument.activeLayer.isBackgroundLayer ) return false;
         var ref = new ActionReference();
         ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
         return executeActionGet( ref ).getBoolean( stringIDToTypeID( 'hasVectorMask' ) );
    };
    // create an new alpha from layer channel mask, returns channel object.
    function channelMaskToAlphaChannel() {
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Msk ') );
        desc.putReference( charIDToTypeID('null'), ref );
        executeAction( charIDToTypeID('Dplc'), desc, DialogModes.NO );
        var dupedMask = app.activeDocument.activeChannels[0];
        selectComponentChannel();
        return dupedMask;
    };
    function deleteChannelMask() {
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Msk ') );
        desc.putReference( charIDToTypeID('null'), ref );
        executeAction( charIDToTypeID('Dlt '), desc, DialogModes.NO );
    };
    // creates a layer channel mask from a channel object
    function alphaToChannelMask( alpha ) {
         var desc = new ActionDescriptor();
        desc.putClass( charIDToTypeID( "Nw  " ), charIDToTypeID( "Chnl" ) );
         var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID( "Chnl" ), charIDToTypeID( "Chnl" ), charIDToTypeID( "Msk " ) );
        desc.putReference( charIDToTypeID( "At  " ), ref );
        desc.putEnumerated( charIDToTypeID( "Usng" ), charIDToTypeID( "UsrM" ), charIDToTypeID( "RvlA" ) );
         executeAction( charIDToTypeID( "Mk  " ), desc, DialogModes.NO );
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Msk ') );
        desc.putReference( charIDToTypeID('null'), ref );
        desc.putBoolean( charIDToTypeID('MkVs'), false );
        executeAction( charIDToTypeID('slct'), desc, DialogModes.NO );
        var desc = new ActionDescriptor();
            var desc1 = new ActionDescriptor();
                var ref = new ActionReference();
                ref.putName( charIDToTypeID('Chnl'), alpha.name );
            desc1.putReference( charIDToTypeID('T   '), ref );
            desc1.putBoolean( charIDToTypeID('PrsT'), true );
        desc.putObject( charIDToTypeID('With'), charIDToTypeID('Clcl'), desc1 );
        executeAction( charIDToTypeID('AppI'), desc, DialogModes.NO );
        selectComponentChannel();
    };
    // creates a new alpha channel from active layer's transparency, returns channel object
    function layerTransparencyToAlpha() {
         var tempAlpha = app.activeDocument.channels.add();
         var desc = new ActionDescriptor();
            var desc1 = new ActionDescriptor();
                var ref = new ActionReference();
                ref.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Trsp') );
            desc1.putReference( charIDToTypeID('T   '), ref );
            desc1.putBoolean( charIDToTypeID('PrsT'), true );
        desc.putObject( charIDToTypeID('With'), charIDToTypeID('Clcl'), desc1 );
        executeAction( charIDToTypeID('AppI'), desc, DialogModes.NO );
         selectComponentChannel();
         return tempAlpha;
    };
    // gets channel mask settings, returns custom object
    function getChannelMaskSettings(){
         var ref = new ActionReference();
         ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
         var desc = executeActionGet(ref);
         var channelMask = {};
         // density should be percent. it is 0-255 instead. so convert because percent is need to set
         channelMask.density = Math.round((desc.getInteger( stringIDToTypeID( 'userMaskDensity' ) ) / 255)*100);
         channelMask.feather = desc.getUnitDoubleValue( stringIDToTypeID( 'userMaskFeather' ) );
         return channelMask;
    };
    function setChannelMaskDensity( density ) {// integer
         var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
            var desc1 = new ActionDescriptor();
            desc1.putUnitDouble( stringIDToTypeID('userMaskDensity'), charIDToTypeID('#Prc'), density );
        desc.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), desc1 );
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    };
    function setChannelMaskFeather( feather ) {// double
         var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
            var desc1 = new ActionDescriptor();
            desc1.putUnitDouble( stringIDToTypeID('userMaskFeather'), charIDToTypeID('#Pxl'), feather );
        desc.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), desc1 );
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    };
    // gets vector mask settings, returns custom object
    function getVectorMaskSettings(){
         var ref = new ActionReference();
         ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
         var desc = executeActionGet(ref);
         var vectorMask = {};
         vectorMask.density = Math.round((desc.getInteger( stringIDToTypeID( 'vectorMaskDensity' ) ) / 255)*100);
         vectorMask.feather = desc.getUnitDoubleValue( stringIDToTypeID( 'vectorMaskFeather' ) );
         return vectorMask;
    };
    function setVectorMaskDensity( density ) {// integer
         var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
            var desc1 = new ActionDescriptor();
            desc1.putUnitDouble( stringIDToTypeID('vectorMaskDensity'), charIDToTypeID('#Prc'), density );
        desc.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), desc1 );
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    };
    function setVectorMaskFeather( feather ) {// double
         var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
            var desc1 = new ActionDescriptor();
            desc1.putUnitDouble( stringIDToTypeID('vectorMaskFeather'), charIDToTypeID('#Pxl'), feather );
        desc.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), desc1 );
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    };
    // create a layer vector mask from active path
    function createVectorMask() {
      try{
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putClass( charIDToTypeID('Path') );
        desc.putReference( charIDToTypeID('null'), ref );
            var mask = new ActionReference();
            mask.putEnumerated( charIDToTypeID('Path'), charIDToTypeID('Path'), stringIDToTypeID('vectorMask') );
        desc.putReference( charIDToTypeID('At  '), mask );
            var path = new ActionReference();
            path.putEnumerated( charIDToTypeID('Path'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('Usng'), path );
        executeAction( charIDToTypeID('Mk  '), desc, DialogModes.NO );
      }catch(e){ return -1; }
    };
    // converts the active layer into a tiff embedded smart object so it can be edited in ACR .
    // editing in ACR requires ACR preferences to be set to edit all supported tiffs
    function convertLayerToACRSmartObject(){
         var layerName = app.activeDocument.activeLayer.name;
         app.activeDocument.activeLayer.name = "Raw Smart Object";
         // trim layer to document bounds.
         app.activeDocument.crop(app.activeDocument.activeLayer.bounds);
         // convert selected layer to smart object
         executeAction( stringIDToTypeID( "newPlacedLayer" ), undefined, DialogModes.NO );
         //  edit selected smart object
         executeAction( stringIDToTypeID( "placedLayerEditContents" ), new ActionDescriptor(), DialogModes.NO );
         if(app.activeDocument.bitsPerChannel != BitsPerChannelType.SIXTEEN) app.activeDocument.bitsPerChannel  = BitsPerChannelType.SIXTEEN;
         if(app.activeDocument.mode != DocumentMode.RGB) app.activeDocument.changeMode(ChangeMode.RGB);
         SaveAsTIFF( tempFile );
         app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
         app.activeDocument.activeLayer.name = layerName;
    };
    };// end EditLayersInACR()
    

Maybe you are looking for