Sair
  • Comunidade global
    • Idioma:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is it possible to copy all Width Height, X and Y properties?

Explorador ,
Dec 10, 2022 Dec 10, 2022

Hello,

 

Is there any easy ways to copy Width Height X and Y of a layer so I can apply it to other layer (as a replacement) on the same image

 

01.jpg

 

Any help and suggestion will be appreciated, Thank you

TÓPICOS
Ações e scripts , Windows
4.8K
Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines

correct answers 2 respostas corretas

Community Expert , Dec 11, 2022 Dec 11, 2022

Update - 17th December 2022:

 

Here is a simplified 2 part script, replacing all previously posted code in this topic.

 

Select the source layer and run script 1 of 2:

 

/*
Resize Target Layer to Source Layer Size - 1 of 2.jsx
https://community.adobe.com/t5/photoshop-ecosystem-discussions/is-it-possible-to-copy-all-width-height-x-and-y-properties/td-p/13410970
v1.1, 17th December 2022, Stephen Marsh
*/

#target photoshop

if (documents.length) {

    // Store the original ruler units and set to 
...
Traduzir
Community Expert , Dec 11, 2022 Dec 11, 2022

Update - 19th December 2022:

 

/* The previous code using the $.setenv() code has been removed due to errors */

 

Here is a single OPT/ALT version of the updated two-part script:

 

/*
Resize Target Layer to Source Layer Size - ALT-OPT.jsx
https://community.adobe.com/t5/photoshop-ecosystem-discussions/is-it-possible-to-copy-all-width-height-x-and-y-properties/td-p/13410970
v1.1, 19th December 2022, Stephen Marsh
*/

#target photoshop

if (documents.length) {

    /* Step 2 - Hold down alt/opt to 
...
Traduzir
Adobe
Community Expert ,
Dec 18, 2022 Dec 18, 2022
MAIS RECENTE

Ah, I mostly use a Mac, so well done!

 

The available options are:

 

/*
altKey readonly - True if the Alt or Option key is pressed.
ctrlKey readonly - True if the Ctrl key is pressed.
keyName readonly - A string containing the name of the currently pressed key, such as “a”, or an empty string.
metaKey readonly - True if the Cmd key (in Mac OS) or Windows key (in Windows) is pressed.
shiftKey readonly - True if the Shift key is pressed.
*/

 

Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines