Skip to main content
Participating Frequently
September 22, 2025
Answered

ExtendScript Error When Creating Color Lookup Layer ("Program Error")

  • September 22, 2025
  • 2 replies
  • 479 views

Hello everyone,

I'm writing a Photoshop script (ExtendScript/JSX) to automate a color grading workflow. The intended sequence is:

Merge all visible layers into a new layer.

Create a new "Color Lookup" adjustment layer, loading a specific 3D LUT file.

Merge the Color Lookup layer down onto the merged layer.

My script fails at step 2, when attempting to create the Color Lookup layer, and returns the following error message:

"Error: A general Photoshop error occurred. This functionality may not be available in this version of Photoshop. -Could not complete the command because of a program error.

Is there a different, more compatible scripting method to create a Color Lookup layer while simultaneously loading a 3D LUT file?

Thank you in advance for any help or advice you can offer!

Correct answer Stephen Marsh

I have attached the code as a .txt file, as it contains over 6K lines. I have made the reference to the 3D LUT cross platform, the rest of the code is verbatim SL recorded. This example uses the default adobe "Candlelight" preset and is for direct application to a raster layer (not adjustment layer).

2 replies

Stephen Marsh
Community Expert
Community Expert
September 23, 2025

Forgetting adjustment layers, I successfully tested the direct application of one of the default LUTs from Adobe via the AM code recordered by the SL plugin. It's verbose as it captures the entire lookup table, but it works.

kj_4500Author
Participating Frequently
September 23, 2025

I'm not sure how other filter plugin developers handle the "apply LUT" step. There might be a better way, as capturing the entire color lookup table is just too inflexible.

Stephen Marsh
Community Expert
Community Expert
September 23, 2025
Stephen Marsh
Community Expert
Community Expert
September 22, 2025

Is it a LUT, ICC or DeviceLink?

 

Why not directly edit the merged duplicate layer (Image > Adjust), as the adjustment layer isn't being used non-destructively, so it just adds more steps. And perhaps complexity?

kj_4500Author
Participating Frequently
September 23, 2025

It's LUT.
I'm developing a plugin, and this is one of the steps. This is a custom LUT file, and I want the operation to be simple enough, just like some filter plugins, where you can click on an effect and it will be applied directly to the image. I'm not a professional developer, so maybe there's a better way?

Stephen Marsh
Community Expert
Community Expert
September 23, 2025

Do you have the ScriptingListener plugin installed?