We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
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?
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:
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.
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/).
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.
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.