|
Blender V4.3
|
#include <algorithm>#include <cstdio>#include <cstring>#include "BLI_dynstr.h"#include "BLI_listbase.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "DNA_ID.h"#include "BKE_idprop.hh"#include "BKE_idtype.hh"#include "MEM_guardedalloc.h"#include "BLI_strict_flags.h"Go to the source code of this file.
Classes | |
| struct | ReprState |
Macros | |
| #define | STR_APPEND_STR(str) state->str_append_fn(state->user_data, str, uint(strlen(str))) |
| #define | STR_APPEND_STR_QUOTE(str) idp_str_append_escape(state, str, uint(strlen(str)), true) |
| #define | STR_APPEND_STR_LEN_QUOTE(str, str_len) idp_str_append_escape(state, str, str_len, true) |
| #define | STR_APPEND_FMT(format, ...) |
Functions | |
IDProp Repr | |
Convert an IDProperty to a string. Output should be a valid Python literal (with minor exceptions - float nan for eg). | |
| static void | idp_str_append_escape (ReprState *state, const char *str, const uint str_len, bool quote) |
| static void | idp_repr_fn_recursive (ReprState *state, const IDProperty *prop) |
| void | IDP_repr_fn (const IDProperty *prop, void(*str_append_fn)(void *user_data, const char *str, uint str_len), void *user_data) |
| static void | repr_str (void *user_data, const char *str, uint len) |
| char * | IDP_reprN (const IDProperty *prop, uint *r_len) |
| void | IDP_print (const IDProperty *prop) |
| const char * | IDP_type_str (const eIDPropertyType type, const short sub_type) |
| const char * | IDP_type_str (const IDProperty *prop) |
Referenced by idp_repr_fn_recursive().
Referenced by idp_repr_fn_recursive().
Referenced by idp_repr_fn_recursive().
Referenced by idp_repr_fn_recursive().
| void IDP_print | ( | const IDProperty * | prop | ) |
Definition at line 257 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_repr_fn | ( | const IDProperty * | prop, |
| void(* | str_append_fn )(void *user_data, const char *str, uint str_len), | ||
| void * | user_data ) |
Definition at line 230 of file idprop_utils.cc.
References idp_repr_fn_recursive(), state, and ReprState::str_append_fn.
Referenced by IDP_reprN().
|
static |
Definition at line 86 of file idprop_utils.cc.
References BKE_idtype_idcode_to_name_plural(), BLI_assert_unreachable, IDProperty::data, ListBase::first, IDPropertyData::group, GS, IDP_ARRAY, IDP_Bool, IDP_BOOLEAN, IDP_DOUBLE, IDP_Double, IDP_EnumItemFind(), IDP_FLOAT, IDP_Float, IDP_GROUP, IDP_ID, IDP_IDPARRAY, IDP_INT, IDP_Int, idp_repr_fn_recursive(), IDP_STRING, IDP_String, IDProperty::len, LISTBASE_FOREACH, IDPropertyData::pointer, state, STR_APPEND_FMT, STR_APPEND_STR, STR_APPEND_STR_LEN_QUOTE, STR_APPEND_STR_QUOTE, IDProperty::subtype, IDProperty::type, and v.
Referenced by IDP_repr_fn(), and idp_repr_fn_recursive().
| char * IDP_reprN | ( | const IDProperty * | prop, |
| uint * | r_len ) |
Definition at line 245 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(), and keymap_handler_log_kmi_op_str().
|
static |
Definition at line 43 of file idprop_utils.cc.
References BLI_assert, len, SNPRINTF_RLEN, state, and str.
| const char * IDP_type_str | ( | const eIDPropertyType | type, |
| const short | sub_type ) |
Definition at line 265 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().
| const char * IDP_type_str | ( | const IDProperty * | prop | ) |
Definition at line 309 of file idprop_utils.cc.
References IDP_type_str(), IDProperty::subtype, and IDProperty::type.
|
static |
Definition at line 240 of file idprop_utils.cc.
References BLI_dynstr_nappend(), len, and str.
Referenced by IDP_reprN().