Blender V5.3
idprop_utils.cc File Reference
#include <algorithm>
#include <cstdio>
#include <cstring>
#include "BLI_dynstr.hh"
#include "BLI_listbase.hh"
#include "BLI_string.hh"
#include "DNA_ID.h"
#include "BKE_idprop.hh"
#include "BKE_idtype.hh"
#include "MEM_guardedalloc.h"
#include "BLI_strict_flags.hh"

Go to the source code of this file.

Classes

struct  blender::ReprState

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define STR_APPEND_STR(str)
#define STR_APPEND_STR_QUOTE(str)
#define STR_APPEND_STR_LEN_QUOTE(str, str_len)
#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 blender::idp_str_append_escape (ReprState *state, const char *str, const uint str_len, bool quote)
static void blender::idp_repr_fn_recursive (ReprState *state, const IDProperty *prop)
void blender::IDP_repr_fn (const IDProperty *prop, void(*str_append_fn)(void *user_data, const char *str, uint str_len), void *user_data)
static void blender::repr_str (void *user_data, const char *str, uint len)
char * blender::IDP_reprN (const IDProperty *prop, uint *r_len)
void blender::IDP_print (const IDProperty *prop)
const char * blender::IDP_type_str (eIDPropertyType type, short sub_type)
const char * blender::IDP_type_str (const IDProperty *prop)

Macro Definition Documentation

◆ STR_APPEND_FMT

#define STR_APPEND_FMT ( format,
... )
Value:
state->str_append_fn( \
state->user_data, state->buf, uint(SNPRINTF_RLEN(state->buf, format, __VA_ARGS__)))
#define SNPRINTF_RLEN(dst, format,...)
const int state

Referenced by blender::idp_repr_fn_recursive().

◆ STR_APPEND_STR

#define STR_APPEND_STR ( str)
Value:
state->str_append_fn(state->user_data, str, uint(strlen(str)))
#define str(s)

Referenced by blender::idp_repr_fn_recursive().

◆ STR_APPEND_STR_LEN_QUOTE

#define STR_APPEND_STR_LEN_QUOTE ( str,
str_len )
Value:
idp_str_append_escape(state, str, str_len, true)

Referenced by blender::idp_repr_fn_recursive().

◆ STR_APPEND_STR_QUOTE

#define STR_APPEND_STR_QUOTE ( str)
Value:
idp_str_append_escape(state, str, uint(strlen(str)), true)

Referenced by blender::idp_repr_fn_recursive().