Age | Commit message (Collapse) | Author |
|
Add 'pad *' in addition to '=' to toggle basic/advanced numinput modes.
|
|
This allows to get the same "quickies" as in previous (2.69) code, (XYZ, -/, etc.), yet keeping nice non-conflicting new stuff like cursor navigation or copy/paste.
You can switch to full mode hitting '=', and back to simple mode hitting 'ctrl ='.
|
|
Since there isn't always a numpad available this should work.
|
|
additional 'noise' digits.
Expose float precision helper in UI_interface.h API, so that numinput can use this helper as numbuttons already do.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D186
|
|
|
|
happening again.
|
|
Previous one was way over complicated, and did not worked with units!
|
|
multi-bytes utf8 chars (like the '°' of angle values), now call BLI_utf8_invalid_strip() to prevent this.
|
|
|
|
have to use ctrl to activate them)...
|
|
numinput).
|
|
Summary:
This completly changes the way modal numinput is handled. Now, edited expression is a string, which then gets unit- and py-evaluated to get a float value.
We gain many power and flexibility, but lose a few "shortcuts" like '-' to negate, or '/' to inverse (if they are really needed, we still can add them with modifiers, like e.g. ctrl-/ or so).
Features:
- units (cm, ", deg, etc.).
- basic operations from python/BKE_unit (+, *, **, etc.), and math constants and functions (pi, sin, etc.).
- you can navigate in edited value (left/right key, ctrl to move by block) and insert/delete chars, e.g. to fix a typo without having to rewrite everything.
- you can go to next/previous value with (ctrl-)TAB key.
- As before, hitting backspace after having deleted all leading chars will first reset the edited value to init state, and on second press, the whole "modal numinput" editing will be cancelled, going back to usual transform with mouse.
Notes:
- Did not touch to how values are shown in header when modal numinput is not enabled (would do that in another commit), so this is still quite inconsistent.
- Added back radian support in BKE_unit.
- Added arcminute/arcsecond to BKE_unit.
(those unit changes affect all angle UI controls, btw, so you can now enter radians or longitude/latitude values when in degrees units).
Related to T37600.
Reviewers: brecht, campbellbarton, carter2422
Reviewed By: brecht, campbellbarton, carter2422
Thanks everybody!
Differential Revision: http://developer.blender.org/D61
|
|
redraw flag were mixing up types - int/char/bool, add enum type to use instead.
|
|
|
|
paste errors), also remove BKE_script.h
|
|
|
|
bevel/inset/marker-move would use uninitialized memory when used as modal operators and pressing backspace after entering values.
|
|
|
|
This commit adds "shift" and numtype to both Bevel and Inset mesh operators.
It also gets rid of the magicnumber used in NumInput to str operation (currently, 20 chars per element, now defined as NUM_STR_REP_LEN in ED_numinput.h).
|
|
investigation lead to finding 3 bugs here...
- transform key input handling didnt ignore minus key on an unsigned value as it should.
- not being able to set numcuts to 0 made typing in numbers not very useful.
- backspace would set the cuts to an unsigned value.
|
|
|
|
|
|
else if's
|
|
|
|
fix for sequencer unique naming which was missed with string length update.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
- remove print from numinput and get rid of some float/double warnings.
- nicer align line-number in text editor.
|
|
|
|
|
|
MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
|
|
|
|
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing: UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
|
|
|
|
Easier for transform to have different values per transform then (also different from gears values).
(Based on a bug reported by Jonathan Smith)
|
|
Use in marker move operator.
|