108 for (j = 0; j <= n->
idx_max; j++) {
121 const char *heading_exp =
"", *trailing_exp =
"";
142 (
double)(n->
val[i] * fac),
162 const char *cur = (i == n->
idx) ?
"|" :
"";
176 const char *cur = (i == n->
idx) ?
"|" :
"";
195 for (i = 0; i <= n->
idx_max; i++) {
213 for (j = 0; j <= n->
idx_max; j++) {
247 for (j = 0; j <= n->
idx_max; j++) {
269 int len = strlen(&n->
str[cur]) + 1;
270 int n_cur = cur + buf_len;
276 memmove(&n->
str[n_cur], &n->
str[cur],
len);
277 memcpy(&n->
str[cur], buf,
sizeof(
char) * buf_len);
288 const bool use_single_line_error,
298 char str_unit_convert[256];
301 str_unit_convert,
sizeof(str_unit_convert),
str, unit_scale, unit->
system,
type);
308 *r_value /= unit_scale;
313 *r_value = atof(
str);
320 if (ascii >=
'0' && ascii <=
'9') {
331 const char *utf8_buf =
NULL;
332 char ascii[2] = {
'\0',
'\0'};
333 bool updated =
false;
342 if ((event->
ctrl == 0) && (event->
alt == 0) && (event->
ascii !=
'\0') &&
343 strchr(
"01234567890@%^&*-+/{}()[]<>.|", event->
ascii)) {
367 switch (event->
type) {
377 utf8_buf =
event->utf8_buf;
378 ascii[0] =
event->ascii;
396 else if (event->
shift || !n->
str[0]) {
417 SWAP(
int, t_cur, cur);
421 memmove(&n->
str[cur], &n->
str[t_cur], strlen(&n->
str[t_cur]) + 1);
463 idx = (idx + idx_max + (
event->ctrl ? 0 : 2)) % (idx_max + 1);
492 else if (event->
ctrl) {
545 if (!updated && !utf8_buf && (event->
utf8_buf[0] || event->
ascii)) {
546 utf8_buf =
event->utf8_buf;
547 ascii[0] =
event->ascii;
553 if (!updated && event->
ctrl) {
557 if ((!utf8_buf || !utf8_buf[0]) && ascii[0]) {
562 if (utf8_buf && utf8_buf[0]) {
584 const float val_prev = n->
val[idx];
594 printf(
"%s\n",
error);
610 n->
val[idx] = -n->
val[idx];
628 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, ReportType type, const char *message)
double BKE_scene_unit_scale(const struct UnitSettings *unit, const 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_fl(float *array_tar, const int size, const float val)
void copy_vn_i(int *array_tar, const int size, const int val)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void copy_vn_short(short *array_tar, const int size, const short val)
MINLINE void zero_v3(float r[3])
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
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_NONNULL()
int BLI_utf8_invalid_strip(char *str, size_t length) ATTR_NONNULL()
bool BPY_run_string_as_number(struct bContext *C, const char *imports[], const char *expr, struct BPy_RunErrInfo *err_info, double *r_value)
@ 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
void WM_clipboard_text_set(const char *buf, bool selection)
char * WM_clipboard_text_get_firstline(bool selection, int *r_len)