This PR adds support for custom output drivers, and is working properly in Houdini Solaris.
We're adding 2 parameters to the cryptomatte shader, that are meant to be used internally and not exposed to the user.
custom_output_driver : This parameter tells cryptomatte that other drivers than driver_exr need to be considered as valid output drivers. The changes for that are
The test done in check_driver will return true in that case, whatever the driver type is.
When setting/getting parameters that usually exist in driver_exr (half_precision, filename, custom_attributes, compression), we first check if the parameter exists in the driver.
We want metadatas to be authored in the driver. If custom_attributes doesn't exist as an attribute, we create it as a user data
create_depth_outputs : currently the cryptomatte shader creates new outputs on the fly, depending on the depth attribute. But in some use cases, the scene could already setup these AOVs, and wouldn't want cryptomatte to change the outputs on the fly (which is not a great workflow, a simple shader isn't supposed to change global settings). When this attribute is disabled, we just skip the creation of new outputs. Note that we still need to call AiAOVRegister and to set the name of the "rank" AOV in the crypto_aovs array.
These 2 attributes have defaults that don't change the current behaviour, so adding them isn't supposed to break anything.
This PR adds support for custom output drivers, and is working properly in Houdini Solaris. We're adding 2 parameters to the cryptomatte shader, that are meant to be used internally and not exposed to the user.
custom_output_driver
: This parameter tells cryptomatte that other drivers thandriver_exr
need to be considered as valid output drivers. The changes for that arecheck_driver
will return true in that case, whatever the driver type is.driver_exr
(half_precision, filename, custom_attributes, compression), we first check if the parameter exists in the driver.custom_attributes
doesn't exist as an attribute, we create it as a user datacreate_depth_outputs
: currently the cryptomatte shader creates new outputs on the fly, depending on the depth attribute. But in some use cases, the scene could already setup these AOVs, and wouldn't want cryptomatte to change the outputs on the fly (which is not a great workflow, a simple shader isn't supposed to change global settings). When this attribute is disabled, we just skip the creation of new outputs. Note that we still need to callAiAOVRegister
and to set the name of the "rank" AOV in the crypto_aovs array.These 2 attributes have defaults that don't change the current behaviour, so adding them isn't supposed to break anything.