93 for (j = 0; j <= n->
idx_max; j++) {
106 const char *heading_exp =
"", *trailing_exp =
"";
127 (
double)(n->
val[i] * fac),
147 const char *cur = (i == n->
idx) ?
"|" :
"";
161 const char *cur = (i == n->
idx) ?
"|" :
"";
180 for (i = 0; i <= n->
idx_max; i++) {
195 for (j = 0; j <= n->
idx_max; j++) {
229 for (j = 0; j <= n->
idx_max; j++) {
251 int len = strlen(&n->
str[cur]) + 1;
252 int n_cur = cur + buf_len;
258 memmove(&n->
str[n_cur], &n->
str[cur],
len);
259 memcpy(&n->
str[cur], buf,
sizeof(
char) * buf_len);
270 const bool use_single_line_error,
280 char str_unit_convert[256];
283 str_unit_convert,
sizeof(str_unit_convert),
str, unit_scale, unit->
system,
type);
290 *r_value /= unit_scale;
295 *r_value = atof(
str);
302 if (ascii >=
'0' && ascii <=
'9') {
313 const char *utf8_buf =
NULL;
315 char ascii[2] = {
'\0',
'\0'};
316 bool updated =
false;
326 strchr(
"01234567890@%^&*-+/{}()[]<>.|", event_ascii)) {
337 if (
ELEM(event_ascii,
'=',
'*')) {
350 switch (event->
type) {
360 utf8_buf =
event->utf8_buf;
361 ascii[0] = event_ascii;
400 SWAP(
int, t_cur, cur);
404 memmove(&n->
str[cur], &n->
str[t_cur], strlen(&n->
str[t_cur]) + 1);
446 idx = (idx + idx_max + ((
event->modifier &
KM_CTRL) ? 0 : 2)) % (idx_max + 1);
527 if (!updated && !utf8_buf && event->
utf8_buf[0]) {
528 utf8_buf =
event->utf8_buf;
529 ascii[0] = event_ascii;
539 if ((!utf8_buf || !utf8_buf[0]) && ascii[0]) {
544 if (utf8_buf && utf8_buf[0]) {
566 const float val_prev = n->
val[idx];
576 printf(
"%s\n",
error);
592 n->
val[idx] = -n->
val[idx];
610 n->
val[idx] = val_prev;
typedef float(TangentPoint)[2]
struct Scene * CTX_data_scene(const bContext *C)
struct ReportList * CTX_wm_reports(const bContext *C)
void BKE_report(ReportList *reports, eReportType type, const char *message)
double BKE_scene_unit_scale(const struct UnitSettings *unit, int unit_type, double value)
size_t BKE_unit_value_as_string_adaptive(char *str, int len_max, double value, int prec, int system, int type, bool split, bool pad)
bool BKE_unit_replace_string(char *str, int len_max, const char *str_prev, double scale_pref, int system, int type)
double BKE_unit_apply_preferred_unit(const struct UnitSettings *settings, int type, double value)
bool BKE_unit_string_contains_unit(const char *str, int type)
void copy_vn_short(short *array_tar, int size, short val)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void copy_vn_fl(float *array_tar, int size, float val)
void copy_vn_i(int *array_tar, int size, int val)
MINLINE void zero_v3(float r[3])
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
void BLI_str_cursor_step_utf8(const char *str, size_t maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
int BLI_str_utf8_size(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_str_utf8_invalid_strip(char *str, size_t length) ATTR_NONNULL(1)
bool BPY_run_string_as_number(struct bContext *C, const char *imports[], const char *expr, struct BPy_RunErrInfo *err_info, double *r_value) ATTR_NONNULL(1
@ USER_FLAG_NUMINPUT_ADVANCED
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
int UI_calc_float_precision(int prec, double value)
void(* MEM_freeN)(void *vmemh)
static void error(const char *str)
struct ReportList * reports
bool use_single_line_error
char WM_event_utf8_to_ascii(const struct wmEvent *event)
void WM_clipboard_text_set(const char *buf, bool selection)
char * WM_clipboard_text_get_firstline(bool selection, int *r_len)