Commit Graph

456 Commits

Author SHA1 Message Date
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
a8d5a22f7f ui precision drawing - avoid calling pow(10, -prec) since the range is small use a fixed array. 2013-06-19 14:08:27 +00:00
5e9e906bd3 Take precision into account for calculating display of small numbers 2013-06-19 12:16:50 +00:00
9d4cc7885d fix for filesel autocomplete, it had the annoying behavior if you entered in a non-existing name, of executing it and then asking to add the dir. 2013-06-19 11:53:48 +00:00
c9341334b1 add BLI_strcpy_rlen, replace strcat, which was used in misleading way. 2013-06-16 08:29:02 +00:00
815a87a652 fix [#35346] Python: still UI issue with popup and dropdown list 2013-06-13 09:12:53 +00:00
860fce4eb9 Code cleanup: removed some unused UI button types
* CHARTAB: not needed anymore with improved copy/paste support and text input.
* IDPOIN: replaced by SEARCH_MENU.
* ICONROW/ICONTEXTROW: replaced by RNA enums.
* NUMABS: can use min/max limits instead.
* BUT_TOGDUAL, TOG3, TOGR, SLI: not used in 2.5 interface.
2013-06-09 18:05:50 +00:00
7068a5eba7 tweak to recent commit, don't show keymap in menu tooltips. 2013-06-02 15:58:43 +00:00
876cc99aff display menu items key shortcuts in the button tooltips. 2013-06-01 05:53:44 +00:00
127c39b8a4 Fix for [#35224] Transform Orientation - order inconsistency
Fix turned out to remove as much "manual UI" from 3D view header as possible. Mode selector and all transform manipulators/orientations stuff are now RNA-based UI (leaving basically only edit mesh select modes with custom handlers, as they have some quite specific features).

To achieve this, four main modifications were done:
* enum-operator-generated menus are now MENU (i.e. dropdown lists) in headers too.
* All bit-flag enums expanded in ROW buttons now have a handling consistent with e.g. layers, or what we already have for transform manipulators, i.e. clicking select only one element, shift-click to select multiple ones.
* Consequently, the three RNA booleans manipulators flags are merged into a single bit-flag enum (yes, this is also an API change, though I doubt many scripts use it).
* Now the width of enum-based dropdown lists is computed from longest item name in enum, no more from a dummy place holder string (when no label/name is given).

All this allows to remove some code from 3DView/transform areas, that was actually mostly duplicating RNA/operator one.

Also done a few optimizations here and there (among others, do not pass &numitems to RNA_property_enum_items() when you do not need it, saves at least an iteration over enum items to count them).

Many thanks to Brecht for the reviews!
2013-05-12 13:16:11 +00:00
00014949c8 Fix #35262: assiging shortcuts from e.g. delete or selection mode menus did not
work anymore. This was due to a bugfix to show missing shortcut keys for e.g. the
mesh > vertices > separate menu. Both should work now.
2013-05-10 23:41:41 +00:00
a4634bfe67 code cleanup: ui_but_is_rna_undo --> ui_is_but_rna_undo (ui_is_but_*** is used elsewhere) 2013-05-08 13:00:33 +00:00
e5a968276e fix [#35055] Crash in Edit Source feature for multilevel menus
dont show the option when operating on a menu since its not supported.
2013-04-23 15:22:22 +00:00
e430ee20d5 More fix (cleanup) to r56063: remove call to RNA_create_pointer, it has already been called by uiButGetOperatorPtrRNA() if needed.
(I thought it would also copy idproperties, but as it does not...).
2013-04-19 13:03:30 +00:00
c4dbd8bc49 fix for crash in r56063, was just missing an ID property copy (which menu does) 2013-04-19 12:14:15 +00:00
03d6319862 Fix: when using a search menu with an operator's enum prop, the operator was previously always executed with default options (appart from the search-set enum, of course). Now we store the op's properties in search button, so that you can specify non-default options (as it was already possible with e.g. pop-up menu from an operator's enum prop).
To achieve this, some code (callbacks and search button creation) was moved from wm_operators.c to interface/interface.c, and a new UI function was added, uiDefSearchButO_ptr.

Note: This new code uses the fact that uiButHandleFunc callbacks get executed before operator when one of its arg is the button itself!

Many thanks to Campbell who helped me a lot with this patch!

Cleanup: also removed two unused pointers from uiBut struct.
2013-04-15 15:01:12 +00:00
649b92e688 Fix: uiBlockSetNFunc was using uiButHandleFunc as param signature, instead of uiButHandleNFunc one (was working because both are the same currently). 2013-04-13 16:28:39 +00:00
2b2099cd51 Fix #34875: 0 digits of precision was not supported for FloatProperty, now
you can specify precision=0 for this, and use -1 for the default 2.
2013-04-08 18:55:08 +00:00
634dfcdecc fix for fix: re-activating buttons to fix [#33466], meant the icon didn't get refreshed immediately. 2013-04-08 00:32:32 +00:00
858ff6b696 Fix for [#34898] Typo in error message of mathutils.Vector
* Also fixed some more cases of "more then" -> "more than".
2013-04-07 15:09:06 +00:00
677172fd65 code cleanup: use bools in interface handlers, dont show translation menu when right clicking on splash, use less confusing args for copy/paste function. 2013-04-04 15:16:29 +00:00
7bbaf4853a code cleanup: use bools in UI and WM code, quiet some shadow warnings, remove unused function uiEmboss() 2013-04-04 02:05:11 +00:00
8f8613df90 fix for missing redraw in own commit r55554 (Ctrl+F text editor find).
since an event wasn't added to the queue no redraws we're done when the panel was already open, instead use a notifier.
2013-03-25 21:31:24 +00:00
5a87e4d255 code cleanup: remove unused button type HSVSLI 2013-03-23 16:03:13 +00:00