Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

213
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!