Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Scripting access to Cryptomatte

Explorer ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

Hello,

since I could not find anything about Cryptomatte in the documentation, I try it here: I would like to write a script for the Cryptomatte effect so I get a masked composition for every Cryptomatte object saved in a multi-layered EXR. I have already written a similar script working with RGB mattes, now I would like to do the same with Cryptomattes - I just cannot find if there is a scripting access and if so, how it works.

I have already found out that the Output value is managed with a number - but for some reason it seems to be readOnly and cannot be set by script. Is that true? With the settings object I was not able to get anything in or out by script without the proper syntax...

Has anyone more knowledge about this topic?

 

Thanks,

Bob

TOPICS
Scripting

Views

732

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jan 17, 2020 Jan 17, 2020
In the meantime I have contacted the creators of the ProEXR plugin directly. They were very (!) supportive and fast and provided me with an updated EXR plugin. Thanks again! They confirmed that the Cryptomatte settings cannot be scripted, because Adobe provides no suitable data type to use in that case.If anybody else is interested in getting automatic creation of compositions from Cryptomatte IDs, please contact fnordware directly (https://www.fnordware.com/about/). Thanks,Bob

Likes

Translate

Translate
Adobe Community Professional ,
Jan 15, 2020 Jan 15, 2020

Copy link to clipboard

Copied

I don't think it's possible to change the settings as the propertyType is a custom one, when trying to access the settings you get:

After Effects error: Can not get or set a value from this property (matchname is “Cryptomatte-0001”). This propertyValueType CUSTOM_VALUE has not been implemented.

 You can, however, change the output like this:

layer.property('Effects').property('Cryptomatte').property('Output').setValue(1)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 15, 2020 Jan 15, 2020

Copy link to clipboard

Copied

Thanks for your reply, yes, at least this one property works this way. Unfortunately this does not suffice to create the masks automatically. So I guess I have only two options: Do the tasks manually, which is very tedious and will kill quite some time, or write a feature request and wait only a few decades... 😉

If somebody still manages to see another option, please let me know.

 

Thanks,

Bob

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 17, 2020 Jan 17, 2020

Copy link to clipboard

Copied

In the meantime I have contacted the creators of the ProEXR plugin directly. They were very (!) supportive and fast and provided me with an updated EXR plugin. Thanks again! They confirmed that the Cryptomatte settings cannot be scripted, because Adobe provides no suitable data type to use in that case.

If anybody else is interested in getting automatic creation of compositions from Cryptomatte IDs, please contact fnordware directly (https://www.fnordware.com/about/).

 

Thanks,

Bob

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 11, 2021 May 11, 2021

Copy link to clipboard

Copied

The Cryptomatte data is all stored in a custom parameter, which is not accessible via scripting, unfortunately. If you import an EXR as a Composition, the Cryptomatte plug-in will be set up for you, but only one copy and without anything selected. The set up is done using the OpenEXR C++ plug-in, and only a plug-in like that could get the info from the EXR sequence and set up a bunch of Cryptomatte instances for you.

 

In general, making a matte for each individual object is an un-Cryptomatte thing to do. The Cryptomatte workflow is supposed to be that you click on a bunch of objects to make a matte for a specific purpose. You could have a file with thousands of objects and you probably don't want a separate matte for each one.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 12, 2021 May 12, 2021

Copy link to clipboard

Copied

LATEST

Thanks for clearing that up.

So, I am using it wrong. 🙂 I totally agree that it should be just an option and not the standard. In my specific case I have about 30 carefully prepared mattes in the whole scene (mostly screens that should get replaced often in post). That is just enough to become really annoying to do manually.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines