diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-07 09:19:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-07 09:38:48 +0300 |
commit | ffc4c126f5416b04a01653e7a03451797b98aba4 (patch) | |
tree | ac63d70d33aae5ab1666c9c2f62058c9c1eebd5c /source/blender/blenkernel/intern/cryptomatte.cc | |
parent | f159d49f56cedccd509ee93f5a5fb51f4f39eeb8 (diff) |
Cleanup: move public doc-strings into headers for 'blenkernel'
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
Diffstat (limited to 'source/blender/blenkernel/intern/cryptomatte.cc')
-rw-r--r-- | source/blender/blenkernel/intern/cryptomatte.cc | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/cryptomatte.cc b/source/blender/blenkernel/intern/cryptomatte.cc index 1ff0ca92306..02fba2aa5a4 100644 --- a/source/blender/blenkernel/intern/cryptomatte.cc +++ b/source/blender/blenkernel/intern/cryptomatte.cc @@ -212,7 +212,6 @@ float BKE_cryptomatte_hash_to_float(uint32_t cryptomatte_hash) return blender::bke::cryptomatte::CryptomatteHash(cryptomatte_hash).float_encoded(); } -/* Find an ID in the given main that matches the given encoded float. */ bool BKE_cryptomatte_find_name(const CryptomatteSession *session, const float encoded_hash, char *r_name, @@ -489,10 +488,6 @@ std::string BKE_cryptomatte_meta_data_key(const StringRef layer_name, const Stri return "cryptomatte/" + cryptomatte_layer_name_hash(layer_name) + "/" + key_name; } -/* Extracts the cryptomatte name from a render pass name. - * - * Example: A render pass could be named `CryptoObject00`. This - * function would remove the trailing digits and return `CryptoObject`. */ StringRef BKE_cryptomatte_extract_layer_name(const StringRef render_pass_name) { int64_t last_token = render_pass_name.size(); @@ -525,16 +520,6 @@ std::string CryptomatteHash::hex_encoded() const return encoded.str(); } -/* Convert a cryptomatte hash to a float. - * - * Cryptomatte hashes are stored in float textures and images. The conversion is taken from the - * cryptomatte specification. See Floating point conversion section in - * https://github.com/Psyop/Cryptomatte/blob/master/specification/cryptomatte_specification.pdf. - * - * The conversion uses as many 32 bit floating point values as possible to minimize hash - * collisions. Unfortunately not all 32 bits can be used as NaN and Inf can be problematic. - * - * Note that this conversion assumes to be running on a L-endian system. */ float CryptomatteHash::float_encoded() const { uint32_t mantissa = hash & ((1 << 23) - 1); @@ -626,7 +611,6 @@ void CryptomatteStampDataCallbackData::extract_layer_names(void *_data, data->hash_to_layer_name.add(layer_hash, propvalue); } -/* C type callback function (StampCallback). */ void CryptomatteStampDataCallbackData::extract_layer_manifest(void *_data, const char *propname, char *propvalue, |