|
Blender
V3.3
|
#include <stdio.h>#include <string.h>#include "BLI_dynstr.h"#include "BLI_listbase.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "DNA_ID.h"#include "BKE_idprop.h"#include "BKE_idtype.h"#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 (struct ReprState *state, const char *str, const uint str_len, bool quote) |
| static void | idp_repr_fn_recursive (struct 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) |
| #define STR_APPEND_STR_LEN_QUOTE | ( | str, | |
| str_len | |||
| ) | idp_str_append_escape(state, str, str_len, true) |
| void IDP_print | ( | const IDProperty * | prop | ) |
Definition at line 223 of file idprop_utils.c.
References IDP_reprN(), MEM_freeN, and NULL.
| void IDP_repr_fn | ( | const IDProperty * | prop, |
| void(*)(void *user_data, const char *str, uint str_len) | str_append_fn, | ||
| void * | user_data | ||
| ) |
Definition at line 195 of file idprop_utils.c.
References idp_repr_fn_recursive(), state, ReprState::str_append_fn, and user_data.
Referenced by IDP_reprN().
|
static |
Definition at line 83 of file idprop_utils.c.
References BKE_idtype_idcode_to_name_plural(), BLI_assert_unreachable, IDProperty::data, ListBase::first, IDPropertyData::group, GS, id, IDP_ARRAY, IDP_Double, IDP_DOUBLE, IDP_Float, IDP_FLOAT, IDP_GROUP, IDP_ID, IDP_IDPARRAY, IDP_Int, IDP_INT, IDP_String, IDP_STRING, IDProperty::len, LISTBASE_FOREACH, MAX2, ID::name, NULL, 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().
| char* IDP_reprN | ( | const IDProperty * | prop, |
| uint * | r_len | ||
| ) |
Definition at line 211 of file idprop_utils.c.
References BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_get_len(), BLI_dynstr_new(), IDP_repr_fn(), NULL, and repr_str().
Referenced by IDP_print().
|
static |
Definition at line 40 of file idprop_utils.c.
References BLI_assert, BLI_snprintf_rlen(), Freestyle::c, len, state, and str.
Definition at line 206 of file idprop_utils.c.
References BLI_dynstr_nappend(), len, str, and user_data.
Referenced by IDP_reprN().