|
Blender
V2.93
|
Go to the source code of this file.
Classes | |
| struct | NumInput |
Macros | |
| #define | NUM_STR_REP_LEN 64 |
| #define | NUM_MAX_ELEMENTS 3 |
Typedefs | |
| typedef struct NumInput | NumInput |
Enumerations | |
| enum | { NUM_AFFECT_ALL = (1 << 0) } |
| enum | { NUM_NULL_ONE = (1 << 0) , NUM_NO_NEGATIVE = (1 << 1) , NUM_NO_ZERO = (1 << 2) , NUM_NO_FRACTION = (1 << 3) } |
NumInput | |
| #define | NUM_MODAL_INCREMENT_UP 18 |
| #define | NUM_MODAL_INCREMENT_DOWN 19 |
| void | initNumInput (NumInput *n) |
| void | outputNumInput (NumInput *n, char *str, struct UnitSettings *unit_settings) |
| bool | hasNumInput (const NumInput *n) |
| bool | applyNumInput (NumInput *n, float *vec) |
| bool | handleNumInput (struct bContext *C, NumInput *n, const struct wmEvent *event) |
| bool | user_string_to_number (bContext *C, const char *str, const struct UnitSettings *unit, int type, double *r_value, const bool use_single_line_error, char **r_error) |
| #define NUM_MAX_ELEMENTS 3 |
Definition at line 28 of file ED_numinput.h.
| #define NUM_MODAL_INCREMENT_DOWN 19 |
Definition at line 104 of file ED_numinput.h.
| #define NUM_MODAL_INCREMENT_UP 18 |
Share with TFM_MODAL_CANCEL in transform.h.
Definition at line 103 of file ED_numinput.h.
| #define NUM_STR_REP_LEN 64 |
Definition at line 27 of file ED_numinput.h.
| anonymous enum |
| Enumerator | |
|---|---|
| NUM_AFFECT_ALL | |
Definition at line 61 of file ED_numinput.h.
| anonymous enum |
| Enumerator | |
|---|---|
| NUM_NULL_ONE | |
| NUM_NO_NEGATIVE | |
| NUM_NO_ZERO | |
| NUM_NO_FRACTION | |
Definition at line 67 of file ED_numinput.h.
Definition at line 207 of file numinput.c.
References NumInput::flag, floorf, hasNumInput(), NumInput::idx, NumInput::idx_max, NUM_AFFECT_ALL, NUM_EDITED, NUM_FAKE_EDITED, NUM_NO_FRACTION, NUM_NO_NEGATIVE, NUM_NO_ZERO, NUM_NULL_ONE, NumInput::val, NumInput::val_flag, and NumInput::val_org.
Referenced by applyBakeTime(), applyBevelWeight(), applyBoneEnvelope(), applyBoneRoll(), applyBoneSize(), applyCrease(), applyCurveShrinkFatten(), applyEdgeSlide(), applyGPOpacity(), applyGPShrinkFatten(), applyMaskShrinkFatten(), applyNormalRotation(), applyPushPull(), applyResize(), applyRotation(), applySeqSlide(), applyShear(), applyShrinkFatten(), applySkinResize(), applyTilt(), applyTimeScale(), applyTimeSlide(), applyTimeTranslate(), applyToSphere(), applyTrackball(), applyTranslation(), applyVertSlide(), Bend(), ed_marker_move_modal(), edbm_bevel_numinput_set_value(), edbm_inset_modal(), ElementResize(), gpencil_interpolate_modal(), gpencil_primitive_modal(), graphkeys_decimate_modal(), loopcut_modal(), pose_slide_modal(), radial_control_modal(), and sequencer_slip_modal().
| bool hasNumInput | ( | const NumInput * | n | ) |
Definition at line 185 of file numinput.c.
References NumInput::flag, NumInput::idx_max, NUM_EDITED, NUM_FAKE_EDITED, and NumInput::val_flag.
Referenced by applyBakeTime(), applyBevelWeight(), applyBoneEnvelope(), applyBoneRoll(), applyCrease(), applyCurveShrinkFatten(), applyEdgeSlide(), applyGPOpacity(), applyGPShrinkFatten(), applyMaskShrinkFatten(), applyNumInput(), applyPushPull(), applyRotation(), applyShear(), applyShrinkFatten(), applyTilt(), applyToSphere(), applyTrackball(), applyVertSlide(), Bend(), constraints_rotation_impl(), decimate_draw_status_header(), ed_marker_move_modal(), ed_marker_move_update_header(), edbm_bevel_modal(), edbm_inset_modal(), edbm_inset_update_header(), gpencil_interpolate_modal(), gpencil_interpolate_status_indicators(), gpencil_primitive_modal(), gpencil_primitive_status_indicators(), graphkeys_decimate_modal(), headerBoneSize(), headerResize(), headerRotation(), headerSeqSlide(), headerTimeScale(), headerTimeSlide(), headerTimeTranslate(), headerTranslation(), loopcut_modal(), pose_slide_draw_status(), pose_slide_modal(), radial_control_modal(), radial_control_update_header(), sequencer_slip_modal(), sequencer_slip_update_header(), and transformEvent().
| void initNumInput | ( | NumInput * | n | ) |
There are important things to note here for code using numinput:
Those two steps have to be separated (so do not use a common call to hasNumInput() to do both in the same time!).
Definition at line 83 of file numinput.c.
References B_UNIT_NONE, copy_vn_fl(), copy_vn_i(), copy_vn_short(), NumInput::flag, NumInput::idx, NumInput::idx_max, NUM_MAX_ELEMENTS, NumInput::str, NumInput::str_cur, NumInput::unit_sys, NumInput::unit_type, NumInput::unit_use_radians, USER_UNIT_NONE, NumInput::val, NumInput::val_flag, NumInput::val_inc, NumInput::val_org, and zero_v3().
Referenced by ed_marker_move_init(), edbm_bevel_init(), edbm_inset_init(), initTransInfo(), pose_slide_init(), radial_control_invoke(), ringsel_init(), and sequencer_slip_invoke().
| void outputNumInput | ( | NumInput * | n, |
| char * | str, | ||
| struct UnitSettings * | unit_settings | ||
| ) |
Definition at line 102 of file numinput.c.
References B_UNIT_ROTATION, BKE_scene_unit_scale(), BKE_unit_value_as_string_adaptive(), BLI_snprintf(), BLI_strncpy(), BLI_utf8_invalid_strip(), NumInput::flag, float(), NumInput::idx, NumInput::idx_max, NUM_AFFECT_ALL, NUM_EDITED, NUM_INVALID, NUM_INVERSE, NUM_NEGATE, NUM_STR_REP_LEN, str, NumInput::str, NumInput::str_cur, UI_calc_float_precision(), NumInput::unit_sys, NumInput::unit_type, NumInput::unit_use_radians, NumInput::val, and NumInput::val_flag.
Referenced by applyBakeTime(), applyBevelWeight(), applyBoneEnvelope(), applyBoneRoll(), applyCrease(), applyCurveShrinkFatten(), applyEdgeSlide(), applyGPOpacity(), applyGPShrinkFatten(), applyMaskShrinkFatten(), applyPushPull(), applyShear(), applyShrinkFatten(), applyTilt(), applyToSphere(), applyTrackball(), applyVertSlide(), Bend(), decimate_draw_status_header(), ed_marker_move_update_header(), edbm_inset_update_header(), gpencil_interpolate_status_indicators(), gpencil_primitive_status_indicators(), headerBoneSize(), headerResize(), headerRotation(), headerSeqSlide(), headerTimeScale(), headerTimeSlide(), headerTimeTranslate(), headerTranslation(), loopcut_modal(), pose_slide_draw_status(), radial_control_update_header(), and sequencer_slip_update_header().
| bool user_string_to_number | ( | bContext * | C, |
| const char * | str, | ||
| const struct UnitSettings * | unit, | ||
| int | type, | ||
| double * | r_value, | ||
| const bool | use_single_line_error, | ||
| char ** | r_error | ||
| ) |
Referenced by ui_number_from_string_units().