Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Functions
BKE_idprop.h File Reference
#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)
 
typedef enum eIDPropertyUIDataType eIDPropertyUIDataType
 

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
}
 

Functions

struct IDPropertyIDP_NewIDPArray (const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
struct IDPropertyIDP_CopyIDPArray (const struct IDProperty *array, int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
void IDP_SetIndexArray (struct IDProperty *prop, int index, struct IDProperty *item) ATTR_NONNULL()
 
struct IDPropertyIDP_GetIndexArray (struct IDProperty *prop, int index) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
void IDP_AppendArray (struct IDProperty *prop, struct IDProperty *item)
 
void IDP_ResizeIDPArray (struct IDProperty *prop, int len)
 
void IDP_ResizeArray (struct IDProperty *prop, int newlen)
 
void IDP_FreeArray (struct IDProperty *prop)
 
struct IDPropertyIDP_NewString (const char *st, const char *name, int maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
 
void IDP_AssignString (struct IDProperty *prop, const char *st, int maxlen) ATTR_NONNULL()
 
void IDP_ConcatStringC (struct IDProperty *prop, const char *st) ATTR_NONNULL()
 
void IDP_ConcatString (struct IDProperty *str1, struct IDProperty *append) ATTR_NONNULL()
 
void IDP_FreeString (struct IDProperty *prop) ATTR_NONNULL()
 
void IDP_AssignID (struct IDProperty *prop, struct ID *id, int flag)
 
void IDP_SyncGroupValues (struct IDProperty *dest, const struct IDProperty *src) ATTR_NONNULL()
 
void IDP_SyncGroupTypes (struct IDProperty *dest, const struct IDProperty *src, bool do_arraylen) ATTR_NONNULL()
 
void IDP_ReplaceGroupInGroup (struct IDProperty *dest, const struct IDProperty *src) ATTR_NONNULL()
 
void IDP_ReplaceInGroup (struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL()
 
void IDP_ReplaceInGroup_ex (struct IDProperty *group, struct IDProperty *prop, struct IDProperty *prop_exist)
 
void IDP_MergeGroup (struct IDProperty *dest, const struct IDProperty *src, bool do_overwrite) ATTR_NONNULL()
 
void IDP_MergeGroup_ex (struct IDProperty *dest, const struct IDProperty *src, bool do_overwrite, int flag) ATTR_NONNULL()
 
bool IDP_AddToGroup (struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL()
 
bool IDP_InsertToGroup (struct IDProperty *group, struct IDProperty *previous, struct IDProperty *pnew) ATTR_NONNULL(1
 
bool void IDP_RemoveFromGroup (struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL()
 
void IDP_FreeFromGroup (struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL()
 
struct IDPropertyIDP_GetPropertyFromGroup (const struct IDProperty *prop, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
struct IDPropertyIDP_GetPropertyTypeFromGroup (const struct IDProperty *prop, const char *name, char type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
struct IDPropertyIDP_GetProperties (struct ID *id, bool create_if_needed) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
struct IDPropertyIDP_CopyProperty (const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
struct IDPropertyIDP_CopyProperty_ex (const struct IDProperty *prop, int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
void IDP_CopyPropertyContent (struct IDProperty *dst, struct IDProperty *src) ATTR_NONNULL()
 
bool IDP_EqualsProperties_ex (struct IDProperty *prop1, struct IDProperty *prop2, bool is_strict) ATTR_WARN_UNUSED_RESULT
 
bool IDP_EqualsProperties (struct IDProperty *prop1, struct IDProperty *prop2) ATTR_WARN_UNUSED_RESULT
 
struct IDPropertyIDP_New (char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
void IDP_FreePropertyContent_ex (struct IDProperty *prop, bool do_id_user)
 
void IDP_FreePropertyContent (struct IDProperty *prop)
 
void IDP_FreeProperty_ex (struct IDProperty *prop, bool do_id_user)
 
void IDP_FreeProperty (struct IDProperty *prop)
 
void IDP_ClearProperty (struct IDProperty *prop)
 
void IDP_Reset (struct IDProperty *prop, const struct IDProperty *reference)
 
int IDP_coerce_to_int_or_zero (const struct IDProperty *prop)
 
float IDP_coerce_to_float_or_zero (const struct IDProperty *prop)
 
double IDP_coerce_to_double_or_zero (const struct IDProperty *prop)
 
void IDP_foreach_property (struct IDProperty *id_property_root, int type_filter, IDPForeachPropertyCallback callback, void *user_data)
 
char * IDP_reprN (const struct IDProperty *prop, uint *r_len)
 
void IDP_repr_fn (const struct IDProperty *prop, void(*str_append_fn)(void *user_data, const char *str, uint str_len), void *user_data)
 
void IDP_print (const struct IDProperty *prop)
 
void IDP_BlendWrite (struct BlendWriter *writer, const struct IDProperty *prop)
 
void IDP_BlendReadData_impl (struct BlendDataReader *reader, struct IDProperty **prop, const char *caller_func_id)
 
void IDP_BlendReadLib (struct BlendLibReader *reader, struct Library *lib, struct IDProperty *prop)
 
void IDP_BlendReadExpand (struct BlendExpander *expander, struct IDProperty *prop)
 
bool IDP_ui_data_supported (const struct IDProperty *prop)
 
eIDPropertyUIDataType IDP_ui_data_type (const struct IDProperty *prop)
 
void IDP_ui_data_free (struct IDProperty *prop)
 
void IDP_ui_data_free_unique_contents (struct IDPropertyUIData *ui_data, eIDPropertyUIDataType type, const struct IDPropertyUIData *other)
 
struct IDPropertyUIDataIDP_ui_data_ensure (struct IDProperty *prop)
 
struct IDPropertyUIDataIDP_ui_data_copy (const struct IDProperty *prop)
 

Macro Definition Documentation

◆ IDP_Array

#define IDP_Array (   prop)    ((prop)->data.pointer)

Definition at line 245 of file BKE_idprop.h.

◆ IDP_BlendDataRead

#define IDP_BlendDataRead (   reader,
  prop 
)    IDP_BlendReadData_impl(reader, prop, __func__)

Definition at line 321 of file BKE_idprop.h.

◆ IDP_Double

#define IDP_Double (   prop)    (*(double *)&(prop)->data.val)

Definition at line 270 of file BKE_idprop.h.

◆ IDP_Float

#define IDP_Float (   prop)    (*(float *)&(prop)->data.val)

Definition at line 269 of file BKE_idprop.h.

◆ IDP_Id

#define IDP_Id (   prop)    ((ID *)(prop)->data.pointer)

Definition at line 273 of file BKE_idprop.h.

◆ IDP_IDPArray

#define IDP_IDPArray (   prop)    ((struct IDProperty *)(prop)->data.pointer)

Definition at line 272 of file BKE_idprop.h.

◆ IDP_Int

#define IDP_Int (   prop)    ((prop)->data.val)

Definition at line 244 of file BKE_idprop.h.

◆ IDP_String

#define IDP_String (   prop)    ((char *)(prop)->data.pointer)

Definition at line 271 of file BKE_idprop.h.

Typedef Documentation

◆ eIDPropertyUIDataType

◆ IDPForeachPropertyCallback

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 295 of file BKE_idprop.h.

◆ IDPropertyTemplate

◆ IDPWalkFunc

typedef void(* IDPWalkFunc) (void *userData, struct IDProperty *idp)

Definition at line 90 of file BKE_idprop.h.

Enumeration Type Documentation

◆ eIDPropertyUIDataType

Enumerator
IDP_UI_DATA_TYPE_UNSUPPORTED 

Other properties types that don't support RNA UI data.

IDP_UI_DATA_TYPE_INT 

IDP_INT or IDP_ARRAY with subtype IDP_INT.

IDP_UI_DATA_TYPE_FLOAT 

IDP_FLOAT and IDP_DOUBLE or IDP_ARRAY properties with a float or double subtypes.

IDP_UI_DATA_TYPE_STRING 

IDP_STRING properties.

IDP_UI_DATA_TYPE_ID 

IDP_ID.

Definition at line 325 of file BKE_idprop.h.

Function Documentation

◆ IDP_AddToGroup()

bool IDP_AddToGroup ( struct IDProperty group,
struct 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 631 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(), blender::bke::idprop::IDPGroupSerializer::entry_to_idprop(), IMB_metadata_set_field(), MOD_nodes_update_interface(), operator_last_properties_init_impl(), 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_get_operator_property(), shortcut_property_from_rna(), 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(), and version_geometry_nodes_add_attribute_input_settings().

◆ IDP_AppendArray()

void IDP_AppendArray ( struct IDProperty prop,
struct IDProperty item 
)

◆ IDP_AssignID()

void IDP_AssignID ( struct IDProperty prop,
struct ID id,
int  flag 
)

◆ IDP_AssignString()

void IDP_AssignString ( struct IDProperty prop,
const char *  st,
int  maxlen 
)

◆ IDP_BlendReadData_impl()

void IDP_BlendReadData_impl ( struct BlendDataReader reader,
struct IDProperty **  prop,
const char *  caller_func_id 
)

Definition at line 1419 of file idprop.c.

References IDP_DirectLinkGroup(), IDP_GROUP, and NULL.

◆ IDP_BlendReadExpand()

void IDP_BlendReadExpand ( struct BlendExpander expander,
struct IDProperty prop 
)

◆ IDP_BlendReadLib()

void IDP_BlendReadLib ( struct BlendLibReader reader,
struct Library lib,
struct IDProperty prop 
)

◆ IDP_BlendWrite()

void IDP_BlendWrite ( struct BlendWriter writer,
const struct IDProperty prop 
)

◆ IDP_ClearProperty()

void IDP_ClearProperty ( struct IDProperty prop)

◆ IDP_coerce_to_double_or_zero()

double IDP_coerce_to_double_or_zero ( const struct 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.

Referenced by version_idproperty_move_data_float().

◆ IDP_coerce_to_float_or_zero()

float IDP_coerce_to_float_or_zero ( const struct 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.

Referenced by version_idproperty_move_data_float().

◆ IDP_coerce_to_int_or_zero()

int IDP_coerce_to_int_or_zero ( const struct 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.

Referenced by version_idproperty_move_data_float(), and version_idproperty_move_data_int().

◆ IDP_ConcatString()

void IDP_ConcatString ( struct IDProperty str1,
struct IDProperty append 
)

◆ IDP_ConcatStringC()

void IDP_ConcatStringC ( struct IDProperty prop,
const char *  st 
)

◆ IDP_CopyIDPArray()

struct IDProperty* IDP_CopyIDPArray ( const struct IDProperty array,
int  flag 
)

◆ IDP_CopyProperty()

struct IDProperty* IDP_CopyProperty ( const struct IDProperty prop)

◆ IDP_CopyProperty_ex()

struct IDProperty* IDP_CopyProperty_ex ( const struct IDProperty prop,
int  flag 
)

◆ IDP_CopyPropertyContent()

void IDP_CopyPropertyContent ( struct IDProperty dst,
struct IDProperty src 
)

Copy content from source IDProperty into destination one, freeing destination property's content first.

Definition at line 769 of file idprop.c.

References IDP_CopyProperty(), IDP_FreeProperty(), IDProperty::next, IDProperty::prev, src, and SWAP.

Referenced by MOD_nodes_update_interface().

◆ IDP_EqualsProperties()

bool IDP_EqualsProperties ( struct IDProperty prop1,
struct IDProperty prop2 
)

◆ IDP_EqualsProperties_ex()

bool IDP_EqualsProperties_ex ( struct IDProperty prop1,
struct IDProperty prop2,
bool  is_strict 
)

◆ IDP_foreach_property()

void IDP_foreach_property ( struct IDProperty id_property_root,
int  type_filter,
IDPForeachPropertyCallback  callback,
void user_data 
)

Loop through all ID properties in hierarchy of given id_property_root included.

Note
Container types (groups and arrays) are processed after applying the callback on them.
Parameters
type_filterIf not 0, only apply callback on properties of matching types, see IDP_TYPE_FILTER_ enum in DNA_ID.h.

Definition at line 1117 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(), scene_foreach_id(), and seq_foreach_member_id_cb().

◆ IDP_FreeArray()

void IDP_FreeArray ( struct IDProperty prop)

◆ IDP_FreeFromGroup()

void IDP_FreeFromGroup ( struct IDProperty group,
struct IDProperty prop 
)

◆ IDP_FreeProperty()

void IDP_FreeProperty ( struct IDProperty prop)

Definition at line 1093 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_pose_channel_copy_data(), BKE_workspace_tool_remove(), blo_do_versions_280(), bone_free(), do_versions_after_linking_280(), ED_armature_edit_free(), ED_pose_backup_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(), blender::bke::idprop::IDPropertyDeleter::operator()(), operator_last_properties_init_impl(), operatortype_ghash_free_cb(), pose_clear_user_transforms_exec(), poseAnim_mapping_free(), poselib_backup_free_data(), pycon_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_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(), 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().

◆ IDP_FreeProperty_ex()

void IDP_FreeProperty_ex ( struct IDProperty prop,
bool  do_id_user 
)

◆ IDP_FreePropertyContent()

void IDP_FreePropertyContent ( struct IDProperty prop)

◆ IDP_FreePropertyContent_ex()

void IDP_FreePropertyContent_ex ( struct IDProperty prop,
bool  do_id_user 
)

◆ IDP_FreeString()

void IDP_FreeString ( struct IDProperty prop)

◆ IDP_GetIndexArray()

struct IDProperty* IDP_GetIndexArray ( struct IDProperty prop,
int  index 
)

Definition at line 126 of file idprop.c.

References BLI_assert, GETPROP, IDP_IDPARRAY, and IDProperty::type.

Referenced by RNA_property_collection_add().

◆ IDP_GetProperties()

struct IDProperty* IDP_GetProperties ( struct ID id,
bool  create_if_needed 
)

Get the Group property that contains the id properties for ID id.

Parameters
create_if_neededSet 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 778 of file idprop.c.

References id, IDP_GROUP, MEM_callocN, and ID::properties.

Referenced by blo_update_defaults_scene(), cycles_properties_from_ID(), cycles_visibility_properties_from_ID(), do_versions_idproperty_ui_data(), preview_id_copy_free(), proj_paint_state_viewport_init(), texture_paint_camera_project_exec(), and texture_paint_image_from_view_exec().

◆ IDP_GetPropertyFromGroup()

struct IDProperty* IDP_GetPropertyFromGroup ( const struct IDProperty prop,
const char *  name 
)

◆ IDP_GetPropertyTypeFromGroup()

struct IDProperty* IDP_GetPropertyTypeFromGroup ( const struct IDProperty prop,
const char *  name,
char  type 
)

◆ IDP_InsertToGroup()

bool IDP_InsertToGroup ( struct IDProperty group,
struct IDProperty previous,
struct IDProperty pnew 
)

This is the same as IDP_AddToGroup, only you pass an item in the group list to be inserted after.

◆ IDP_MergeGroup()

void IDP_MergeGroup ( struct IDProperty dest,
const struct IDProperty src,
bool  do_overwrite 
)

◆ IDP_MergeGroup_ex()

void IDP_MergeGroup_ex ( struct IDProperty dest,
const struct IDProperty src,
bool  do_overwrite,
int  flag 
)

If a property is missing in dest, add it. Do it recursively.

◆ IDP_New()

struct IDProperty* IDP_New ( 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:

IDProperty *group, *idgroup, *color;
group = IDP_New(IDP_GROUP, val, "group1"); // groups don't need a template.
val.array.len = 4
color = IDP_New(IDP_ARRAY, val, "color1");
idgroup = IDP_GetProperties(some_id, 1);
IDP_AddToGroup(idgroup, group);
struct IDProperty * IDP_GetProperties(struct ID *id, bool create_if_needed) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: idprop.c:778
struct IDProperty * IDP_New(char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: idprop.c:887
bool IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop) ATTR_NONNULL()
Definition: idprop.c:631
@ IDP_FLOAT
Definition: DNA_ID.h:138
@ IDP_GROUP
Definition: DNA_ID.h:141
@ IDP_ARRAY
Definition: DNA_ID.h:140
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
struct IDPropertyTemplate::@27 array

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 887 of file idprop.c.

References IDPropertyTemplate::array, BLI_assert, CLOG_ERROR, IDPropertyTemplate::d, IDProperty::data, DEFAULT_ALLOC_FOR_NULL_STRINGS, ELEM, 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, usdtokens::st(), IDPropertyTemplate::str, IDPropertyTemplate::string, IDPropertyTemplate::subtype, IDProperty::subtype, IDProperty::totallen, IDPropertyTemplate::type, type, IDProperty::type, and IDPropertyData::val.

Referenced by action_asset_type_property(), blender::bke::idprop::array_create(), bc_set_IDPropertyMatrix(), BKE_asset_metadata_idprop_ensure(), BKE_keyconfig_pref_ensure(), BKE_keyconfig_pref_set_select_mouse(), blender::bke::idprop::create(), blender::bke::idprop::create_group(), cycles_property_int_set(), id_property_create_from_socket(), 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(), idprops_ensure_named_group(), IMB_metadata_ensure(), MOD_nodes_update_interface(), object_asset_dimensions_property(), operator_last_properties_init_impl(), 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(), RNA_struct_idprops(), shortcut_get_operator_property(), shortcut_property_from_rna(), 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(), version_geometry_nodes_add_attribute_input_settings(), 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_idprops(), and WM_toolsystem_ref_properties_init_for_keymap().

◆ IDP_NewIDPArray()

struct IDProperty* IDP_NewIDPArray ( const char *  name)
Note
as a start to move away from the stupid IDP_New function, this type has its own allocation function.

Definition at line 63 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().

◆ IDP_NewString()

struct IDProperty* IDP_NewString ( const char *  st,
const char *  name,
int  maxlen 
)

◆ IDP_print()

void IDP_print ( const struct IDProperty prop)

◆ IDP_RemoveFromGroup()

bool void IDP_RemoveFromGroup ( struct IDProperty group,
struct IDProperty prop 
)
Note
this does not free the property!

To free the property, you have to do: #IDP_FreeProperty(prop);

Definition at line 657 of file idprop.c.

References BLI_assert, BLI_findindex(), BLI_remlink(), IDProperty::data, IDPropertyData::group, IDP_GROUP, IDProperty::len, and IDProperty::type.

Referenced by IDP_FreeFromGroup().

◆ IDP_ReplaceGroupInGroup()

void IDP_ReplaceGroupInGroup ( struct IDProperty dest,
const struct IDProperty src 
)

Replaces all properties with the same name in a destination group from a source group.

Referenced by wm_operator_create().

◆ IDP_ReplaceInGroup()

void IDP_ReplaceInGroup ( struct IDProperty group,
struct IDProperty prop 
)

◆ IDP_ReplaceInGroup_ex()

void IDP_ReplaceInGroup_ex ( struct IDProperty group,
struct IDProperty prop,
struct IDProperty prop_exist 
)

◆ IDP_repr_fn()

void IDP_repr_fn ( const struct IDProperty prop,
void(*)(void *user_data, const char *str, uint str_len)  str_append_fn,
void user_data 
)

◆ IDP_reprN()

char* IDP_reprN ( const struct IDProperty prop,
uint r_len 
)

◆ IDP_Reset()

void IDP_Reset ( struct IDProperty prop,
const struct IDProperty reference 
)

◆ IDP_ResizeArray()

void IDP_ResizeArray ( struct IDProperty prop,
int  newlen 
)

◆ IDP_ResizeIDPArray()

void IDP_ResizeIDPArray ( struct IDProperty prop,
int  len 
)

◆ IDP_SetIndexArray()

void IDP_SetIndexArray ( struct IDProperty prop,
int  index,
struct IDProperty item 
)

Shallow copies item.

Definition at line 110 of file idprop.c.

References BLI_assert, GETPROP, IDP_FreePropertyContent(), IDP_IDPARRAY, IDProperty::len, and IDProperty::type.

Referenced by IDP_AppendArray().

◆ IDP_SyncGroupTypes()

void IDP_SyncGroupTypes ( struct IDProperty dest,
const struct IDProperty src,
bool  do_arraylen 
)

Referenced by WM_operator_type_set().

◆ IDP_SyncGroupValues()

void IDP_SyncGroupValues ( struct IDProperty dest,
const struct IDProperty src 
)

Sync values from one group to another when values name and types match, copy the values, else ignore.

Note
Use for syncing proxies.

Referenced by ED_pose_backup_restore(), pose_bone_do_paste(), poseAnim_mapping_reset(), and poselib_backup_restore().

◆ IDP_ui_data_copy()

struct IDPropertyUIData* IDP_ui_data_copy ( const struct IDProperty prop)

◆ IDP_ui_data_ensure()

struct IDPropertyUIData* IDP_ui_data_ensure ( struct IDProperty prop)

◆ IDP_ui_data_free()

void IDP_ui_data_free ( struct IDProperty prop)

◆ IDP_ui_data_free_unique_contents()

void IDP_ui_data_free_unique_contents ( struct IDPropertyUIData ui_data,
eIDPropertyUIDataType  type,
const struct 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.

Referenced by idprop_ui_data_update_float(), idprop_ui_data_update_id(), idprop_ui_data_update_int(), and idprop_ui_data_update_string().

◆ IDP_ui_data_supported()

bool IDP_ui_data_supported ( const struct IDProperty prop)

◆ IDP_ui_data_type()

eIDPropertyUIDataType IDP_ui_data_type ( const struct IDProperty prop)