Skip to main content
February 9, 2017
Question

copy layer to destination

  • February 9, 2017
  • 1 reply
  • 544 views

Hi

Can any one help to create a script to

copy current layer to selected group or layer (near)

script should work like Copying/Pasting layers ( for example, i assign shortcut ctrl+alt+c for copy and ctrl+alt+v for paste)

here its  demo

https://copio.pluginmate.com/?utm_source=pluginmate

but, unfortunately Copio script doesn't work as I expected, he just make a copy of layer in top of layers panel

The script is made up of 2 scripts

Copio - Copy.jsxbin  - memorize selected layer

Copio - Paste.jsxbin - paste layer to top of layers, but not in destination group or near of selected layer

Sorry for my English.

Any help appreciated!

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
February 10, 2017

Please post screenshots to clarify.

copy current layer to selected group or layer (near)

What is »current layer« supposed to mean when you apparently have another layer or group selected?

February 12, 2017

Sorry my mistake

copy current layer mean copy selected layer

copy current layer to destination group or layer - should be

I want to mention that this is a simplified example

in reality I work with documents which have many layers 1000+ with large number of groups and subgroup

Option 1

step 1 - (In Layers Panel) Select the layer( in this case palet1) that I need to copy and press  Ctrl+Shift+C  

step 2 - (On Canvas)      with mouse( because it is very fast, Ps automatically expand all group) on canvas i select destination layer

step 3 - (In Layers Panel) Ctrl+Alt+V script should copy layer here ( Below or Above does not matter)

Option 2

step 1 - (In Layers Panel) Select the layer that I need to copy and press  Ctrl+Shift+C  

step 2 - (In Layers Panel) with mouse or keyboard i select destination group

step 3 - (In Layers Panel) Ctrl+Alt+V script should copy layer here 

Thanks!

JJMack
Community Expert
Community Expert
February 12, 2017

If your documents have a large complex structure what logic can be use to identify the group you want the selected layer duplicated in. It seems you target the layer to be duplicate now you need to provide the logic to locate the move to position or paste into position. You use some knowledge to do that manually now.  You need to program that logic into your script.

JJMack