|
Blender V5.0
|
#include <memory>#include "DNA_ID.h"#include "DNA_ID_enums.h"#include "BLI_compiler_attrs.h"#include "BLI_function_ref.hh"#include "BLI_span.hh"#include "BLI_string_ref.hh"#include "BLI_sys_types.h"#include "BLI_vector_set.hh"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::io |
| namespace | blender::io::serialize |
| namespace | blender::bke |
| namespace | blender::bke::idprop |
Macros | |
| #define | IDP_int_get(prop) |
| #define | IDP_int_set(prop, value) |
| #define | IDP_bool_get(prop) |
| #define | IDP_bool_set(prop, value) |
| #define | IDP_int_or_bool_get(prop) |
| #define | IDP_int_or_bool_set(prop, value) |
| #define | IDP_float_get(prop) |
| #define | IDP_float_set(prop, value) |
| #define | IDP_double_get(prop) |
| #define | IDP_double_set(prop, value) |
| #define | IDP_array_voidp_get(prop) |
| #define | IDP_array_int_get(prop) |
| #define | IDP_array_bool_get(prop) |
| #define | IDP_array_float_get(prop) |
| #define | IDP_array_double_get(prop) |
| #define | IDP_property_array_get(prop) |
| #define | IDP_string_get(prop) |
| #define | IDP_ID_get(prop) |
| #define | IDP_BlendDataRead(reader, prop) |
Typedefs | |
| using | IDPWalkFunc = void (*)(void *user_data, IDProperty *idp) |
Enumerations | |
| enum | eIDPropertyUIDataType { IDP_UI_DATA_TYPE_UNSUPPORTED = -1 , IDP_UI_DATA_TYPE_INT = 0 , IDP_UI_DATA_TYPE_FLOAT = 1 , IDP_UI_DATA_TYPE_STRING = 2 , IDP_UI_DATA_TYPE_ID = 3 , IDP_UI_DATA_TYPE_BOOLEAN = 4 } |
| #define IDP_array_bool_get | ( | prop | ) |
Definition at line 355 of file BKE_idprop.hh.
Referenced by BPy_IDArray_GetItem(), BPy_IDArray_SetItem(), BPy_IDArray_slice(), BPy_IDGroup_MapDataToPy(), idp_from_PySequence_Fast(), property_boolean_get_array(), and RNA_property_boolean_set_array().
| #define IDP_array_double_get | ( | prop | ) |
Definition at line 359 of file BKE_idprop.hh.
Referenced by BPy_IDArray_GetItem(), BPy_IDArray_SetItem(), BPy_IDArray_slice(), BPy_IDGroup_MapDataToPy(), idp_from_PySequence_Fast(), blender::bke::idprop::IDPArraySerializer::idprop_to_dictionary(), blender::nodes::old_id_property_type_matches_socket_convert_to_new_float_vec(), property_float_get_array(), RNA_property_float_set_array(), blender::bke::idprop::tests::test_idprop(), and version_idproperty_move_data_float().
| #define IDP_array_float_get | ( | prop | ) |
Definition at line 357 of file BKE_idprop.hh.
Referenced by BPy_IDArray_GetItem(), BPy_IDArray_SetItem(), BPy_IDArray_slice(), BPy_IDGroup_MapDataToPy(), blender::bke::idprop::IDPArraySerializer::idprop_to_dictionary(), blender::nodes::old_id_property_type_matches_socket_convert_to_new_float_vec(), proj_paint_state_viewport_init(), property_float_get_array(), RNA_property_float_set_array(), blender::bke::idprop::tests::test_idprop(), version_idproperty_move_data_float(), and view3d_ob_drop_on_enter().
| #define IDP_array_int_get | ( | prop | ) |
Definition at line 353 of file BKE_idprop.hh.
Referenced by BPy_IDArray_GetItem(), BPy_IDArray_SetItem(), BPy_IDArray_slice(), BPy_IDGroup_MapDataToPy(), idp_from_PySequence_Fast(), blender::bke::idprop::IDPArraySerializer::idprop_to_dictionary(), blender::nodes::old_id_property_type_matches_socket_convert_to_new_float_vec(), property_boolean_get_array(), property_int_get_array(), RNA_property_boolean_set_array(), RNA_property_int_set_array(), blender::bke::idprop::tests::test_idprop(), and version_idproperty_move_data_int().
| #define IDP_array_voidp_get | ( | prop | ) |
Use when the type of the array is not known.
Avoid using this where possible.
Definition at line 351 of file BKE_idprop.hh.
Referenced by blender::bke::idprop::array_values_set(), BPy_IDArray_ass_slice(), BPy_IDArray_getbuffer(), IDP_EqualsProperties_ex(), idp_from_PySequence_Buffer(), idp_from_PySequence_Fast(), blender::bke::idprop::IDPArraySerializer::idprop_to_dictionary(), and blender::nodes::init_socket_cpp_value_from_property().
| #define IDP_BlendDataRead | ( | reader, | |
| prop ) |
Definition at line 411 of file BKE_idprop.hh.
Referenced by BKE_asset_metadata_read(), BKE_collection_blend_read_data(), BKE_pose_blend_read_data(), BKE_screen_view3d_shading_blend_read_data(), BKE_time_markers_blend_read(), BKE_view_layer_blend_read_data(), blender::blend_read(), direct_link_bone_collection(), direct_link_bones(), direct_link_id_common(), direct_link_keymapitem(), blender::bke::direct_link_node_socket(), direct_link_region(), blender::bke::node_interface::item_types::item_read_data(), blender::bke::node_tree_blend_read_data(), read_userdef(), scene_blend_read_data(), blender::seq::strip_read_data_cb(), and workspace_blend_read_data().
| #define IDP_bool_get | ( | prop | ) |
Definition at line 309 of file BKE_idprop.hh.
Referenced by blender::ed::object::geometry_nodes_input_attribute_toggle_exec(), IDP_coerce_to_double_or_zero(), IDP_coerce_to_float_or_zero(), IDP_coerce_to_int_or_zero(), IDP_EqualsProperties_ex(), idp_repr_fn_recursive(), idprop_py_from_idp_bool(), blender::bke::idprop::IDPBoolSerializer::idprop_to_dictionary(), blender::nodes::init_socket_cpp_value_from_property(), blender::nodes::input_attribute_name_get(), blender::nodes::old_id_property_type_matches_socket_convert_to_new(), property_boolean_get(), and blender::io::hydra::vt_value().
| #define IDP_bool_set | ( | prop, | |
| value ) |
Definition at line 310 of file BKE_idprop.hh.
Referenced by blender::ed::object::geometry_nodes_input_attribute_toggle_exec(), idp_from_PyBool(), blender::nodes::old_id_property_type_matches_socket_convert_to_new(), RNA_property_boolean_set(), RNA_property_boolean_set_array(), and blender::nodes::update_input_properties_from_node_tree().
| #define IDP_double_get | ( | prop | ) |
Definition at line 337 of file BKE_idprop.hh.
Referenced by IDP_coerce_to_double_or_zero(), IDP_coerce_to_float_or_zero(), IDP_coerce_to_int_or_zero(), IDP_EqualsProperties_ex(), idp_repr_fn_recursive(), idprop_py_from_idp_double(), blender::bke::idprop::IDPDoubleSerializer::idprop_to_dictionary(), blender::nodes::init_socket_cpp_value_from_property(), blender::nodes::old_id_property_type_matches_socket_convert_to_new(), property_float_get(), blender::bke::idprop::tests::test_idprop(), and blender::io::hydra::vt_value().
| #define IDP_double_set | ( | prop, | |
| value ) |
Definition at line 338 of file BKE_idprop.hh.
Referenced by idp_from_PyFloat(), idp_from_PyLong(), RNA_property_float_set(), RNA_property_float_set_array(), and blender::ed::object::shade_auto_smooth_exec().
| #define IDP_float_get | ( | prop | ) |
Definition at line 328 of file BKE_idprop.hh.
Referenced by IDP_coerce_to_double_or_zero(), IDP_coerce_to_float_or_zero(), IDP_coerce_to_int_or_zero(), IDP_EqualsProperties_ex(), idp_repr_fn_recursive(), idprop_py_from_idp_float(), blender::bke::idprop::IDPFloatSerializer::idprop_to_dictionary(), blender::nodes::init_socket_cpp_value_from_property(), blender::nodes::old_id_property_type_matches_socket_convert_to_new(), property_float_get(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::idprop::tests::test_idprop(), version_cycles_property_float(), and blender::io::hydra::vt_value().
| #define IDP_float_set | ( | prop, | |
| value ) |
Definition at line 329 of file BKE_idprop.hh.
Referenced by camera_write_cycles_compatibility_data_create(), idp_from_PyFloat(), idp_from_PyLong(), blender::nodes::old_id_property_type_matches_socket_convert_to_new(), RNA_property_float_set(), RNA_property_float_set_array(), and blender::ed::object::shade_auto_smooth_exec().
| #define IDP_ID_get | ( | prop | ) |
Definition at line 366 of file BKE_idprop.hh.
Referenced by IDP_AssignID(), IDP_CopyID(), IDP_EqualsProperties_ex(), IDP_FreePropertyContent_ex(), IDP_New(), idprop_ui_data_to_dict_id(), blender::nodes::init_socket_cpp_value_from_property(), blender::nodes::old_id_property_type_matches_socket_convert_to_new(), property_pointer_get(), blender::ed::geometry::replace_inputs_evaluated_data_blocks(), and blender::bke::tests::TEST_F().
| #define IDP_int_get | ( | prop | ) |
Definition at line 300 of file BKE_idprop.hh.
Referenced by blender::ed::geometry::build_catalog_tree(), blender::ed::object::build_catalog_tree(), blender::ed::space_node::build_catalog_tree(), blender::ed::object::geometry_nodes_input_attribute_toggle_exec(), IDP_coerce_to_double_or_zero(), IDP_coerce_to_float_or_zero(), IDP_coerce_to_int_or_zero(), IDP_EnumItemFind(), IDP_EqualsProperties_ex(), idp_repr_fn_recursive(), idprop_py_from_idp_int(), blender::bke::idprop::IDPIntSerializer::idprop_to_dictionary(), blender::nodes::init_socket_cpp_value_from_property(), blender::nodes::input_attribute_name_get(), keymap_update_brushes_handle_add_item(), keymap_update_brushes_handle_remove_item(), blender::ed::space_node::node_group_drop_poll(), blender::nodes::old_id_property_type_matches_socket_convert_to_new(), blender::nodes::old_id_property_type_matches_socket_convert_to_new_int(), property_enum_get(), property_int_get(), blender::ed::geometry::run_node_group_depends_on_cursor(), blender::ed::space_node::search_link_ops_for_asset_metadata(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::idprop::tests::test_idprop(), version_cycles_property_int(), view3d_geometry_nodes_drop_poll(), and blender::io::hydra::vt_value().
| #define IDP_int_or_bool_get | ( | prop | ) |
Definition at line 318 of file BKE_idprop.hh.
Referenced by property_boolean_get().
| #define IDP_int_or_bool_set | ( | prop, | |
| value ) |
Definition at line 320 of file BKE_idprop.hh.
Referenced by RNA_property_boolean_set().
| #define IDP_int_set | ( | prop, | |
| value ) |
Definition at line 301 of file BKE_idprop.hh.
Referenced by BKE_keyconfig_pref_set_select_mouse(), camera_write_cycles_compatibility_data_create(), blender::ed::object::geometry_nodes_input_attribute_toggle_exec(), IDP_DirectLinkProperty(), idp_from_PyBool(), idp_from_PyLong(), blender::nodes::old_id_property_type_matches_socket_convert_to_new_int(), RNA_property_boolean_set_array(), RNA_property_enum_set(), RNA_property_int_set(), RNA_property_int_set_array(), and version_cycles_property_int_set().
| #define IDP_property_array_get | ( | prop | ) |
Definition at line 361 of file BKE_idprop.hh.
Referenced by BPy_IDGroup_MapDataToPy(), IDP_EqualsProperties_ex(), IDP_foreach_property(), idprop_py_from_idp_idparray(), rna_idp_path(), RNA_property_collection_begin(), RNA_property_collection_clear(), RNA_property_collection_move(), and RNA_property_collection_remove().
| #define IDP_string_get | ( | prop | ) |
Definition at line 364 of file BKE_idprop.hh.
Referenced by blender::nodes::find_output_attributes_to_store(), blender::ed::geometry::gather_input_ids(), IDP_AssignStringMaxSize(), IDP_EqualsProperties_ex(), IDP_New(), IDP_NewStringMaxSize(), idp_repr_fn_recursive(), idprop_py_from_idp_string(), blender::bke::idprop::IDPStringSerializer::idprop_to_dictionary(), blender::imbuf::imb_create_write_spec(), IMB_metadata_foreach(), IMB_metadata_get_field(), blender::nodes::init_socket_cpp_value_from_property(), blender::nodes::initialize_group_input(), blender::nodes::input_attribute_name_get(), keymap_update_brushes_handle_add_item(), blender::nodes::old_id_property_type_matches_socket_convert_to_new_string(), openexr_header_metadata_global(), property_string_get(), property_string_length_storage(), blender::ed::space_node::search_link_ops_for_asset_metadata(), blender::bke::idprop::tests::test_idprop(), version_bonelayers_to_bonecollections(), version_idproperty_move_data_string(), version_idproperty_ui_data(), version_mesh_crease_generic(), and write_jpeg().
| using IDPWalkFunc = void (*)(void *user_data, IDProperty *idp) |
Definition at line 119 of file BKE_idprop.hh.
Definition at line 413 of file BKE_idprop.hh.
| const IDProperty * _IDP_assert_type | ( | const IDProperty * | prop, |
| char | ty ) |
Definition at line 1983 of file idprop.cc.
References BLI_assert, and IDProperty::type.
| const IDProperty * _IDP_assert_type_and_subtype | ( | const IDProperty * | prop, |
| char | ty, | ||
| char | sub_ty ) |
Definition at line 1988 of file idprop.cc.
References BLI_assert, IDProperty::subtype, and IDProperty::type.
| const IDProperty * _IDP_assert_type_mask | ( | const IDProperty * | prop, |
| int | ty_mask ) |
Definition at line 1996 of file idprop.cc.
References BLI_assert, and IDProperty::type.
| bool IDP_AddToGroup | ( | IDProperty * | group, |
| IDProperty * | prop ) |
This function has a sanity check to make sure ID properties with the same name don't get added to the group.
The sanity check just means the property is not added to the group if another property exists with the same name; the client code using ID properties then needs to detect this (the function that adds new properties to groups, IDP_AddToGroup, returns false if a property can't be added to the group, and true if it can) and free the property.
Definition at line 717 of file idprop.cc.
References BLI_addtail(), BLI_assert, IDPropertyData::children_map, IDProperty::data, IDPropertyData::group, IDP_GROUP, idp_group_children_map_ensure(), IDProperty::len, and IDProperty::type.
Referenced by BKE_keyconfig_pref_set_select_mouse(), camera_write_cycles_compatibility_data_create(), blender::bke::create_auto_smooth_modifier(), blender::io::usd::ensure_usd_source_path_prop(), blender::bke::idprop::IDPGroupSerializer::entry_to_idprop(), IDP_CopyGroup(), IDP_MergeGroup_ex(), IDP_ReplaceInGroup_ex(), blender::bke::tests::IDSubDataTestData::IDSubDataTestData(), IMB_metadata_set_field(), keymap_update_brushes_handle_add_item(), keymap_update_brushes_handle_remove_item(), blender::bke::node_update_asset_metadata(), operator_last_properties_init_impl(), blender::io::fbx::read_ufbx_property(), blender::ed::geometry::replace_strings_with_id_pointers(), RNA_property_boolean_set(), RNA_property_boolean_set_array(), RNA_property_collection_add(), RNA_property_enum_set(), RNA_property_float_set(), RNA_property_float_set_array(), RNA_property_int_set(), RNA_property_int_set_array(), RNA_property_pointer_add(), RNA_property_string_set(), RNA_property_string_set_bytes(), blender::io::usd::set_bool_prop(), blender::io::usd::set_double_prop(), blender::io::usd::set_float_prop(), blender::io::usd::set_int_prop(), blender::io::usd::set_string_prop(), shortcut_get_operator_property(), shortcut_property_from_rna(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST_F(), texture_paint_image_from_view_exec(), ui_but_event_operator_string_from_menu(), ui_but_event_operator_string_from_panel(), ui_but_event_property_operator_string(), blender::nodes::update_input_properties_from_node_tree(), blender::nodes::update_output_properties_from_node_tree(), version_cycles_property_int_set(), and version_geometry_nodes_add_attribute_input_settings().
| void IDP_AppendArray | ( | IDProperty * | prop, |
| IDProperty * | item ) |
Definition at line 137 of file idprop.cc.
References BLI_assert, IDP_IDPARRAY, IDP_ResizeIDPArray(), IDP_SetIndexArray(), IDProperty::len, and IDProperty::type.
Referenced by BPy_IDProperty_Map_ValidateAndCreate(), and RNA_property_collection_add().
| void IDP_AssignID | ( | IDProperty * | prop, |
| ID * | id, | ||
| int | flag ) |
| flag | the ID creation/copying flags (LIB_ID_CREATE_...), same as passed to BKE_id_copy_ex. |
Definition at line 546 of file idprop.cc.
References BLI_assert, IDProperty::data, flag, ID::flag, ID_FLAG_EMBEDDED_DATA, id_us_min(), id_us_plus(), IDP_ID, IDP_ID_get, LIB_ID_CREATE_NO_USER_REFCOUNT, IDPropertyData::pointer, and IDProperty::type.
Referenced by idp_from_DatablockPointer(), and RNA_property_pointer_set().
| void IDP_AssignString | ( | IDProperty * | prop, |
| const char * | st ) |
Definition at line 439 of file idprop.cc.
References IDP_AssignStringMaxSize().
Referenced by blender::nodes::attribute_search_exec_fn(), collection_exporter_copy(), IMB_metadata_set_field(), blender::nodes::layer_name_search_exec_fn(), blender::nodes::old_id_property_type_matches_socket_convert_to_new_string(), and version_mesh_crease_generic().
| void IDP_AssignStringMaxSize | ( | IDProperty * | prop, |
| const char * | st, | ||
| size_t | st_maxncpy ) |
| st | The string to assign. Doesn't need to be null terminated when clamped by maxncpy. |
| maxncpy | The maximum size of the string (including the \0 terminator). When zero, this is the equivalent of passing in strlen(st) + 1 |
Definition at line 421 of file idprop.cc.
References BLI_assert, BLI_strnlen(), IDProperty::data, IDP_ResizeArray(), IDP_STRING, IDP_string_get, IDP_STRING_SUB_BYTE, IDPropertyData::pointer, IDProperty::subtype, and IDProperty::type.
Referenced by IDP_AssignString(), idp_from_PyBytes(), idp_from_PyUnicode(), RNA_property_string_set(), blender::nodes::update_input_properties_from_node_tree(), and blender::nodes::update_output_properties_from_node_tree().
| void IDP_BlendReadData_impl | ( | BlendDataReader * | reader, |
| IDProperty ** | prop, | ||
| const char * | caller_func_id ) |
Definition at line 1675 of file idprop.cc.
References IDP_DirectLinkGroup(), IDP_GROUP, and printf.
| void IDP_BlendWrite | ( | BlendWriter * | writer, |
| const IDProperty * | prop ) |
Definition at line 1461 of file idprop.cc.
References BLO_write_struct, and IDP_WriteProperty_OnlyData().
Referenced by BKE_asset_metadata_write(), BKE_collection_blend_write_nolib(), BKE_id_blend_write(), BKE_pose_blend_write(), BKE_screen_view3d_shading_blend_write(), BKE_time_markers_blend_write(), BKE_view_layer_blend_write(), blender::blend_write(), IDP_WriteArray(), IDP_WriteGroup(), blender::bke::node_interface::item_types::item_write_data(), blender::bke::node_tree_blend_write(), blender::seq::strip_write_data_cb(), workspace_blend_write(), write_bone(), write_bone_collection(), write_keymapitem(), blender::bke::write_node_socket(), write_uilist(), and write_userdef().
| void IDP_ClearProperty | ( | IDProperty * | prop | ) |
Definition at line 1257 of file idprop.cc.
References IDProperty::data, IDP_FreePropertyContent(), IDProperty::len, IDPropertyData::pointer, and IDProperty::totallen.
Referenced by blo_update_defaults_scene(), BPy_IDGroup_clear(), IDP_Reset(), IDP_ResizeIDPArray(), WM_gizmo_properties_clear(), and WM_operator_properties_clear().
| double IDP_coerce_to_double_or_zero | ( | const IDProperty * | prop | ) |
Return a double from an IDProperty with a compatible type. This should be avoided, but it's sometimes necessary, for example when legacy files have incorrect property types.
Definition at line 813 of file idprop.cc.
References IDP_bool_get, IDP_BOOLEAN, IDP_DOUBLE, IDP_double_get, IDP_FLOAT, IDP_float_get, IDP_INT, IDP_int_get, and IDProperty::type.
Referenced by version_idproperty_move_data_float().
| float IDP_coerce_to_float_or_zero | ( | const IDProperty * | prop | ) |
Return a float from an IDProperty with a compatible type. This should be avoided, but it's sometimes necessary, for example when legacy files have incorrect property types.
Definition at line 829 of file idprop.cc.
References float, IDP_bool_get, IDP_BOOLEAN, IDP_DOUBLE, IDP_double_get, IDP_FLOAT, IDP_float_get, IDP_INT, IDP_int_get, and IDProperty::type.
Referenced by version_idproperty_move_data_float().
| int IDP_coerce_to_int_or_zero | ( | const IDProperty * | prop | ) |
Return an int from an IDProperty with a compatible type. This should be avoided, but it's sometimes necessary, for example when legacy files have incorrect property types.
Definition at line 797 of file idprop.cc.
References IDP_bool_get, IDP_BOOLEAN, IDP_DOUBLE, IDP_double_get, IDP_FLOAT, IDP_float_get, IDP_INT, IDP_int_get, and IDProperty::type.
Referenced by version_idproperty_move_data_float(), and version_idproperty_move_data_int().
| IDProperty * IDP_CopyIDPArray | ( | const IDProperty * | array, |
| int | flag ) |
| flag | the ID creation/copying flags (LIB_ID_CREATE_...), same as passed to BKE_id_copy_ex. |
Definition at line 77 of file idprop.cc.
References BLI_assert, array< T, alignment >::data(), IDProperty::data, flag, GETPROP, i, IDP_CopyProperty_ex(), IDP_IDPARRAY, IDProperty::len, MEM_dupallocN(), MEM_freeN(), MEM_mallocN(), and IDPropertyData::pointer.
Referenced by IDP_CopyProperty_ex().
| IDProperty * IDP_CopyProperty | ( | const IDProperty * | prop | ) |
Definition at line 863 of file idprop.cc.
References IDP_CopyProperty_ex().
Referenced by BKE_pose_channel_copy_data(), BKE_scene_duplicate(), camera_write_cycles_compatibility_data_create(), collection_exporter_copy(), blender::ed::object::collection_exporter_export(), copy_pchan(), ED_armature_from_edit(), ed_marker_duplicate_apply(), ED_screen_user_menu_item_add_operator(), fcurves_to_pchan_links_get(), IDP_CopyPropertyContent(), IDP_ReplaceGroupInGroup(), IDP_SyncGroupTypes(), IDP_SyncGroupValues(), IMB_metadata_copy(), blender::bke::greasepencil::convert::legacy_gpencil_to_grease_pencil(), make_boneList_recursive(), operator_last_properties_init_impl(), pose_backup_create(), pose_bone_do_paste(), blender::ed::geometry::replace_strings_with_id_pointers(), scene_copy_data(), shortcut_get_operator_property(), uiDefSearchButO_ptr(), version_make_socket_stub(), view3d_duplicate(), wm_gizmo_create(), wm_keymap_item_copy(), wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), WM_keymap_item_restore_to_default(), wm_operator_close_file_dialog_if_needed(), wm_operator_create(), WM_operator_last_properties_store(), WM_operator_name_call_ptr_with_depends_on_cursor(), wm_save_file_overwrite_dialog(), WM_toolsystem_ref_properties_init_for_keymap(), and wm_xr_actionmap_item_copy().
| IDProperty * IDP_CopyProperty_ex | ( | const IDProperty * | prop, |
| int | flag ) |
| flag | the ID creation/copying flags (LIB_ID_CREATE_...), same as passed to BKE_id_copy_ex. |
Definition at line 845 of file idprop.cc.
References flag, IDP_ARRAY, IDP_CopyArray(), IDP_CopyGroup(), IDP_CopyID(), IDP_CopyIDPArray(), IDP_CopyString(), idp_generic_copy(), IDP_GROUP, IDP_ID, IDP_IDPARRAY, IDP_STRING, and IDProperty::type.
Referenced by blender::animrig::ANIM_bonecoll_array_copy_no_membership(), BKE_copy_time_markers(), BKE_libblock_copy_in_lib(), BKE_pose_copy_data_ex(), BKE_view_layer_copy_data(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), copy_and_update_ownership(), copy_bone_collection(), copy_bonechildren(), blender::copy_data(), ED_armature_ebone_listbase_copy(), IDP_CopyArray(), IDP_CopyGroup(), IDP_CopyIDPArray(), IDP_CopyProperty(), IDP_MergeGroup_ex(), idprops_process(), blender::bke::node_interface::item_types::item_copy(), join_armature_remap_collection(), blender::bke::node_copy_with_mapping(), blender::bke::node_socket_copy(), remove_in_and_out_node_panel_recursive(), blender::seq::strip_duplicate(), and version_copy_socket().
| void IDP_CopyPropertyContent | ( | IDProperty * | dst, |
| const IDProperty * | src ) |
Copy content from source IDProperty into destination one, freeing destination property's content first.
Definition at line 868 of file idprop.cc.
References IDP_CopyProperty(), IDP_FreeProperty(), IDProperty::next, and IDProperty::prev.
Referenced by uiLayout::op_enum_items(), screen_user_menu_draw(), blender::nodes::update_input_properties_from_node_tree(), and blender::nodes::update_output_properties_from_node_tree().
| IDProperty * IDP_EnsureProperties | ( | ID * | id | ) |
Ensure the Group property that contains the user-defined id properties for ID id exists & return it.
Definition at line 882 of file idprop.cc.
References IDP_GROUP, MEM_callocN(), and ID::properties.
Referenced by blender::io::usd::ensure_usd_source_path_prop(), blender::io::usd::get_usd_source_path(), blender::io::fbx::read_custom_properties(), blender::io::usd::set_id_props_from_prim(), blender::bke::tests::TEST_F(), and texture_paint_image_from_view_exec().
| const IDPropertyUIDataEnumItem * IDP_EnumItemFind | ( | const IDProperty * | prop | ) |
Definition at line 471 of file idprop.cc.
References BLI_assert, IDPropertyUIDataInt::enum_items, IDPropertyUIDataInt::enum_items_num, IDP_INT, IDP_int_get, IDProperty::type, and IDProperty::ui_data.
Referenced by idp_repr_fn_recursive().
| bool IDP_EnumItemsValidate | ( | const IDPropertyUIDataEnumItem * | items, |
| int | items_num, | ||
| void(* | error_fn )(const char *) ) |
Definition at line 488 of file idprop.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), i, IDPropertyUIDataEnumItem::identifier, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), and IDPropertyUIDataEnumItem::value.
Referenced by blender::nodes::id_property_int_update_enum_items(), and idprop_ui_data_update_int().
| bool IDP_EqualsProperties | ( | const IDProperty * | prop1, |
| const IDProperty * | prop2 ) |
Definition at line 1004 of file idprop.cc.
References IDP_EqualsProperties_ex().
Referenced by ED_screen_user_menu_item_find_operator(), wm_xr_operator_test_event(), and wm_xr_session_modal_action_test().
| bool IDP_EqualsProperties_ex | ( | const IDProperty * | prop1, |
| const IDProperty * | prop2, | ||
| bool | is_strict ) |
| is_strict | When false treat missing items as a match. |
Definition at line 913 of file idprop.cc.
References BLI_assert_unreachable, IDProperty::data, fabsf, false, IDPropertyData::group, i, IDP_ARRAY, IDP_array_voidp_get, IDP_bool_get, IDP_BOOLEAN, IDP_DOUBLE, IDP_double_get, IDP_EqualsProperties_ex(), IDP_FLOAT, IDP_float_get, IDP_GetPropertyFromGroup(), IDP_GROUP, IDP_ID, IDP_ID_get, IDP_IDPARRAY, IDP_INT, IDP_int_get, IDP_print(), IDP_property_array_get, idp_size_table, IDP_STRING, IDP_string_get, IDProperty::len, LISTBASE_FOREACH, max_ff(), IDProperty::name, printf, STREQLEN, IDProperty::subtype, and IDProperty::type.
Referenced by IDP_EqualsProperties(), IDP_EqualsProperties_ex(), and wm_keymap_item_find_in_keymap().
| void IDP_foreach_property | ( | IDProperty * | id_property_root, |
| int | type_filter, | ||
| blender::FunctionRef< void(IDProperty *id_property)> | callback ) |
Loop through all ID properties in hierarchy of given id_property_root included.
| type_filter | If not 0, only apply callback on properties of matching types, see IDP_TYPE_FILTER_ enum in DNA_ID.h. |
References str.
Referenced by armature_foreach_id_bone(), armature_foreach_id_bone_collection(), armature_foreach_id_editbone(), blender::deg::DepsgraphNodeBuilder::build_idproperties(), blender::deg::DepsgraphRelationBuilder::build_idproperties(), blender::find_dependencies_from_settings(), blender::foreach_ID_link(), blender::ed::geometry::gather_input_ids(), blender::bke::node_interface::item_types::item_foreach_id(), library_foreach_ID_link(), blender::bke::library_foreach_node_socket(), blender::bke::node_node_foreach_id(), object_foreach_id(), blender::ed::geometry::replace_inputs_evaluated_data_blocks(), blender::ed::geometry::replace_strings_with_id_pointers(), scene_foreach_id(), and strip_foreach_member_id_cb().
| void IDP_FreeArray | ( | IDProperty * | prop | ) |
Definition at line 257 of file idprop.cc.
References IDProperty::data, idp_resize_group_array(), MEM_freeN(), and IDPropertyData::pointer.
Referenced by IDP_FreePropertyContent_ex().
| void IDP_FreeFromGroup | ( | IDProperty * | group, |
| IDProperty * | prop ) |
Removes the property from the group and frees it.
Definition at line 741 of file idprop.cc.
References IDP_FreeProperty(), and IDP_RemoveFromGroup().
Referenced by BPy_IDGroup_pop(), BPy_Wrap_SetMapItem(), IDP_SyncGroupTypes(), IMB_metadata_set_field(), pyrna_struct_pop(), RNA_property_pointer_remove(), rna_property_rna_or_id_get(), RNA_struct_system_idprops_unset(), rna_system_idproperty_free(), and version_idproperty_ui_data().
| void IDP_FreeProperty | ( | IDProperty * | prop | ) |
Definition at line 1251 of file idprop.cc.
References IDP_FreePropertyContent(), and MEM_freeN().
Referenced by BKE_addon_free(), BKE_area_region_free(), BKE_blender_user_menu_item_free(), BKE_collection_exporter_free_data(), BKE_pose_backup_free(), BKE_pose_channel_copy_data(), BKE_workspace_tool_remove(), blo_do_versions_280(), blo_do_versions_400(), bone_free(), camera_write_cycles_compatibility_data_clear(), blender::ed::object::collection_exporter_export(), do_versions_after_linking_280(), ED_armature_edit_free(), ensure_id_properties_freed(), IDP_CopyPropertyContent(), IDP_FreeFromGroup(), idp_from_PyMapping(), idp_from_PySequence_Fast(), idp_resize_group_array(), IMB_metadata_free(), keymap_item_free(), keymap_item_free(), blender::bke::node_update_asset_metadata(), blender::bke::idprop::IDPropertyDeleter::operator()(), operator_last_properties_init_impl(), operatortype_ghash_free_cb(), pose_clear_user_transforms_exec(), poseAnim_mapping_free(), pyrna_struct_dealloc(), pyrna_struct_id_properties_clear(), scene_free_data(), shortcut_free_operator_property(), blender::bke::idprop::tests::TEST(), blender::bke::idprop::tests::TEST(), blender::bke::idprop::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::idprop::tests::test_convert_idprop_from_value(), ui_but_event_operator_string_from_menu(), ui_but_event_operator_string_from_panel(), ui_but_event_property_operator_string(), ui_handler_wait_for_input_remove(), blender::update_id_properties_from_node_group(), userdef_free_keyconfig_prefs(), view3d_free(), wm_drop_item_free_data(), wm_free_operator_properties_callback(), WM_gizmo_properties_free(), wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), wm_keymap_item_free_data(), WM_keymap_item_properties_reset(), WM_keymap_item_restore_to_default(), WM_keymap_remove_item(), WM_operator_free(), WM_operator_last_properties_store(), WM_operator_properties_free(), WM_operatortype_last_properties_clear_all(), WM_operatortype_remove_ptr(), and wm_xr_data_free().
| void IDP_FreeProperty_ex | ( | IDProperty * | prop, |
| bool | do_id_user ) |
Definition at line 1245 of file idprop.cc.
References IDP_FreePropertyContent_ex(), and MEM_freeN().
Referenced by blender::animrig::ANIM_bonecoll_array_free(), ANIM_bonecoll_free(), BKE_armature_bonelist_free(), BKE_armature_editbonelist_free(), BKE_pose_channel_free_ex(), BKE_view_layer_free_ex(), ED_armature_ebone_listbase_free(), blender::free_data(), IDP_ReplaceInGroup_ex(), and blender::ed::geometry::run_node_group_exec().
| void IDP_FreePropertyContent | ( | IDProperty * | prop | ) |
Definition at line 1240 of file idprop.cc.
References IDP_FreePropertyContent_ex().
Referenced by ed_marker_delete_exec(), IDP_ClearProperty(), IDP_FreeProperty(), and IDP_SetIndexArray().
| void IDP_FreePropertyContent_ex | ( | IDProperty * | prop, |
| bool | do_id_user ) |
Definition at line 1213 of file idprop.cc.
References id_us_min(), IDP_ARRAY, IDP_FreeArray(), IDP_FreeGroup(), IDP_FreeIDPArray(), IDP_FreeString(), IDP_GROUP, IDP_ID, IDP_ID_get, IDP_IDPARRAY, IDP_STRING, IDP_ui_data_free(), IDProperty::type, and IDProperty::ui_data.
Referenced by BKE_libblock_free_data(), IDP_FreeGroup(), IDP_FreeIDPArray(), IDP_FreeProperty_ex(), IDP_FreePropertyContent(), blender::bke::node_interface::item_types::item_free(), blender::bke::node_free_node(), blender::bke::node_socket_free(), scene_free_markers(), and blender::seq::seq_strip_free_ex().
| void IDP_FreeString | ( | IDProperty * | prop | ) |
Definition at line 446 of file idprop.cc.
References BLI_assert, IDProperty::data, IDP_STRING, MEM_freeN(), IDPropertyData::pointer, and IDProperty::type.
Referenced by IDP_FreePropertyContent_ex().
| IDProperty * IDP_GetIndexArray | ( | IDProperty * | prop, |
| int | index ) |
Definition at line 130 of file idprop.cc.
References BLI_assert, GETPROP, IDP_IDPARRAY, and IDProperty::type.
Referenced by RNA_property_collection_add().
| IDProperty * IDP_GetProperties | ( | ID * | id | ) |
Get the Group property that contains the user-defined id properties for ID id.
Definition at line 877 of file idprop.cc.
Referenced by blo_update_defaults_scene(), do_versions_idproperty_ui_data(), proj_paint_state_viewport_init(), blender::bke::tests::TEST_F(), texture_paint_camera_project_exec(), and version_bonelayers_to_bonecollections().
| IDProperty * IDP_GetPropertyFromGroup | ( | const IDProperty * | prop, |
| blender::StringRef | name ) |
Definition at line 747 of file idprop.cc.
References BLI_assert, IDPropertyData::children_map, IDProperty::data, IDP_GROUP, IDProperty::len, name, and IDProperty::type.
Referenced by blender::nodes::attribute_search_exec_fn(), BKE_asset_metadata_idprop_find(), BKE_keyconfig_pref_set_select_mouse(), blo_do_versions_280(), BPy_IDGroup_Contains(), BPy_IDGroup_get(), BPy_IDGroup_Map_GetItem(), BPy_IDGroup_pop(), BPy_IDGroup_SetName(), BPy_IDProperty_Map_ValidateAndCreate(), BPy_Wrap_SetMapItem(), collection_exporter_copy(), blender::io::usd::ensure_usd_source_path_prop(), find_property_rgba(), blender::ed::object::geometry_nodes_input_attribute_toggle_exec(), blender::io::usd::get_usd_source_path(), blender::io::hydra::CameraDelegate::GetCameraParamValue(), IDP_EqualsProperties_ex(), IDP_GetPropertyFromGroup_null(), IDP_GetPropertyTypeFromGroup(), IDP_MergeGroup_ex(), IDP_ReplaceGroupInGroup(), IDP_ReplaceInGroup(), IDP_ReplaceInGroup_ex(), IDP_SyncGroupTypes(), IDP_SyncGroupValues(), idprops_ensure_named_group(), IMB_metadata_get_field(), IMB_metadata_set_field(), keymap_item_has_invalid_wm_context_data_path(), keymap_update_brushes_handle_add_item(), keymap_update_brushes_handle_remove_item(), blender::nodes::layer_name_search_exec_fn(), operator_last_properties_init_impl(), proj_paint_state_viewport_init(), pyrna_struct_contains(), pyrna_struct_get(), pyrna_struct_id_properties_ui(), pyrna_struct_pop(), pyrna_struct_subscript(), rna_idproperty_find(), rna_path_parse(), RNA_struct_system_idprops_unset(), rna_system_idproperty_find(), rna_system_idproperty_free(), blender::ed::object::shade_auto_smooth_exec(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST(), blender::bke::tests::TEST_F(), blender::nodes::update_input_properties_from_node_tree(), blender::nodes::update_output_properties_from_node_tree(), version_bonelayers_to_bonecollections(), version_idproperty_move_data_float(), version_idproperty_move_data_int(), version_idproperty_move_data_string(), version_idproperty_ui_data(), WM_operator_last_properties_init(), WM_toolsystem_ref_properties_get_ex(), WM_toolsystem_ref_properties_get_idprops(), and WM_toolsystem_ref_properties_init_for_keymap().
| IDProperty * IDP_GetPropertyFromGroup_null | ( | const IDProperty * | prop, |
| blender::StringRef | name ) |
Same as above, but allows the property to be null, in which case null is returned.
Definition at line 760 of file idprop.cc.
References IDP_GetPropertyFromGroup(), and name.
Referenced by blender::check_property_socket_sync(), blender::nodes::draw_interface_panel_as_panel(), blender::nodes::draw_property_for_socket(), blender::nodes::find_output_attributes_to_store(), blender::nodes::get_geometry_nodes_input_inference_values(), blender::nodes::initialize_group_input(), and blender::nodes::input_attribute_name_get().
| IDProperty * IDP_GetPropertyTypeFromGroup | ( | const IDProperty * | prop, |
| blender::StringRef | name, | ||
| char | type ) |
Same as IDP_GetPropertyFromGroup but ensure the type matches.
Definition at line 768 of file idprop.cc.
References IDP_GetPropertyFromGroup(), name, and IDProperty::type.
Referenced by camera_write_cycles_compatibility_data_create(), texture_paint_camera_project_exec(), version_cycles_properties_from_ID(), version_cycles_properties_from_render_layer(), version_cycles_properties_from_view_layer(), version_cycles_property_float(), version_cycles_property_int(), version_cycles_property_int_set(), and version_cycles_visibility_properties_from_ID().
| IDProperty * IDP_ID_system_properties_ensure | ( | ID * | id | ) |
Ensure the Group property that contains the system-defined id properties for ID id exists & return it.
Definition at line 900 of file idprop.cc.
References IDP_GROUP, MEM_callocN(), and ID::system_properties.
Referenced by camera_write_cycles_compatibility_data_create().
| IDProperty * IDP_ID_system_properties_get | ( | ID * | id | ) |
Get the Group property that contains the system-defined id properties for ID id.
Definition at line 895 of file idprop.cc.
Referenced by camera_write_cycles_compatibility_data_create(), version_cycles_properties_from_ID(), and version_cycles_visibility_properties_from_ID().
| void IDP_MergeGroup | ( | IDProperty * | dest, |
| const IDProperty * | src, | ||
| bool | do_overwrite ) |
If a property is missing in dest, add it. Do it recursively.
Definition at line 712 of file idprop.cc.
References IDP_MergeGroup_ex().
Referenced by BPy_IDGroup_update(), gizmo_tweak_start_and_finish(), IDP_Reset(), operator_last_properties_init_impl(), WM_gizmo_operator_invoke(), and WM_toolsystem_ref_properties_init_for_keymap().
| void IDP_MergeGroup_ex | ( | IDProperty * | dest, |
| const IDProperty * | src, | ||
| bool | do_overwrite, | ||
| int | flag ) |
If a property is missing in dest, add it. Do it recursively.
| flag | the ID creation/copying flags (LIB_ID_CREATE_...), same as passed to BKE_id_copy_ex. |
Definition at line 673 of file idprop.cc.
References BLI_assert, copy(), IDProperty::data, flag, IDPropertyData::group, IDP_AddToGroup(), IDP_CopyProperty_ex(), IDP_GetPropertyFromGroup(), IDP_GROUP, IDP_MergeGroup_ex(), IDP_ReplaceInGroup_ex(), LISTBASE_FOREACH, IDProperty::name, and IDProperty::type.
Referenced by IDP_MergeGroup(), and IDP_MergeGroup_ex().
| IDProperty * IDP_New | ( | char | type, |
| const IDPropertyTemplate * | val, | ||
| blender::StringRef | name, | ||
| eIDPropertyFlag | flags = {} ) |
Allocate a new IDProperty.
This function takes three arguments: the ID property type, a union which defines its initial value, and a name.
The union is simple to use; see the top of BKE_idprop.h for its definition. An example of using this function:
Note that you MUST either attach the id property to an id property group with IDP_AddToGroup or MEM_freeN the property, doing anything else might result in a memory leak.
Definition at line 1009 of file idprop.cc.
References IDPropertyTemplate::array, BLI_assert, CLOG_ERROR, IDPropertyTemplate::d, IDProperty::data, DEFAULT_ALLOC_FOR_NULL_STRINGS, ELEM, IDPropertyTemplate::f, IDProperty::flag, IDPropertyTemplate::i, IDPropertyTemplate::id, id_us_plus(), IDP_ARRAY, IDP_BOOLEAN, IDP_DOUBLE, IDP_FLOAT, IDP_GROUP, IDP_ID, IDP_ID_get, IDP_INT, idp_size_table, IDP_STRING, IDP_string_get, IDP_STRING_SUB_BYTE, IDP_STRING_SUB_UTF8, IDProperty::len, IDPropertyTemplate::len, LOG, MEM_calloc_arrayN(), MEM_callocN(), MEM_malloc_arrayN(), IDProperty::name, name, IDPropertyData::pointer, IDPropertyTemplate::str, IDPropertyTemplate::string, IDProperty::subtype, IDPropertyTemplate::subtype, IDProperty::totallen, IDProperty::type, IDPropertyTemplate::type, and IDPropertyData::val.
Referenced by blender::bke::idprop::array_create(), BKE_collection_exporter_add(), blender::bke::idprop::create(), blender::bke::idprop::create(), blender::bke::idprop::create(), blender::bke::idprop::create(), blender::bke::idprop::create_bool(), blender::bke::idprop::create_group(), blender::io::usd::ensure_usd_source_path_prop(), idp_from_PyBytes(), idp_from_PySequence_Buffer(), idp_from_PySequence_Fast(), idp_from_PyUnicode(), blender::io::fbx::read_ufbx_property(), RNA_property_boolean_set_array(), RNA_property_string_set_bytes(), blender::io::usd::set_bool_prop(), blender::io::usd::set_double_prop(), blender::io::usd::set_float_prop(), blender::io::usd::set_int_prop(), and blender::io::usd::set_string_prop().
| IDProperty * IDP_NewIDPArray | ( | blender::StringRef | name | ) |
Definition at line 67 of file idprop.cc.
References IDP_IDPARRAY, IDProperty::len, MEM_callocN(), IDProperty::name, name, and IDProperty::type.
Referenced by idp_from_PySequence_Fast(), and RNA_property_collection_add().
| IDProperty * IDP_NewString | ( | const char * | st, |
| blender::StringRef | name, | ||
| eIDPropertyFlag | flags = {} ) |
Definition at line 399 of file idprop.cc.
References IDP_NewStringMaxSize(), and name.
Referenced by blender::bke::idprop::create().
| IDProperty * IDP_NewStringMaxSize | ( | const char * | st, |
| size_t | st_maxncpy, | ||
| blender::StringRef | name, | ||
| eIDPropertyFlag | flags = {} ) |
| st | The string to assign. Doesn't need to be null terminated when clamped by maxncpy. |
| name | The property name. |
| maxncpy | The maximum size of the string (including the \0 terminator). When zero, this is the equivalent of passing in strlen(st) + 1 |
Definition at line 363 of file idprop.cc.
References BLI_assert, BLI_strnlen(), IDProperty::data, DEFAULT_ALLOC_FOR_NULL_STRINGS, IDProperty::flag, IDP_STRING, IDP_string_get, IDProperty::len, MEM_callocN(), MEM_malloc_arrayN(), IDProperty::name, name, IDPropertyData::pointer, IDProperty::totallen, and IDProperty::type.
Referenced by IDP_NewString(), RNA_property_string_set(), ui_but_event_operator_string_from_menu(), ui_but_event_operator_string_from_panel(), and blender::nodes::update_output_properties_from_node_tree().
| void IDP_print | ( | const IDProperty * | prop | ) |
Definition at line 259 of file idprop_utils.cc.
References IDP_reprN(), MEM_freeN(), and printf.
Referenced by IDP_EqualsProperties_ex(), wm_keymap_item_find(), and wm_keymap_item_find_in_keymap().
| void IDP_RemoveFromGroup | ( | IDProperty * | group, |
| IDProperty * | prop ) |
To free the property, you have to do: #IDP_FreeProperty(prop);
Definition at line 730 of file idprop.cc.
References BLI_assert, BLI_findindex(), BLI_remlink(), IDPropertyData::children_map, IDProperty::data, IDPropertyData::group, IDP_GROUP, IDProperty::len, and IDProperty::type.
Referenced by IDP_FreeFromGroup(), and blender::bke::tests::TEST().
| void IDP_ReplaceGroupInGroup | ( | IDProperty * | dest, |
| const IDProperty * | src ) |
Replaces all properties with the same name in a destination group from a source group.
Definition at line 634 of file idprop.cc.
References BLI_assert, IDProperty::data, IDPropertyData::group, IDP_CopyProperty(), IDP_GetPropertyFromGroup(), IDP_GROUP, IDP_ReplaceInGroup_ex(), LISTBASE_FOREACH, IDProperty::name, and IDProperty::type.
Referenced by blender::bke::tests::TEST(), and wm_operator_create().
| void IDP_ReplaceInGroup | ( | IDProperty * | group, |
| IDProperty * | prop ) |
Definition at line 666 of file idprop.cc.
References IDP_GetPropertyFromGroup(), IDP_ReplaceInGroup_ex(), and IDProperty::name.
Referenced by BKE_asset_metadata_idprop_ensure(), RNA_property_pointer_set(), blender::bke::tests::TEST(), ui_but_event_operator_string_from_panel(), and WM_operator_last_properties_store().
| void IDP_ReplaceInGroup_ex | ( | IDProperty * | group, |
| IDProperty * | prop, | ||
| IDProperty * | prop_exist, | ||
| int | flag ) |
Checks if a property with the same name as prop exists, and if so replaces it. Use this to preserve order!
| flag | the ID creation/copying flags (LIB_ID_CREATE_...), same as passed to BKE_id_copy_ex. |
Definition at line 645 of file idprop.cc.
References BLI_assert, BLI_insertlinkreplace(), IDPropertyData::children_map, IDProperty::data, flag, IDPropertyData::group, IDP_AddToGroup(), IDP_FreeProperty_ex(), IDP_GetPropertyFromGroup(), IDP_GROUP, LIB_ID_CREATE_NO_USER_REFCOUNT, IDProperty::name, and IDProperty::type.
Referenced by BPy_IDProperty_Map_ValidateAndCreate(), IDP_MergeGroup_ex(), IDP_ReplaceGroupInGroup(), IDP_ReplaceInGroup(), IDP_SyncGroupTypes(), IDP_SyncGroupValues(), idprops_ensure_named_group(), and RNA_property_pointer_set().
| void IDP_repr_fn | ( | const IDProperty * | prop, |
| void(* | str_append_fn )(void *user_data, const char *str, uint str_len), | ||
| void * | user_data ) |
Definition at line 232 of file idprop_utils.cc.
References idp_repr_fn_recursive(), state, and str.
Referenced by IDP_reprN().
| char * IDP_reprN | ( | const IDProperty * | prop, |
| uint * | r_len ) |
Definition at line 247 of file idprop_utils.cc.
References BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_get_len(), BLI_dynstr_new(), IDP_repr_fn(), and repr_str().
Referenced by IDP_print(), keymap_handler_log_kmi_op_str(), and blender::bke::tests::TEST().
| void IDP_Reset | ( | IDProperty * | prop, |
| const IDProperty * | reference ) |
Definition at line 1264 of file idprop.cc.
References IDP_ClearProperty(), and IDP_MergeGroup().
| void IDP_ResizeArray | ( | IDProperty * | prop, |
| int | newlen ) |
This function works for strings too!
Definition at line 220 of file idprop.cc.
References IDProperty::data, IDP_ARRAY_REALLOC_LIMIT, idp_resize_group_array(), idp_size_table, IDProperty::len, MEM_recallocN, IDPropertyData::pointer, IDProperty::subtype, and IDProperty::totallen.
Referenced by IDP_AssignStringMaxSize(), and RNA_property_string_set_bytes().
| void IDP_ResizeIDPArray | ( | IDProperty * | prop, |
| int | newlen ) |
Definition at line 153 of file idprop.cc.
References BLI_assert, IDProperty::data, GETPROP, i, IDP_ARRAY_REALLOC_LIMIT, IDP_ClearProperty(), IDP_IDPARRAY, IDProperty::len, len, MEM_recallocN, IDPropertyData::pointer, IDProperty::totallen, and IDProperty::type.
Referenced by IDP_AppendArray(), RNA_property_collection_clear(), and RNA_property_collection_remove().
| void IDP_SetIndexArray | ( | IDProperty * | prop, |
| int | index, | ||
| IDProperty * | item ) |
Shallow copies item.
Definition at line 114 of file idprop.cc.
References BLI_assert, GETPROP, IDP_FreePropertyContent(), IDP_IDPARRAY, IDProperty::len, and IDProperty::type.
Referenced by IDP_AppendArray().
| void IDP_SyncGroupTypes | ( | IDProperty * | dest, |
| const IDProperty * | src, | ||
| bool | do_arraylen ) |
Definition at line 612 of file idprop.cc.
References IDProperty::data, ELEM, IDPropertyData::group, IDP_ARRAY, IDP_CopyProperty(), IDP_FreeFromGroup(), IDP_GetPropertyFromGroup(), IDP_GROUP, IDP_IDPARRAY, IDP_ReplaceInGroup_ex(), IDP_SyncGroupTypes(), IDProperty::len, LISTBASE_FOREACH_MUTABLE, IDProperty::name, IDProperty::subtype, and IDProperty::type.
Referenced by IDP_SyncGroupTypes(), and WM_operator_type_set().
| void IDP_SyncGroupValues | ( | IDProperty * | dest, |
| const IDProperty * | src ) |
Sync values from one group to another when values name and types match, copy the values, else ignore.
Definition at line 585 of file idprop.cc.
References BLI_assert, IDProperty::data, IDPropertyData::group, IDP_BOOLEAN, IDP_CopyProperty(), IDP_DOUBLE, IDP_FLOAT, IDP_GetPropertyFromGroup(), IDP_GROUP, IDP_INT, IDP_ReplaceInGroup_ex(), IDP_SyncGroupValues(), LISTBASE_FOREACH, IDProperty::name, and IDProperty::type.
Referenced by BKE_pose_backup_restore(), IDP_SyncGroupValues(), pose_bone_do_paste(), poseAnim_mapping_reset(), and blender::bke::tests::TEST().
| IDPropertyUIData * IDP_TryConvertUIData | ( | IDPropertyUIData * | src, |
| eIDPropertyUIDataType | src_type, | ||
| eIDPropertyUIDataType | dst_type ) |
Convert UI data like default arrays from the old type to the new type as possible. Takes ownership of the input data; it can return it directly if the types match.
Definition at line 1779 of file idprop.cc.
References IDPropertyUIDataBool::base, IDPropertyUIDataFloat::base, IDPropertyUIDataInt::base, convert_base_ui_data(), IDPropertyUIDataBool::default_array, IDPropertyUIDataFloat::default_array, IDPropertyUIDataInt::default_array, IDPropertyUIDataBool::default_array_len, IDPropertyUIDataFloat::default_array_len, IDPropertyUIDataInt::default_array_len, IDPropertyUIDataBool::default_value, IDPropertyUIDataFloat::default_value, IDPropertyUIDataInt::default_value, float, i, IDP_UI_DATA_TYPE_BOOLEAN, IDP_UI_DATA_TYPE_FLOAT, IDP_UI_DATA_TYPE_ID, IDP_UI_DATA_TYPE_INT, IDP_UI_DATA_TYPE_STRING, IDP_UI_DATA_TYPE_UNSUPPORTED, IDPropertyUIDataFloat::max, IDPropertyUIDataInt::max, MEM_malloc_arrayN(), IDPropertyUIDataFloat::min, IDPropertyUIDataInt::min, IDPropertyUIDataFloat::soft_max, IDPropertyUIDataInt::soft_max, IDPropertyUIDataFloat::soft_min, IDPropertyUIDataInt::soft_min, IDPropertyUIDataFloat::step, IDPropertyUIDataInt::step, and ui_data_free().
Referenced by BPy_IDProperty_Map_ValidateAndCreate().
| const char * IDP_type_str | ( | const IDProperty * | prop | ) |
Definition at line 311 of file idprop_utils.cc.
References IDP_type_str(), IDProperty::subtype, and IDProperty::type.
| const char * IDP_type_str | ( | eIDPropertyType | type, |
| short | sub_type ) |
Definition at line 267 of file idprop_utils.cc.
References BLI_assert_unreachable, IDP_ARRAY, IDP_BOOLEAN, IDP_DOUBLE, IDP_FLOAT, IDP_GROUP, IDP_ID, IDP_IDPARRAY, IDP_INT, IDP_STRING, IDP_STRING_SUB_BYTE, and IDP_STRING_SUB_UTF8.
Referenced by BPy_IDProperty_Map_ValidateAndCreate(), and IDP_type_str().
| IDPropertyUIData * IDP_ui_data_copy | ( | const IDProperty * | prop | ) |
Definition at line 265 of file idprop.cc.
References BLI_strdup(), BLI_strdup_null(), IDPropertyUIDataBool::default_array, IDPropertyUIDataFloat::default_array, IDPropertyUIDataInt::default_array, IDPropertyUIDataString::default_value, IDPropertyUIData::description, IDPropertyUIDataEnumItem::description, IDPropertyUIDataInt::enum_items, IDPropertyUIDataInt::enum_items_num, i, IDPropertyUIDataEnumItem::identifier, IDP_ui_data_type(), IDP_UI_DATA_TYPE_BOOLEAN, IDP_UI_DATA_TYPE_FLOAT, IDP_UI_DATA_TYPE_ID, IDP_UI_DATA_TYPE_INT, IDP_UI_DATA_TYPE_STRING, IDP_UI_DATA_TYPE_UNSUPPORTED, MEM_dupallocN(), IDPropertyUIDataEnumItem::name, and IDProperty::ui_data.
Referenced by BPy_IDPropertyUIManager_update_from(), and idp_generic_copy().
| IDPropertyUIData * IDP_ui_data_ensure | ( | IDProperty * | prop | ) |
Definition at line 1761 of file idprop.cc.
References IDP_ui_data_type(), IDProperty::ui_data, and ui_data_alloc().
Referenced by BPy_IDIDPropertyUIManager_as_dict(), BPy_IDPropertyUIManager_update(), blender::bke::create_auto_smooth_modifier(), blender::nodes::id_name_or_value_prop(), blender::nodes::id_property_create_from_socket(), RNA_property_float_set_default(), RNA_property_int_set_default(), blender::nodes::update_input_properties_from_node_tree(), blender::nodes::update_output_properties_from_node_tree(), and version_idproperty_ui_data().
| void IDP_ui_data_free | ( | IDProperty * | prop | ) |
Definition at line 1207 of file idprop.cc.
References IDP_ui_data_type(), IDProperty::ui_data, and ui_data_free().
Referenced by BPy_IDPropertyUIManager_clear(), BPy_IDPropertyUIManager_update_from(), IDP_FreePropertyContent_ex(), and blender::nodes::update_output_properties_from_node_tree().
| void IDP_ui_data_free_unique_contents | ( | IDPropertyUIData * | ui_data, |
| eIDPropertyUIDataType | type, | ||
| const IDPropertyUIData * | other ) |
Free allocated pointers in the UI data that isn't shared with the UI data in the other argument. Useful for returning early on failure when updating UI data in place, or when replacing a subset of the UI data's allocated pointers.
Definition at line 1117 of file idprop.cc.
References IDPropertyUIDataBool::default_array, IDPropertyUIDataFloat::default_array, IDPropertyUIDataInt::default_array, IDPropertyUIDataString::default_value, IDPropertyUIData::description, IDPropertyUIDataInt::enum_items, IDP_int_ui_data_free_enum_items(), IDP_UI_DATA_TYPE_BOOLEAN, IDP_UI_DATA_TYPE_FLOAT, IDP_UI_DATA_TYPE_ID, IDP_UI_DATA_TYPE_INT, IDP_UI_DATA_TYPE_STRING, IDP_UI_DATA_TYPE_UNSUPPORTED, and MEM_SAFE_FREE.
Referenced by idprop_ui_data_update_bool(), idprop_ui_data_update_float(), idprop_ui_data_update_id(), idprop_ui_data_update_int(), and idprop_ui_data_update_string().
| bool IDP_ui_data_supported | ( | const IDProperty * | prop | ) |
Definition at line 1713 of file idprop.cc.
References IDP_ui_data_type(), and IDP_UI_DATA_TYPE_UNSUPPORTED.
Referenced by BPy_IDIDPropertyUIManager_as_dict(), BPy_IDPropertyUIManager_clear(), BPy_IDPropertyUIManager_update(), BPy_IDPropertyUIManager_update_from(), pyrna_struct_id_properties_ui(), and version_idproperty_ui_data().
| eIDPropertyUIDataType IDP_ui_data_type | ( | const IDProperty * | prop | ) |
Definition at line 1691 of file idprop.cc.
References ELEM, IDP_ARRAY, IDP_BOOLEAN, IDP_DOUBLE, IDP_FLOAT, IDP_ID, IDP_INT, IDP_STRING, IDP_UI_DATA_TYPE_BOOLEAN, IDP_UI_DATA_TYPE_FLOAT, IDP_UI_DATA_TYPE_ID, IDP_UI_DATA_TYPE_INT, IDP_UI_DATA_TYPE_STRING, IDP_UI_DATA_TYPE_UNSUPPORTED, IDProperty::subtype, and IDProperty::type.
Referenced by BPy_IDIDPropertyUIManager_as_dict(), BPy_IDProperty_Map_ValidateAndCreate(), BPy_IDPropertyUIManager_update(), IDP_ui_data_copy(), IDP_ui_data_ensure(), IDP_ui_data_free(), IDP_ui_data_supported(), idprop_ui_data_update_bool(), idprop_ui_data_update_float(), idprop_ui_data_update_id(), idprop_ui_data_update_int(), idprop_ui_data_update_string(), read_ui_data(), RNA_property_boolean_get_default(), RNA_property_boolean_get_default_array(), version_idproperty_ui_data(), and write_ui_data().