Skip to main content
Inspiring
Apr 4, 2023 9:42 AM UTC
Question

Turn "preserveRGB" on on a footage item using extendscript

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.

11 replies

Inspiring
Dec 23, 2023 8:58 PM UTC

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.

Translate
Inspiring
Dec 23, 2023 8:59 PM UTC

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", *

Translate
ConstantinMaier
Inspiring
Dec 24, 2023 2:28 AM UTC

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?

Translate
Dan Ebberts
Community Expert
Community Expert
Apr 4, 2023 9:26 PM UTC

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

Translate
Marvin01Author
Inspiring
Apr 5, 2023 10:14 AM UTC

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?

Translate
Dan Ebberts
Community Expert
Community Expert
Apr 5, 2023 3:52 PM UTC

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

Translate