Blender
V3.3
|
Namespaces | |
tests | |
Classes | |
class | IDPropertyDeleter |
class | IDPropertySerializer |
Base class for (de)serializing IDProperties. More... | |
struct | DictionaryEntryParser |
Helper class for parsing DictionaryValues. More... | |
class | IDPStringSerializer |
IDPSerializer for IDP_STRING. More... | |
class | IDPIntSerializer |
IDPSerializer for IDP_INT. More... | |
class | IDPFloatSerializer |
IDPSerializer for IDP_FLOAT. More... | |
class | IDPDoubleSerializer |
IDPSerializer for IDP_DOUBLE. More... | |
class | IDPArraySerializer |
IDPSerializer for IDP_ARRAY. More... | |
class | IDPGroupSerializer |
IDPSerializer for IDP_GROUP. More... | |
class | IDPUnknownSerializer |
Dummy serializer for unknown and unsupported types. More... | |
Functions | |
std::unique_ptr< io::serialize::ArrayValue > | convert_to_serialize_values (const IDProperty *properties) |
Convert the given properties to Value objects for serialization. More... | |
IDProperty from Value | |
IDProperty * | convert_from_serialize_value (const blender::io::serialize::Value &value) |
Convert the given value to an IDProperty . More... | |
static IDProperty * | idprop_from_value (const DictionaryValue &value) |
static IDProperty * | idprop_from_value (const ArrayValue &value) |
Create Functions | |
std::unique_ptr< IDProperty, IDPropertyDeleter > | create (StringRefNull prop_name, int32_t value) |
Allocate a new IDProperty of type IDP_INT, set its name and value. More... | |
std::unique_ptr< IDProperty, IDPropertyDeleter > | create (StringRefNull prop_name, float value) |
Allocate a new IDProperty of type IDP_FLOAT, set its name and value. More... | |
std::unique_ptr< IDProperty, IDPropertyDeleter > | create (StringRefNull prop_name, double value) |
Allocate a new IDProperty of type IDP_DOUBLE, set its name and value. More... | |
std::unique_ptr< IDProperty, IDPropertyDeleter > | create (StringRefNull prop_name, const StringRefNull value) |
Allocate a new IDProperty of type IDP_STRING, set its name and value. More... | |
std::unique_ptr< IDProperty, IDPropertyDeleter > | create (StringRefNull prop_name, Span< int32_t > values) |
Allocate a new IDProperty of type IDP_ARRAY and subtype IDP_INT. More... | |
std::unique_ptr< IDProperty, IDPropertyDeleter > | create (StringRefNull prop_name, Span< float > values) |
Allocate a new IDProperty of type IDP_ARRAY and subtype IDP_FLOAT. More... | |
std::unique_ptr< IDProperty, IDPropertyDeleter > | create (StringRefNull prop_name, Span< double > values) |
Allocate a new IDProperty of type IDP_ARRAY and subtype IDP_DOUBLE. More... | |
std::unique_ptr< IDProperty, IDPropertyDeleter > | create_group (StringRefNull prop_name) |
Allocate a new IDProperty of type IDP_GROUP. More... | |
static std::unique_ptr< IDProperty, IDPropertyDeleter > | array_create (const StringRefNull prop_name, eIDPropertyType subtype, size_t array_len) |
static void | array_values_set (IDProperty *property, const void *values, size_t values_len, size_t value_size) |
template<typename PrimitiveType , eIDPropertyType id_property_subtype> | |
std::unique_ptr< IDProperty, IDPropertyDeleter > | create_array (StringRefNull prop_name, Span< PrimitiveType > values) |
IDProperty to Value | |
std::unique_ptr< ArrayValue > | convert_to_serialize_values (const struct IDProperty *properties) |
|
static |
Definition at line 47 of file idprop_create.cc.
References IDPropertyTemplate::array, blender::StringRefNull::c_str(), IDP_ARRAY, IDP_New(), and IDPropertyTemplate::len.
Referenced by create_array().
|
static |
Definition at line 58 of file idprop_create.cc.
References BLI_assert, IDP_Array, and IDProperty::len.
Referenced by create_array().
IDProperty * blender::bke::idprop::convert_from_serialize_value | ( | const blender::io::serialize::Value & | value | ) |
Convert the given value
to an IDProperty
.
Definition at line 818 of file idprop_serialize.cc.
References blender::io::serialize::Array, blender::io::serialize::Value::as_array_value(), idprop_from_value(), and blender::io::serialize::Value::type().
Referenced by blender::ed::asset::index::AssetEntryReader::add_properties_to_meta_data(), blender::bke::idprop::tests::TEST(), and blender::bke::idprop::tests::test_convert_idprop_from_value().
std::unique_ptr<io::serialize::ArrayValue> blender::bke::idprop::convert_to_serialize_values | ( | const IDProperty * | properties | ) |
Convert the given properties
to Value
objects for serialization.
IDP_ID
and IDP_IDPARRAY
are not supported and will be ignored.
UI data such as max/min will not be serialized.
Referenced by blender::ed::asset::index::AssetEntryWriter::add_properties(), blender::bke::idprop::tests::TEST(), blender::bke::idprop::tests::test_array_to_value(), blender::bke::idprop::tests::test_double_to_value(), blender::bke::idprop::tests::test_float_to_value(), blender::bke::idprop::tests::test_int_to_value(), and blender::bke::idprop::tests::test_string_to_value().
std::unique_ptr<ArrayValue> blender::bke::idprop::convert_to_serialize_values | ( | const struct IDProperty * | properties | ) |
Definition at line 752 of file idprop_serialize.cc.
References BLI_assert, blender::bke::idprop::IDPropertySerializer::idprop_to_dictionary(), IDProperty::next, result, serializer_for(), blender::bke::idprop::IDPropertySerializer::supports_serializing(), and IDProperty::type.
std::unique_ptr< IDProperty, IDPropertyDeleter > blender::bke::idprop::create | ( | StringRefNull | prop_name, |
const StringRefNull | value | ||
) |
Allocate a new IDProperty of type IDP_STRING, set its name and value.
Definition at line 40 of file idprop_create.cc.
References blender::StringRefNull::c_str(), IDP_NewString(), and blender::StringRefBase::size().
std::unique_ptr< IDProperty, IDPropertyDeleter > blender::bke::idprop::create | ( | StringRefNull | prop_name, |
double | value | ||
) |
Allocate a new IDProperty of type IDP_DOUBLE, set its name and value.
Definition at line 32 of file idprop_create.cc.
References blender::StringRefNull::c_str(), IDPropertyTemplate::d, IDP_DOUBLE, and IDP_New().
std::unique_ptr< IDProperty, IDPropertyDeleter > blender::bke::idprop::create | ( | StringRefNull | prop_name, |
float | value | ||
) |
Allocate a new IDProperty of type IDP_FLOAT, set its name and value.
Definition at line 24 of file idprop_create.cc.
References blender::StringRefNull::c_str(), IDPropertyTemplate::f, IDP_FLOAT, and IDP_New().
std::unique_ptr< IDProperty, IDPropertyDeleter > blender::bke::idprop::create | ( | StringRefNull | prop_name, |
int32_t | value | ||
) |
Allocate a new IDProperty of type IDP_INT, set its name and value.
Definition at line 16 of file idprop_create.cc.
References blender::StringRefNull::c_str(), IDPropertyTemplate::i, IDP_INT, and IDP_New().
Referenced by BKE_node_preview_verify(), PartialImageUpdater::ensure_image(), blender::bke::idprop::IDPStringSerializer::entry_to_idprop(), blender::bke::idprop::IDPIntSerializer::entry_to_idprop(), blender::bke::idprop::IDPFloatSerializer::entry_to_idprop(), blender::bke::idprop::IDPDoubleSerializer::entry_to_idprop(), imb_load_photoshop(), OIIOImageLoader::load_metadata(), OIIOImageLoader::load_pixels(), NODE_DEFINE(), ntreeInterfaceTypeGet(), TileManager::open_tile_output(), pe_get_current(), RNA_struct_idprops(), save_output(), DenoiseImage::save_output(), Freestyle::StrokeRep::StrokeRep(), blender::bke::idprop::tests::test_array_to_value(), blender::bke::idprop::tests::test_double_to_value(), blender::bke::idprop::tests::test_float_to_value(), blender::bke::idprop::tests::test_int_to_value(), blender::bke::idprop::tests::test_string_to_value(), uf_arraystore_compact_ex(), um_arraystore_cd_compact(), um_arraystore_compact_ex(), and OIIOOutputDriver::write_render_tile().
std::unique_ptr< IDProperty, IDPropertyDeleter > blender::bke::idprop::create | ( | StringRefNull | prop_name, |
Span< double > | values | ||
) |
Allocate a new IDProperty of type IDP_ARRAY and subtype IDP_DOUBLE.
values | The values will be copied into the IDProperty. |
Definition at line 110 of file idprop_create.cc.
std::unique_ptr< IDProperty, IDPropertyDeleter > blender::bke::idprop::create | ( | StringRefNull | prop_name, |
Span< float > | values | ||
) |
Allocate a new IDProperty of type IDP_ARRAY and subtype IDP_FLOAT.
values | The values will be copied into the IDProperty. |
Definition at line 104 of file idprop_create.cc.
std::unique_ptr< IDProperty, IDPropertyDeleter > blender::bke::idprop::create | ( | StringRefNull | prop_name, |
Span< int32_t > | values | ||
) |
Allocate a new IDProperty of type IDP_ARRAY and subtype IDP_INT.
values | The values will be copied into the IDProperty. |
Definition at line 98 of file idprop_create.cc.
std::unique_ptr<IDProperty, IDPropertyDeleter> blender::bke::idprop::create_array | ( | StringRefNull | prop_name, |
Span< PrimitiveType > | values | ||
) |
Create a IDProperty array of id_property_subtype
and fill it with the given values.
Definition at line 76 of file idprop_create.cc.
References array_create(), array_values_set(), BLI_assert, blender::StringRefNull::c_str(), blender::Span< T >::data(), IDP_DOUBLE, IDP_FLOAT, IDP_INT, and blender::Span< T >::size().
std::unique_ptr< IDProperty, IDPropertyDeleter > blender::bke::idprop::create_group | ( | StringRefNull | prop_name | ) |
Allocate a new IDProperty of type IDP_GROUP.
prop_name | The name of the newly created property. |
Definition at line 116 of file idprop_create.cc.
References blender::StringRefNull::c_str(), IDP_GROUP, and IDP_New().
Referenced by blender::bke::idprop::IDPGroupSerializer::entry_to_idprop().
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
Referenced by blender::bke::idprop::DictionaryEntryParser::get_array_double_value(), blender::bke::idprop::DictionaryEntryParser::get_array_float_value(), blender::bke::idprop::DictionaryEntryParser::get_array_int_value(), blender::bke::idprop::DictionaryEntryParser::get_array_value(), blender::bke::idprop::DictionaryEntryParser::get_double_value(), blender::bke::idprop::DictionaryEntryParser::get_float_value(), blender::bke::idprop::DictionaryEntryParser::get_int_value(), blender::bke::idprop::DictionaryEntryParser::get_string_value(), blender::bke::idprop::IDPStringSerializer::idprop_to_dictionary(), blender::bke::idprop::IDPIntSerializer::idprop_to_dictionary(), blender::bke::idprop::IDPFloatSerializer::idprop_to_dictionary(), blender::bke::idprop::IDPDoubleSerializer::idprop_to_dictionary(), blender::bke::idprop::IDPArraySerializer::idprop_to_dictionary(), and blender::bke::idprop::IDPGroupSerializer::idprop_to_dictionary().
|
staticconstexpr |
Referenced by serializer_for(), and blender::bke::idprop::IDPArraySerializer::type_name().
|
staticconstexpr |
Referenced by serializer_for(), and blender::bke::idprop::IDPDoubleSerializer::type_name().
|
staticconstexpr |
Referenced by serializer_for(), and blender::bke::idprop::IDPFloatSerializer::type_name().
|
staticconstexpr |
Referenced by serializer_for(), and blender::bke::idprop::IDPGroupSerializer::type_name().
|
staticconstexpr |
Referenced by serializer_for(), and blender::bke::idprop::IDPIntSerializer::type_name().
|
staticconstexpr |
Referenced by serializer_for(), and blender::bke::idprop::IDPStringSerializer::type_name().
|
staticconstexpr |
Referenced by blender::bke::idprop::IDPUnknownSerializer::type_name().
|
static |
Definition at line 788 of file idprop_serialize.cc.
References element, blender::io::serialize::ContainerValue< Container, V, ContainerItem >::elements(), idprop_from_value(), IDProperty::next, IDProperty::prev, and result.
|
static |
Definition at line 776 of file idprop_serialize.cc.
References blender::bke::idprop::IDPropertySerializer::entry_to_idprop(), blender::bke::idprop::DictionaryEntryParser::get_type(), and serializer_for().
Referenced by convert_from_serialize_value(), blender::bke::idprop::IDPGroupSerializer::entry_to_idprop(), and idprop_from_value().
|
static |
get the serializer for the given property type.
Definition at line 696 of file idprop_serialize.cc.
References BLI_assert_msg, IDP_ARRAY, IDP_DOUBLE, IDP_FLOAT, IDP_GROUP, IDP_INT, IDP_SERIALIZER_ARRAY, IDP_SERIALIZER_DOUBLE, IDP_SERIALIZER_FLOAT, IDP_SERIALIZER_GROUP, IDP_SERIALIZER_INT, IDP_SERIALIZER_STRING, IDP_SERIALIZER_UNKNOWN, and IDP_STRING.
Referenced by convert_to_serialize_values(), idprop_from_value(), blender::bke::idprop::IDPArraySerializer::idprop_to_dictionary(), and blender::bke::idprop::IDPGroupSerializer::idprop_to_dictionary().
|
static |
get serializer for the given typename.
Definition at line 724 of file idprop_serialize.cc.
References IDP_PROPERTY_TYPENAME_ARRAY(), IDP_PROPERTY_TYPENAME_DOUBLE(), IDP_PROPERTY_TYPENAME_FLOAT(), IDP_PROPERTY_TYPENAME_GROUP(), IDP_PROPERTY_TYPENAME_INT(), IDP_PROPERTY_TYPENAME_STRING(), IDP_SERIALIZER_ARRAY, IDP_SERIALIZER_DOUBLE, IDP_SERIALIZER_FLOAT, IDP_SERIALIZER_GROUP, IDP_SERIALIZER_INT, IDP_SERIALIZER_STRING, and IDP_SERIALIZER_UNKNOWN.
|
staticconstexpr |
Definition at line 691 of file idprop_serialize.cc.
Referenced by serializer_for().
|
staticconstexpr |
Definition at line 690 of file idprop_serialize.cc.
Referenced by serializer_for().
|
staticconstexpr |
Definition at line 689 of file idprop_serialize.cc.
Referenced by serializer_for().
|
staticconstexpr |
Definition at line 692 of file idprop_serialize.cc.
Referenced by serializer_for().
|
staticconstexpr |
Definition at line 688 of file idprop_serialize.cc.
Referenced by serializer_for().
|
staticconstexpr |
Definition at line 687 of file idprop_serialize.cc.
Referenced by serializer_for().
|
staticconstexpr |
Definition at line 693 of file idprop_serialize.cc.
Referenced by serializer_for().