|
Blender
V2.93
|
#include "BLI_compiler_attrs.h"Go to the source code of this file.
Classes | |
| union | IDPropertyTemplate |
Macros | |
| #define | IDP_Int(prop) ((prop)->data.val) |
| #define | IDP_Array(prop) ((prop)->data.pointer) |
| #define | IDP_Float(prop) (*(float *)&(prop)->data.val) |
| #define | IDP_Double(prop) (*(double *)&(prop)->data.val) |
| #define | IDP_String(prop) ((char *)(prop)->data.pointer) |
| #define | IDP_IDPArray(prop) ((struct IDProperty *)(prop)->data.pointer) |
| #define | IDP_Id(prop) ((ID *)(prop)->data.pointer) |
| #define | IDP_BlendDataRead(reader, prop) IDP_BlendReadData_impl(reader, prop, __func__) |
Typedefs | |
| typedef union IDPropertyTemplate | IDPropertyTemplate |
| typedef void(* | IDPWalkFunc) (void *userData, struct IDProperty *idp) |
| typedef void(* | IDPForeachPropertyCallback) (struct IDProperty *id_property, void *user_data) |
| #define IDP_Array | ( | prop | ) | ((prop)->data.pointer) |
Definition at line 155 of file BKE_idprop.h.
| #define IDP_BlendDataRead | ( | reader, | |
| prop | |||
| ) | IDP_BlendReadData_impl(reader, prop, __func__) |
Definition at line 208 of file BKE_idprop.h.
| #define IDP_Double | ( | prop | ) | (*(double *)&(prop)->data.val) |
Definition at line 180 of file BKE_idprop.h.
| #define IDP_Float | ( | prop | ) | (*(float *)&(prop)->data.val) |
Definition at line 179 of file BKE_idprop.h.
| #define IDP_Id | ( | prop | ) | ((ID *)(prop)->data.pointer) |
Definition at line 183 of file BKE_idprop.h.
| #define IDP_IDPArray | ( | prop | ) | ((struct IDProperty *)(prop)->data.pointer) |
Definition at line 182 of file BKE_idprop.h.
| #define IDP_Int | ( | prop | ) | ((prop)->data.val) |
Definition at line 154 of file BKE_idprop.h.
| #define IDP_String | ( | prop | ) | ((char *)(prop)->data.pointer) |
Definition at line 181 of file BKE_idprop.h.
| typedef void(* IDPForeachPropertyCallback) (struct IDProperty *id_property, void *user_data) |
Call a callback for each idproperty in the hierarchy under given root one (included).
Definition at line 190 of file BKE_idprop.h.
| typedef union IDPropertyTemplate IDPropertyTemplate |
| typedef void(* IDPWalkFunc) (void *userData, struct IDProperty *idp) |
Definition at line 87 of file BKE_idprop.h.
| 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 643 of file idprop.c.
References BLI_addtail(), BLI_assert, IDProperty::data, IDPropertyData::group, IDP_GetPropertyFromGroup(), IDP_GROUP, IDProperty::len, IDProperty::name, NULL, and IDProperty::type.
Referenced by bc_set_IDPropertyMatrix(), BKE_keyconfig_pref_set_select_mouse(), cycles_property_int_set(), IMB_metadata_set_field(), MOD_nodes_update_interface(), operator_last_properties_init_impl(), rna_idproperty_ui_ensure(), rna_idproperty_ui_set_default(), RNA_property_boolean_set(), RNA_property_boolean_set_array(), RNA_property_collection_add(), RNA_property_copy(), 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(), shortcut_property_from_rna(), socket_add_property(), texture_paint_image_from_view_exec(), ui_but_event_operator_string_from_menu(), ui_but_event_operator_string_from_panel(), and ui_but_event_property_operator_string().
| void IDP_AppendArray | ( | struct IDProperty * | prop, |
| struct IDProperty * | item | ||
| ) |
Definition at line 153 of file idprop.c.
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 | ( | struct IDProperty * | prop, |
| struct ID * | id, | ||
| const int | flag | ||
| ) |
Definition at line 437 of file idprop.c.
References BLI_assert, IDProperty::data, id, id_us_min(), id_us_plus(), IDP_Id, IDP_ID, LIB_ID_CREATE_NO_USER_REFCOUNT, NULL, IDPropertyData::pointer, and IDProperty::type.
Referenced by RNA_property_pointer_set().
| void IDP_AssignString | ( | struct IDProperty * | prop, |
| const char * | st, | ||
| int | maxlen | ||
| ) |
Definition at line 369 of file idprop.c.
References BLI_assert, BLI_strncpy(), IDProperty::data, IDP_ResizeArray(), IDP_STRING, IDP_STRING_SUB_BYTE, IDPropertyData::pointer, IDProperty::subtype, and IDProperty::type.
Referenced by IMB_metadata_set_field(), and RNA_property_string_set().
| void IDP_BlendReadData_impl | ( | struct BlendDataReader * | reader, |
| struct IDProperty ** | prop, | ||
| const char * | caller_func_id | ||
| ) |
Definition at line 1284 of file idprop.c.
References IDP_DirectLinkGroup(), IDP_GROUP, and NULL.
| void IDP_BlendReadExpand | ( | struct BlendExpander * | expander, |
| struct IDProperty * | prop | ||
| ) |
Definition at line 1336 of file idprop.c.
References BLO_expand, IDProperty::data, IDPropertyData::group, IDP_BlendReadExpand(), IDP_GROUP, IDP_Id, IDP_ID, IDP_IDPArray, IDP_IDPARRAY, IDProperty::len, LISTBASE_FOREACH, and IDProperty::type.
Referenced by BKE_pose_blend_read_expand(), expand_bones(), expand_id(), expand_node_socket(), IDP_BlendReadExpand(), ntreeBlendReadExpand(), and scene_blend_read_expand().
| void IDP_BlendReadLib | ( | struct BlendLibReader * | reader, |
| struct IDProperty * | prop | ||
| ) |
Definition at line 1300 of file idprop.c.
References BLO_read_get_new_id_address(), IDProperty::data, G, IDPropertyData::group, IDP_BlendReadLib(), IDP_GROUP, IDP_Id, IDP_ID, IDP_IDPArray, IDP_IDPARRAY, IDProperty::len, LISTBASE_FOREACH, IDProperty::name, NULL, IDPropertyData::pointer, and IDProperty::type.
Referenced by BKE_pose_blend_read_lib(), BKE_view_layer_blend_read_lib(), IDP_BlendReadLib(), lib_link_bones(), lib_link_id(), lib_link_node_socket(), ntreeBlendReadLib(), and scene_blend_read_lib().
| void IDP_BlendWrite | ( | struct BlendWriter * | writer, |
| const struct IDProperty * | prop | ||
| ) |
Referenced by BKE_asset_metadata_write(), BKE_constraint_blend_write(), BKE_fmodifiers_blend_write(), BKE_id_blend_write(), BKE_pose_blend_write(), BKE_screen_view3d_shading_blend_write(), BKE_view_layer_blend_write(), blendWrite(), ntreeBlendWrite(), scene_blend_write(), workspace_blend_write(), write_bone(), write_keymapitem(), write_node_socket(), write_node_socket_interface(), write_uilist(), and write_userdef().
| void IDP_ClearProperty | ( | struct IDProperty * | prop | ) |
Definition at line 1046 of file idprop.c.
References IDProperty::data, IDP_FreePropertyContent(), IDProperty::len, NULL, IDPropertyData::pointer, and IDProperty::totallen.
Referenced by BPy_IDGroup_clear(), IDP_Reset(), WM_gizmo_properties_clear(), and WM_operator_properties_clear().
| void IDP_ConcatString | ( | struct IDProperty * | str1, |
| struct IDProperty * | append | ||
| ) |
Definition at line 399 of file idprop.c.
References BLI_assert, IDProperty::data, IDP_ResizeArray(), IDP_STRING, IDProperty::len, IDPropertyData::pointer, and IDProperty::type.
| void IDP_ConcatStringC | ( | struct IDProperty * | prop, |
| const char * | st | ||
| ) |
Definition at line 388 of file idprop.c.
References BLI_assert, IDProperty::data, IDP_ResizeArray(), IDP_STRING, IDProperty::len, IDPropertyData::pointer, and IDProperty::type.
| struct IDProperty* IDP_CopyIDPArray | ( | const struct IDProperty * | array, |
| const int | flag | ||
| ) |
| struct IDProperty* IDP_CopyProperty | ( | const struct IDProperty * | prop | ) |
Referenced by BKE_object_make_proxy(), BKE_pose_channel_copy_data(), BKE_scene_duplicate(), copy_pchan(), ED_armature_from_edit(), ed_marker_duplicate_apply(), ED_screen_user_menu_item_add_operator(), fcm_python_copy(), fcurves_to_pchan_links_get(), IMB_metadata_copy(), make_boneList_recursive(), operator_last_properties_init_impl(), pose_bone_do_paste(), pose_proxy_sync(), poselib_backup_posecopy(), pycon_copy(), RNA_property_copy(), scene_copy_data(), screen_user_menu_draw(), shortcut_get_operator_property(), uiDefSearchButO_ptr(), uiItemsFullEnumO_items(), view3d_duplicate(), wm_gizmo_create(), wm_homefile_read_invoke(), wm_keymap_item_copy(), wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), WM_keymap_item_restore_to_default(), wm_open_mainfile__discard_changes(), WM_operator_confirm_message_ex(), wm_operator_create(), WM_operator_last_properties_store(), and WM_toolsystem_ref_properties_init_for_keymap().
| struct IDProperty* IDP_CopyProperty_ex | ( | const struct IDProperty * | prop, |
| const int | flag | ||
| ) |
Referenced by BKE_libblock_copy_ex(), BKE_node_copy_ex(), BKE_pose_copy_data_ex(), BKE_view_layer_copy_data(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), copy_bonechildren(), copyData(), ED_armature_ebone_listbase_copy(), node_socket_copy(), scene_copy_data(), scene_copy_markers(), and seq_dupli().
| void IDP_CopyPropertyContent | ( | IDProperty * | dst, |
| IDProperty * | src | ||
| ) |
Copy content from source IDProperty into destination one, freeing destination property's content first.
Definition at line 755 of file idprop.c.
References IDP_CopyProperty(), IDP_FreeProperty(), IDProperty::next, IDProperty::prev, and SWAP.
Referenced by MOD_nodes_update_interface().
| bool IDP_EqualsProperties | ( | struct IDProperty * | prop1, |
| struct IDProperty * | prop2 | ||
| ) |
Definition at line 875 of file idprop.c.
References IDP_EqualsProperties_ex().
Referenced by ED_screen_user_menu_item_find_operator().
| bool IDP_EqualsProperties_ex | ( | IDProperty * | prop1, |
| IDProperty * | prop2, | ||
| const bool | is_strict | ||
| ) |
| is_strict | When false treat missing items as a match |
Definition at line 788 of file idprop.c.
References BLI_assert, IDProperty::data, fabsf, IDPropertyData::group, IDP_Array, IDP_ARRAY, IDP_Double, IDP_DOUBLE, IDP_EqualsProperties_ex(), IDP_Float, IDP_FLOAT, IDP_GetPropertyFromGroup(), IDP_GROUP, IDP_Id, IDP_ID, IDP_IDPArray, IDP_IDPARRAY, IDP_Int, IDP_INT, IDP_print(), idp_size_table, IDP_String, IDP_STRING, IDProperty::len, LISTBASE_FOREACH, max_ff(), IDProperty::name, NULL, 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, |
| const int | type_filter, | ||
| IDPForeachPropertyCallback | callback, | ||
| void * | user_data | ||
| ) |
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. |
Definition at line 1072 of file idprop.c.
References callback, IDProperty::data, IDPropertyData::group, IDP_Array, IDP_foreach_property(), IDP_GROUP, IDP_IDPARRAY, IDProperty::len, LISTBASE_FOREACH, IDProperty::type, and user_data.
Referenced by armature_foreach_id_bone(), armature_foreach_id_editbone(), BKE_fcurve_foreach_id(), blender::deg::DepsgraphNodeBuilder::build_idproperties(), blender::deg::DepsgraphRelationBuilder::build_idproperties(), find_used_ids_from_settings(), foreachIDLink(), IDP_foreach_property(), library_foreach_ID_link(), library_foreach_node_socket(), node_foreach_id(), object_foreach_id(), and scene_foreach_id().
| void IDP_FreeArray | ( | struct IDProperty * | prop | ) |
Definition at line 269 of file idprop.c.
References IDProperty::data, idp_resize_group_array(), MEM_freeN, NULL, 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 690 of file idprop.c.
References IDP_FreeProperty(), and IDP_RemoveFromGroup().
Referenced by BPy_IDGroup_pop(), BPy_Wrap_SetMapItem(), IDP_SyncGroupTypes(), IMB_metadata_set_field(), pyrna_struct_pop(), rna_idproperty_free(), RNA_property_pointer_remove(), rna_property_rna_or_id_get(), and RNA_struct_idprops_unset().
| void IDP_FreeProperty | ( | struct IDProperty * | prop | ) |
Definition at line 1040 of file idprop.c.
References IDP_FreePropertyContent(), and MEM_freeN.
Referenced by BKE_addon_free(), BKE_area_region_free(), BKE_asset_metadata_free(), BKE_blender_user_menu_item_free(), BKE_object_make_proxy(), BKE_pose_channel_copy_data(), BKE_workspace_tool_remove(), blo_do_versions_280(), bone_free(), do_versions_after_linking_280(), ED_armature_edit_free(), fcm_python_free(), IDP_CopyPropertyContent(), IDP_FreeFromGroup(), idp_from_PyMapping(), idp_from_PySequence_Fast(), IDP_ReplaceGroupInGroup(), IDP_ReplaceInGroup_ex(), idp_resize_group_array(), IDP_SyncGroupTypes(), IDP_SyncGroupValues(), IMB_metadata_free(), keymap_item_free(), MOD_nodes_update_interface(), operator_last_properties_init_impl(), operatortype_ghash_free_cb(), pose_clear_user_transforms_exec(), pose_proxy_sync(), poseAnim_mapping_free(), poselib_backup_free_data(), pycon_free(), pyrna_struct_dealloc(), scene_free_data(), shortcut_free_operator_property(), ui_but_event_operator_string_from_menu(), ui_but_event_operator_string_from_panel(), ui_but_event_property_operator_string(), uiItemsFullEnumO_items(), userdef_free_keyconfig_prefs(), view3d_free(), wm_free_operator_properties_callback(), WM_gizmo_properties_free(), wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), WM_keymap_item_restore_to_default(), 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_exit().
| void IDP_FreeProperty_ex | ( | struct IDProperty * | prop, |
| const bool | do_id_user | ||
| ) |
Definition at line 1034 of file idprop.c.
References IDP_FreePropertyContent_ex(), and MEM_freeN.
Referenced by BKE_armature_bonelist_free(), BKE_armature_editbonelist_free(), BKE_pose_channel_free_ex(), BKE_view_layer_free_ex(), ED_armature_ebone_listbase_free(), freeData(), and node_socket_interface_free().
| void IDP_FreePropertyContent | ( | struct IDProperty * | prop | ) |
Definition at line 1029 of file idprop.c.
References IDP_FreePropertyContent_ex().
Referenced by BPy_IDProperty_Map_ValidateAndCreate(), ed_marker_delete_exec(), IDP_ClearProperty(), IDP_FreeProperty(), IDP_ResizeIDPArray(), IDP_SetIndexArray(), rna_idproperty_ui_ensure(), and rna_idproperty_ui_set_default().
| void IDP_FreePropertyContent_ex | ( | IDProperty * | prop, |
| const bool | do_id_user | ||
| ) |
Definition at line 1006 of file idprop.c.
References id_us_min(), IDP_ARRAY, IDP_FreeArray(), IDP_FreeGroup(), IDP_FreeIDPArray(), IDP_FreeString(), IDP_GROUP, IDP_Id, IDP_ID, IDP_IDPARRAY, IDP_STRING, and IDProperty::type.
Referenced by BKE_libblock_free_data(), IDP_FreeGroup(), IDP_FreeIDPArray(), IDP_FreeProperty_ex(), IDP_FreePropertyContent(), node_free_node(), node_socket_free(), preview_id_copy_free(), scene_free_markers(), and seq_sequence_free_ex().
| void IDP_FreeString | ( | struct IDProperty * | prop | ) |
Definition at line 410 of file idprop.c.
References BLI_assert, IDProperty::data, IDP_STRING, MEM_freeN, IDPropertyData::pointer, and IDProperty::type.
Referenced by IDP_FreePropertyContent_ex().
| struct IDProperty* IDP_GetIndexArray | ( | struct IDProperty * | prop, |
| int | index | ||
| ) |
Definition at line 146 of file idprop.c.
References BLI_assert, GETPROP, IDP_IDPARRAY, and IDProperty::type.
Referenced by RNA_property_collection_add().
| struct IDProperty* IDP_GetProperties | ( | ID * | id, |
| const bool | create_if_needed | ||
| ) |
Get the Group property that contains the id properties for ID id. Set create_if_needed to create the Group property and attach it to id if it doesn't exist; otherwise the function will return NULL if there's no Group property attached to the ID.
Definition at line 769 of file idprop.c.
References id, IDP_GROUP, MEM_callocN, and ID::properties.
Referenced by cycles_properties_from_ID(), preview_id_copy_free(), proj_paint_state_viewport_init(), texture_paint_camera_project_exec(), and texture_paint_image_from_view_exec().
| struct IDProperty* IDP_GetPropertyFromGroup | ( | const struct IDProperty * | prop, |
| const char * | name | ||
| ) |
Referenced by bc_get_IDProperty(), BKE_keyconfig_pref_set_select_mouse(), blo_do_versions_280(), BPy_IDGroup_Contains(), BPy_IDGroup_get(), BPy_IDGroup_Map_GetItem(), BPy_IDGroup_pop(), BPy_IDProperty_Map_ValidateAndCreate(), BPy_Wrap_SetMapItem(), check_property_socket_sync(), draw_property_for_socket(), IMB_metadata_get_field(), IMB_metadata_set_field(), initialize_group_input(), keymap_item_has_invalid_wm_context_data_path(), MOD_nodes_update_interface(), operator_last_properties_init_impl(), proj_paint_state_viewport_init(), pyrna_struct_contains(), pyrna_struct_get(), pyrna_struct_pop(), pyrna_struct_subscript(), rna_idproperty_find(), rna_idproperty_free(), rna_path_parse(), RNA_property_float_get_default_array(), RNA_property_int_get_default_array(), RNA_struct_idprops_unset(), WM_operator_last_properties_init(), WM_toolsystem_ref_properties_ensure_ex(), WM_toolsystem_ref_properties_get_ex(), and WM_toolsystem_ref_properties_init_for_keymap().
| struct IDProperty* IDP_GetPropertyTypeFromGroup | ( | const struct IDProperty * | prop, |
| const char * | name, | ||
| const char | type | ||
| ) |
Referenced by cycles_properties_from_ID(), cycles_properties_from_view_layer(), cycles_property_float(), cycles_property_int(), cycles_property_int_set(), rna_ensure_property_description(), rna_idproperty_ui(), rna_idproperty_ui_ensure(), rna_idproperty_ui_set_default(), RNA_property_float_get_default(), RNA_property_float_range(), RNA_property_float_ui_range(), RNA_property_int_get_default(), RNA_property_int_range(), RNA_property_int_ui_range(), RNA_property_string_default_length(), RNA_property_string_get_default(), RNA_property_subtype(), and texture_paint_camera_project_exec().
| bool IDP_InsertToGroup | ( | struct IDProperty * | group, |
| struct IDProperty * | previous, | ||
| struct IDProperty * | pnew | ||
| ) |
| void IDP_MergeGroup | ( | struct IDProperty * | dest, |
| const struct IDProperty * | src, | ||
| const bool | do_overwrite | ||
| ) |
| void IDP_MergeGroup_ex | ( | struct IDProperty * | dest, |
| const struct IDProperty * | src, | ||
| const bool | do_overwrite, | ||
| const int | flag | ||
| ) |
| struct IDProperty* IDP_New | ( | const char | type, |
| const IDPropertyTemplate * | val, | ||
| const char * | name | ||
| ) |
Allocate a new ID.
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 907 of file idprop.c.
References IDPropertyTemplate::array, BLI_assert, CLOG_ERROR, IDPropertyTemplate::d, IDProperty::data, DEFAULT_ALLOC_FOR_NULL_STRINGS, IDPropertyTemplate::f, IDPropertyTemplate::i, IDPropertyTemplate::id, id_us_plus(), IDP_ARRAY, IDP_DOUBLE, IDP_FLOAT, IDP_GROUP, IDP_Id, IDP_ID, IDP_INT, idp_size_table, IDP_String, IDP_STRING, IDP_STRING_SUB_BYTE, IDP_STRING_SUB_UTF8, if(), IDPropertyTemplate::len, IDProperty::len, LOG, MEM_callocN, MEM_mallocN, NULL, IDPropertyData::pointer, IDPropertyTemplate::str, IDPropertyTemplate::string, IDPropertyTemplate::subtype, IDProperty::subtype, IDProperty::totallen, IDPropertyTemplate::type, type, IDProperty::type, and IDPropertyData::val.
Referenced by bc_set_IDPropertyMatrix(), BKE_keyconfig_pref_ensure(), BKE_keyconfig_pref_set_select_mouse(), cycles_property_int_set(), get_socket_property_type(), idp_from_DatablockPointer(), idp_from_PyBytes(), idp_from_PyFloat(), idp_from_PyLong(), idp_from_PyMapping(), idp_from_PySequence_Buffer(), idp_from_PySequence_Fast(), idp_from_PyUnicode(), idp_resize_group_array(), IMB_metadata_ensure(), MOD_nodes_update_interface(), operator_last_properties_init_impl(), rna_idproperty_ui_ensure(), rna_idproperty_ui_set_default(), 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_pointer_set(), RNA_property_string_set_bytes(), shortcut_property_from_rna(), socket_add_property(), template_operator_property_buts_draw_single(), 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(), uiItemFullO_ptr_ex(), wm_gizmo_create(), WM_gizmo_operator_invoke(), WM_gizmo_properties_alloc(), wm_operator_create(), WM_operator_last_properties_ensure_idprops(), WM_operator_last_properties_store(), WM_operator_properties_alloc(), WM_toolsystem_ref_properties_ensure_ex(), WM_toolsystem_ref_properties_ensure_idprops(), and WM_toolsystem_ref_properties_init_for_keymap().
| struct IDProperty* IDP_NewIDPArray | ( | const char * | name | ) |
Definition at line 82 of file idprop.c.
References BLI_strncpy(), IDP_IDPARRAY, IDProperty::len, MAX_IDPROP_NAME, MEM_callocN, IDProperty::name, and IDProperty::type.
Referenced by idp_from_PySequence_Fast(), and RNA_property_collection_add().
| struct IDProperty* IDP_NewString | ( | const char * | st, |
| const char * | name, | ||
| int | maxlen | ||
| ) |
| st | The string to assign. |
| name | The property name. |
| maxlen | The size of the new string (including the \0 terminator). |
Definition at line 325 of file idprop.c.
References BLI_strncpy(), IDProperty::data, DEFAULT_ALLOC_FOR_NULL_STRINGS, IDP_String, IDP_STRING, IDProperty::len, MAX_IDPROP_NAME, MEM_callocN, MEM_mallocN, IDProperty::name, NULL, IDPropertyData::pointer, IDProperty::totallen, and IDProperty::type.
Referenced by IMB_metadata_set_field(), RNA_property_string_set(), shortcut_property_from_rna(), ui_but_event_operator_string_from_menu(), ui_but_event_operator_string_from_panel(), and ui_but_event_property_operator_string().
| void IDP_print | ( | const struct IDProperty * | prop | ) |
Referenced by IDP_EqualsProperties_ex(), wm_keymap_item_find(), and wm_keymap_item_find_in_keymap().
| bool void IDP_RemoveFromGroup | ( | IDProperty * | group, |
| IDProperty * | prop | ||
| ) |
To free the property, you have to do: IDP_FreeProperty(prop);
Definition at line 679 of file idprop.c.
References BLI_assert, BLI_remlink(), IDProperty::data, IDPropertyData::group, IDP_GROUP, IDProperty::len, and IDProperty::type.
Referenced by IDP_FreeFromGroup(), and rna_idproperty_ui_set_default().
| void IDP_ReplaceGroupInGroup | ( | struct IDProperty * | dest, |
| const struct IDProperty * | src | ||
| ) |
Referenced by wm_operator_create().
| void IDP_ReplaceInGroup | ( | struct IDProperty * | group, |
| struct IDProperty * | prop | ||
| ) |
Definition at line 572 of file idprop.c.
References IDP_GetPropertyFromGroup(), IDP_ReplaceInGroup_ex(), and IDProperty::name.
Referenced by IDP_MergeGroup_ex(), RNA_property_pointer_set(), ui_but_event_operator_string_from_panel(), and WM_operator_last_properties_store().
| void IDP_ReplaceInGroup_ex | ( | IDProperty * | group, |
| IDProperty * | prop, | ||
| IDProperty * | prop_exist | ||
| ) |
Checks if a property with the same name as prop exists, and if so replaces it. Use this to preserve order!
Definition at line 557 of file idprop.c.
References BLI_addtail(), BLI_assert, BLI_insertlinkreplace(), IDProperty::data, IDPropertyData::group, IDP_FreeProperty(), IDP_GetPropertyFromGroup(), IDP_GROUP, IDProperty::len, IDProperty::name, NULL, and IDProperty::type.
Referenced by BPy_IDProperty_Map_ValidateAndCreate(), IDP_ReplaceInGroup(), RNA_property_pointer_set(), and WM_toolsystem_ref_properties_ensure_ex().
| void IDP_repr_fn | ( | const struct IDProperty * | prop, |
| void(*)(void *user_data, const char *str, uint str_len) | str_append_fn, | ||
| void * | user_data | ||
| ) |
| char* IDP_reprN | ( | const struct IDProperty * | prop, |
| uint * | r_len | ||
| ) |
| void IDP_Reset | ( | struct IDProperty * | prop, |
| const struct IDProperty * | reference | ||
| ) |
| void IDP_ResizeArray | ( | struct IDProperty * | prop, |
| int | newlen | ||
| ) |
Definition at line 232 of file idprop.c.
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_AssignString(), IDP_ConcatString(), IDP_ConcatStringC(), and RNA_property_string_set_bytes().
| void IDP_ResizeIDPArray | ( | struct IDProperty * | prop, |
| int | len | ||
| ) |
Definition at line 161 of file idprop.c.
References BLI_assert, IDProperty::data, GETPROP, IDP_ARRAY_REALLOC_LIMIT, IDP_FreePropertyContent(), IDP_IDPARRAY, len, IDProperty::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 | ( | struct IDProperty * | prop, |
| int | index, | ||
| struct IDProperty * | item | ||
| ) |
Definition at line 130 of file idprop.c.
References BLI_assert, GETPROP, IDP_FreePropertyContent(), IDP_IDPARRAY, IDProperty::len, and IDProperty::type.
Referenced by IDP_AppendArray().
| void IDP_SyncGroupTypes | ( | struct IDProperty * | dest, |
| const struct IDProperty * | src, | ||
| const bool | do_arraylen | ||
| ) |
Referenced by WM_operator_type_set().
| void IDP_SyncGroupValues | ( | struct IDProperty * | dest, |
| const struct IDProperty * | src | ||
| ) |
Sync values from one group to another, only where they match
Referenced by pose_bone_do_paste(), pose_proxy_sync(), poseAnim_mapping_reset(), and poselib_backup_restore().