Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
How to select a layer inside another layer in Photoshop with Javascript, and make it visible/invisible

I have a Photoshop layer/smart object named "Culoare". When I double click on it, there is another list of layers/smart objects. I need to be able to make visible/invisible the layers inside the first layer. For example, make "warm white" invisible and "blue" visible.

"Culoare" is the first object I need to make visible or invisible the layers here

My code so far:

var doc = app.activeDocument;
var culoare = doc.layers[5];
doc.activeLayer = culoare;
culoare.visible = false;
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

I don't know much about photoshop script. But based on your code, it seems that the order of your last two lines should be:

culoare.visible = false; 
doc.activeLayer = culoare;

That is 'culoare' should not be visible before you assign it to the active layer. I dont understand why you would want it to be invisible if you are assigning it to the active layer though.

about 4 years ago · Juan Pablo Isaza Relatório

0

You're nearly there! You don't need to reference the culoare my the layer number as that may change. You can however, use the current active layer instead:

// Create a reference to the active document
var doc = app.activeDocument;

// Create a variable "culoare" as a reference to the current active layer
var culoare = doc.activeLayer;

// Make culoare visible if it's hidden
// or make culoare hidden if it's visible
culoare.visible = !culoare.visible;
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda