Commit Graph

529 Commits

Author SHA1 Message Date
86df4baef8 Code cleanup: move old->new button search into ui_but_find_old 2014-02-08 01:49:24 +11:00
6135797ec8 Fix for button comparisons ignoring rna-index 2014-02-08 01:34:22 +11:00
e2541f87bc Fix T38516: crash when using color picker from redo panel. 2014-02-06 18:02:31 +01:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
4ae7ae6f2e Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11:00
44855f9ef2 Code Cleanup: remove redundant NULL checks and add function attributes 2014-01-20 11:13:53 +11:00
8b6b42b694 UI: tweak menu padding and make separator line more visible.
Adds some padding to the left of the icon, adds more space around the separator
line and make it more visible, and add some spacing at the top and bottom of
the menu. Ref T37794

Reviewed By: dingto, billrey

Differential Revision: https://developer.blender.org/D223
2014-01-17 17:06:11 +01:00
d5c9b509ec Fix issues with float precision in numinput, like 'R 123' who would show 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
2014-01-08 17:05:05 +01:00
6734936c13 RNA API: use bool's for enum itemf callbacks. 2014-01-04 18:10:01 +11:00
b9114cb609 UI: Use bool rather then int/short's where possible 2014-01-04 18:10:01 +11:00
33a027b3a3 Fix T37993: mass of Rigid Body ignores scene unit scale
Mass units weren't scaled in the ui.
2013-12-31 18:10:30 +01:00
aab587817c Fix T37795: Resetting a button to the default value could crash
Added ui_handle_afterfunc_add_operator so a button can queue an operator
to run without executing it immediately.
2013-12-20 01:07:09 +11:00
4b206af1c9 Fix T37847: some buttons displayed too wide in multi-column menus. 2013-12-18 19:35:13 +01:00
0e694b9b7e Code Clenaup: use const for button checking functions 2013-12-18 19:33:05 +11:00
a621d1e488 UI: Tabs categories for panels (D75)
- works by defining panel categories, currently restricted to the toolbar.
- no panels define bl_categories yet, so no user visible changes since tabs only show when there are multiple.
- panel pinning is available in rmb menu or alt+lmb.
2013-12-17 03:55:45 +11:00
c701082a92 RNA: Add pixels property type 2013-12-13 04:40:30 +11:00
09b859d03f UI: change how number button strings are concatenated (to easy add new suffix) 2013-12-12 00:33:41 +11:00
dde5e5ce25 User Interface: Align number buttons labels to the left, number right 2013-12-11 21:27:13 +11:00
6976866d5a User Interface: Ctrl+C over a menu copies the py command
also use bools rather then ints
2013-12-05 17:26:03 +11:00
1815225faa Blender Font (BLF): add length argument to string width/height functions
This also fixes a crash editing buttons longer then UI_MAX_DRAW_STR
2013-12-02 21:10:07 +11:00
77719bfd06 File Browser: autocomplete keeps focus in the file field when entering a folder.
There is a bunch of internal refactoring going on too:
* No longer use operators to handle these directory and file fields, only makes
  things more complicated than they should be.
* Handle autocomplete partial/full match deeper in the UI code
* Directory field still does not keep focus, that's for another time to fix,
  you can already do pretty quick keyboard only navigation with the file field.

Reviewed By: elubie

Differential Revision: http://developer.blender.org/D29
2013-11-29 17:49:01 +01:00
c5944812d6 User Defaults: Change user defaults based on decission by new UI team - T37518
Currently these changes are not saved in startup.blend to avoid bloating
our repo whenever we want to make minor changes.
2013-11-25 11:51:23 +11:00
811ce5a696 Code cleanup: Minor addition to rB254aa8f3a0fbffcbcb886cfaa81b630ae3e9bb78: handle copying of drawflag in ui_but_update_from_old_block()
Note that this is not really needed currently, as the only flag being copied here (UI_BUT_REDALERT) remained in but->flag. However, since we'll have more flags in drawflag now, it's better to explicitly handle this situation...
This func could use some cleanup anyway (a bunch of commented code here)...

Thanks to Campbell for noting this!
2013-11-21 20:25:31 +01:00
254aa8f3a0 Squashed commit of the following:
commit 6f97e194e58aab38d351c796bf7bb6abca33f5f9
Author: Bastien Montagne <montagne29@wanadoo.fr>
Date:   Wed Nov 20 21:18:20 2013 +0100

    Code cleanup: Move some uiBut->flag to uiBut->drawflag, make those flags anonymous enums.

    Summary:
    Make some room in but->flag (I did not add another flag, we already have drawflag, which was nearly not used up till now).

    Note: I’m not sure whether REDALERT (and perhaps even DISABLED?) should not go to but->drawflag as well...

    Related to D8

    Reviewers: brecht

    Differential Revision: http://developer.blender.org/D22
2013-11-21 14:43:08 +01:00
1ea47c9af9 Code Cleanup: style, spelling and pep8 edits 2013-11-20 03:40:10 +11:00
035d86402b Fix: tab completing a filepath name in file browsers asks to create a new
directory if name was not fully matched

When hitting tab to complete a directory name in the filepath field in the
filebrowser Blender shows a "create new directory?" popup, if the beginning
of directory name typed in the field matches many entries. For example if you
have directories in the open directory called "test123" and "test456", typing
"te", tab would complete up to "test", but ask to create a new folder with the
name "test".

This patch unsets the boolean storing the info about changing filepath if the
folder with the completed name does not exist.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D10
2013-11-19 16:42:50 +01:00
Dalai Felinto
614b15a70d missing bit from last float precision update (patch by 'unknow' via irc) 2013-11-01 18:11:54 +00:00
Dalai Felinto
1cf1984d1c Python ui: increase interface float precision limit from 6 to 7 2013-10-31 03:21:20 +00:00
7c8c49a34a style cleanup 2013-10-21 23:35:08 +00:00
af6636bbed Project Pampa request: copy-paste for curve mapping widgets
Use C-c for copy, C-v for paste over the widget.
2013-10-16 17:48:33 +00:00
Lukas Toenne
e192f5b198 Fix #37047, Expanded Enum Alignment glitching.
The enum item buttons in the node header change their alignr when switching the tree type, due to different things being shown in the header (this rarely happens in other panels, so it doesn't turn
up easily). The new alignnr needs to be copied to existing block buttons in ui_but_update_from_old_block to ensure the enum items get aligned to each other.
2013-10-12 11:05:12 +00:00
76c94972da Fix [#37039] Resize lists by new grab handles puts file into unsaved state.
Simply do not enable undo for LISTBOX buttons (the same as ROUNDBOX & co). Many thanks to Campbell who did all the work here!
2013-10-11 12:50:19 +00:00
1255b1e82d fix [#37007] Save to file - increment number doesn't update background color of filename field if hovered 2013-10-09 15:36:04 +00:00
abb37f4152 replace RNA_property_array_length with RNA_property_array_check where the length of the array is only used to check if the property is an array or not.
(this isnt reliable since arrays can be zero length).
2013-09-16 01:35:52 +00:00
811669c14e minor style clanup and use more meaningful name for 3DCONNEXION source code. 2013-09-14 12:04:10 +00:00
3579dfe23a interface, replace '|' with define UI_SEP_CHAR 2013-09-11 05:06:27 +00:00
6fce374637 simplify idprop reallocation with MEM_recallocN 2013-09-05 04:26:08 +00:00
29d348f8de add checks for bad args to RNA_def_property_ui_range & RNA_def_property_range and fix one instance where (min > max).
also remove redundant float/double conversion in ui_get_but_step_unit()
2013-09-02 22:28:18 +00:00
3d0e56e8d9 fix for ui glitch, pressing backspace over a button to reset to the default value didnt work for the uilist text button (others too), missing redraw. 2013-08-31 04:11:50 +00:00
8ef934c73f ghash/bli-listbase edits, rename BLI_ghash_pop -> BLI_ghash_popkey (since it takes a key as an arg and isnt popping any element from the hash as you might expect).
add BLI_pophead/tail, since getting the first element from a list and removing it is a common task.
2013-08-26 23:37:08 +00:00
02608d257a add api call for initializing events from the windows eventstate. 2013-07-29 08:29:04 +00:00
d894e5e762 internal api: args passed to ui_but_equals_old() were wrong order. 2013-07-27 08:06:46 +00:00
aed11512fc skip creating the draw-string for number buttons while editing the text (value was overwritten) 2013-07-25 13:24:32 +00:00
55640288d2 ui: internal change. replace strcat with BLI string functions for key-event drawing. 2013-07-25 13:18:11 +00:00
7db1d6556d code cleanup: add break statements in switch ()'s, (even at the last case). 2013-07-21 08:16:37 +00:00
64a172907a Hide unnecessary error print when showing tooltip over a property with no RNA
path, ideally this would work everywhere but it's a known limitation, no need
to print an error in the console each time it happens.
2013-07-17 17:31:12 +00:00
eedd541929 fix for misc errors
- reference to out of scope stack var
- freeing fixes size array (never allocated)
- add matching va_end for va_start
2013-07-13 05:46:48 +00:00
a3643ee3d6 fix [#36073] Changing list items misses undo push 2013-07-09 23:40:53 +00:00
750b30c7dd fix [#36008] Can't set values higher than 1.0 in HSV colour picker (But can in RGB) - also some strange behavior 2013-07-09 04:00:56 +00:00
bf6a74e3fc Bugfix [35841] WM_OT_context_[toggle/cycle/etc.] operators dont show shortcut
keys in menus (or tooltips) for properties they are used to toggle/cycle through

Some properties can be toggled using hotkeys via WM_OT_context_* operators, but
these hotkeys aren't really shown anywhere obvious like other hotkeys (i.e.
they're not shown in tooltips or menus). Although it is possible to look these
up in the userprefs/keymaps editor, it is quite tricky doing so, and most users
would just assume that since no shortcut is displayed, there simply isn't one at
all.

This commit introduces a slightly hacky fix which basically amounts to checking
if a property can be set by any of the few operators which are used for this
purpose. In order to keep this from being too sluggish, I've currently limited
this to only working on Editor (e.g. "Show Seconds" in Anim Editors) and
ToolSettings (e.g. "Use Proportional Edit") properties.

There are still some corner cases that would be nice to solve too (i.e. the
Pivot Type enum menu/dropdown should really be able to show the hotkeys which
have been assigned for each of those items, since they're by-and-large quite
hidden and obscure), though being able to show some of these is perhaps better
than not showing any!
2013-07-07 12:53:15 +00:00