Skip to main content
Inspiring
April 4, 2023
Question

Turn "preserveRGB" on on a footage item using extendscript

  • April 4, 2023
  • 2 replies
  • 1915 views

I tried various things, but I didn't succeed to turn on "preserveRGB" on on a footage item using extendscript.

The following script doesn't work. It suppose to set PreserveRGB on on the selected footage item.

 

 

app.project.activeItem.mainSource.colorProfile.preserveRGB = true;

 

 

colorProfile always seems to be undefined, but the documentation state...

ColorProfile.preserveRGB
Description: A boolean value indicating whether the RGB values are preserved or not.
Type: bool
Access: Read/write.

2 replies

Inspiring
December 23, 2023

It's crazy that you can't access this via scripting. What you can do is edit the Interpretation Rules.txt to set a file type (like EXRs) to always import Preserve RGB.

Inspiring
December 23, 2023

Automatically Import OpenEXR with Preserve RGB checked:

You can automatically set EXR files to always import with "Preserve RGB" on.

- Navigate to your Preferences:
for example C:\Users\Eric\AppData\Roaming\Adobe\After Effects\23.4
- Open "Interpretation Rules.txt"
- Find "OpenEXR"
- Change the line below it to:

*, *, *, "oEXR", * = *, *, *, P, "pRGB", *

ConstantinMaier
Inspiring
December 24, 2023

Now that's really interesting. Is it possible to set this to a certain color space too using this method? Also, can you do it with all other formats?

Dan Ebberts
Community Expert
Community Expert
April 4, 2023

I don't think I've seen that in the scripting docs. Where did you see it?

Marvin01Author
Inspiring
April 5, 2023

ChatGTP claimed to found it in the after effects scripting documentation, but now when asked where exactly "I apologize for the confusion. I have reviewed the After Effects scripting documentation again, and I cannot find any mention of a preserveRGB property for the ColorProfile object. It's possible that I made an error in my previous responses." So strange where it did come up with it before...? So I gues this setting cannot be set by extendscript? Also not with scriptlistener code?

Dan Ebberts
Community Expert
Community Expert
April 5, 2023

I'm not aware of any way to control Preserve RGB via scripting.