|
Blender V5.3
|
#include <RNA_path.hh>
Public Member Functions | |
| int64_t | hash () const |
Public Attributes | |
| std::string | path |
| std::optional< std::string > | key = std::nullopt |
| std::optional< int > | index = std::nullopt |
An RNA path to a property, including an optional key/index for array and collection properties.
The semantics around the key and index fields are specific:
This type is intended to be convenient to construct with initializer lists:
NOTE: some older parts of Blender's code base use negative array indices as a magic value to mean things like "all array elements". However, magic values should specifically NOT be used in this type. Instead, simply leave the index unspecified. Unspecified indices can then be converted to a negative magic value at the API boundaries that need it, like so:
Definition at line 67 of file RNA_path.hh.
| int64_t blender::RNAPath::hash | ( | ) | const |
Definition at line 41 of file rna_path.cc.
References blender::get_default_hash(), index, key, and path.
| std::optional<int> blender::RNAPath::index = std::nullopt |
Definition at line 75 of file RNA_path.hh.
Referenced by hash(), and blender::operator==().
| std::optional<std::string> blender::RNAPath::key = std::nullopt |
Key/index for array and collection properties. Any combination of index and key can be specified (including neither). In the case that both are specified, they should be redundant ways to access the same element.
Definition at line 74 of file RNA_path.hh.
Referenced by hash(), and blender::operator==().
| std::string blender::RNAPath::path |
Definition at line 68 of file RNA_path.hh.
Referenced by hash(), and blender::operator==().