Commit Graph

341 Commits

Author SHA1 Message Date
9bf603a307 Deactivate last active button for pie menu popups. 2014-08-14 13:18:07 +02:00
eca7c96a28 Maybe slightly controversial pie commit:
Make pie menu item placement touch the radius from the internal side of
the buttons rather than placing on the center on the cirtcle. This
allows us to get rid of the separate visual angle property, also allows
for tighter placement of pies with a smaller radius without easily
overlapping.

Also pie menu title now always appears above the threshold indicator.
2014-08-13 15:11:19 +02:00
028fd29eeb Pie Menus C code backend.
This commit merges the code in the pie-menu branch.

As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.

Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/

Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments

Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.

Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 11:02:26 +02:00
47e7ce696c Fix for glitch with menus not reliably setting an active item (D674)
When menus are clamped to the window bounds,
its was possible not to have an active menu-item under the mouse,
Making Ctrl+S,Enter not completely reliable.

Changes needed to support this are:

- menu item is activated on popup menus
  (to avoid relying on mouse-over)
- moving mouse away from menu items only de-activates when over a new menu-item.
- Mouse clicks are ignored if they are not directly over the menu item.
2014-08-03 20:35:28 +10:00
f88593df69 Fix for mixup in startup.blend data init when userprefs.blend was missing
Rename UI_init_userdef_factory to BLO_update_defaults_userpref_blend
This closely matches BLO_update_defaults_startup_blend so makes sense for them to be together.
2014-07-23 20:23:05 +10:00
f745564e4e GSOC 2013 paint
Yep, at last it's here!

There are a few minor issues remaining but development can go on in
master after discussion at blender institute.

For full list of features see:

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting

Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
2014-07-21 12:02:05 +02:00
ea2043eb3a UI: Add support for popups to refresh their layput (D578)
This is needed for popups to chance state once activated,
currently it makes use of operators `check` callback, after values are modified,
as the file selector does already.
2014-06-15 01:42:31 +10:00
f663c4f857 Code cleanup: UI, unnecessary float/int conversion 2014-06-14 00:47:11 +10:00
f61e885706 UIL: Dragging popups wasn't updating safe-areas 2014-05-02 09:25:04 +10:00
1b9db9911d Code cleanup: use bools
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
2014-04-17 16:04:28 +10:00
a5b9f22454 BGE - button for deactivate sensors, controllers and actuators
This change introduces a new checkbox to deactivate the sensors, controllers and/or actuators. It is useful during the development phase to avoid delete sensors, controllers or actuators if you want to test something new.

NOC: The wiki page is being updated (the images mostly), but the feature is already in the 2.71 release log.

{F61628}

Reviewers: moguri, dfelinto, campbellbarton, dingto, #user_interface, billrey

Reviewed By: moguri

CC: billrey

Differential Revision: https://developer.blender.org/D16
2014-04-16 22:40:07 -03:00
a2b3c93852 Slight modification to previous color wheel tweak.
Do not use compat version, we do not have a valid previous value really
to use here.
2014-04-12 19:33:28 +03:00
def5999f9b UI: support for dragging popups title area 2014-04-02 18:43:53 +11:00
8f1a6e26b6 Fix Circle picker not liking linear color properties much. Again, visual
result for picked color was different from what was displayed on color
wheel under the cursor.
2014-03-14 02:30:27 +02:00
bce924b43c HSL color wheel implementation.
This is a standard Hue - Saturation - Lightness model
(see for instance entry on wikipedia here: https://en.wikipedia.org/wiki/HSL_and_HSV)
Note though the difference between HSV and HSL saturation, which are not the same.

The advantage of having this color selection scheme is that artists can select
shades and tints of a color easily by using the lightness slider. Also colors
are arranged on (approximated) perceived lightness on the color wheel.

Beware, Old files opened with this preference saved will crash!

Reviewers: sergey, brecht, campbellbarton

Differential Revision: https://developer.blender.org/D385
2014-03-12 18:58:50 +02:00
d0ec83c1a2 Fix T38809: regression, text cursor offset in number buttons
Use the same offset for all edit-buttons now.
2014-02-25 10:31:04 +11:00
4c21e2b382 UI: split ui_popup_menu_memory into get/set functions and store as uint 2014-02-13 09:37:28 +11:00
d4c87f2f79 Code cleanup: remove unused button aspect 2014-02-13 09:37:27 +11:00
35f62bdced UI: refactor menus to remove menus encoded in strings
On every redraw a single unopened dropdown boxe would translate
and convert every EnumPropertyItem into a string,
then decode every item, and search those items to find the name of the button to draw.

Replace this with a custom menu callback for RNA enums,
tooltips for enums now show too.
2014-02-10 13:04:43 +11:00
127330d6ca UI: multi-drag number button editing
clicking and dragging down edits multiple number buttons at once. (patch D270)
2014-02-08 09:42:26 +11:00
ff0ceb9926 UI: split ui_button_execute_do into begin/end 2014-02-08 09:42:26 +11:00
2dafd1bfb8 UI: butstore API to generalize button storage for modal handlers 2014-02-08 09:42:26 +11:00
e2541f87bc Fix T38516: crash when using color picker from redo panel. 2014-02-06 18:02:31 +01:00
fc9626b1df Change confusing check discovered while working on HCL color wheel:
COLOR widgets never get created with UI_GRAD_V_ALT values. This is
intended for HSVCUBE color sliders only so reverting this to old value
before it was substituted with a define, which was -1.

There's one case where COLOR buttons get defined with a1 value different
than -1 which is in ui_def_but_rna. There the step value of the RNA
property is used. However, that meant that if step equaled to 9, which
is UI_GRAD_V_ALT value (unlikely) or if UI_GRAD_V_ALT was changed to 10
in future, or we added check for e.g. UI_GRAD_L_ALT which is 10 in HCL
branch, color widget would not get a color selection menu spawned.
2014-02-05 10:45:14 +02:00
44855f9ef2 Code Cleanup: remove redundant NULL checks and add function attributes 2014-01-20 11:13:53 +11:00
b9114cb609 UI: Use bool rather then int/short's where possible 2014-01-04 18:10:01 +11:00
8901701808 UI: Display alpha checkers in image info's color swatch. 2013-12-24 17:20:37 +11: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
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
dde5e5ce25 User Interface: Align number buttons labels to the left, number right 2013-12-11 21:27:13 +11:00
1ed822202f Code Cleanup: pass rectangles as const in insterface files 2013-12-07 15:47:57 +11:00
f91187d3c3 Code cleanup: replace rectf_scale with BLI_rctf_scale
and add area arg to ui_handler_panel_region
2013-12-03 23:53:21 +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
f842ce82e6 UI List: ctrl click on names in list can be used for renaming.
Summary:
More information here:
http://lists.blender.org/pipermail/bf-committers/2013-November/042113.html

Reviewers: brecht

Reviewed By: brecht

CC: mont29

Differential Revision: http://developer.blender.org/D8
2013-11-23 18:43:23 +01:00
904129fd9b Squashed commit of the following:
commit b8b7180760b7c57f15b9930c29207febcf5fefb3
Author: Bastien Montagne <montagne29@wanadoo.fr>
Date:   Thu Nov 21 16:31:16 2013 +0100

    Code cleanup: replace "LISTLABEL" button type by an "UI_BUT_LIST_ITEM" button flag.

    Summary:
    Rationals:
    I) I was never that happy to have a full button type just to set custom colors to labels inside listitems!
    II) If we use (as planned) TEX buttons instead of labels to allow listitems click-rename, I'd like to be able to use listitems' theme color here as well, much easier witha flag than adding yet another button type!

    Note: related to D8

    Reviewers: brecht

    Differential Revision: http://developer.blender.org/D25
2013-11-21 16:51:29 +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
25560a3734 Fix T37545: SV+H color cube display changes H slider position when modifying S or V.
The widget for the SV gradient was disabling display colorspace transform, but this was not happening for the H slider below, leading to varying H values used to calculate the slider position.
2013-11-20 11:37:56 +01: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
d4cf5e3605 fix [#37078] Search props don't react on click at the right end (where 'X' is if field not empty) 2013-10-15 00:24:53 +00:00
03f7885b0a id-data eyedropprt, currently only accessible via the Ekey,
We need to investigate ways to add options like this without cluttering the interface.
2013-10-08 15:32:54 +00:00
ed758beb66 move eyedropper into its own file, uses mostly different includes to interface_ops.c 2013-10-08 15:07:52 +00:00
90ff86a6d9 fix [#36699] ASCII-character "|" blocks parenting
don't split '|' for rna-property search buttons (but keep for operator search).
2013-09-11 04:56:35 +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
40d9ab1139 add missing break to space-buttons listener, also rewind own recent change (uiPopupBlockHandle.retvec size) 2013-07-25 12:46:20 +00:00
b09de65c8d internal change for ui_mouse_motion_towards_*** use,
only run these checks for buttons using the UI_BLOCK_MOVEMOUSE_QUIT flag.
no functional change but makes debugging easier and was calculating mouse motion in relation to some popups for no reason.
2013-07-24 20:50:30 +00:00
063be8fdc0 Fix [#35750] list items in properties editor (text colors not following list item theme).
Issue goes back since we stopped using LISTROW button to draw item's name (i.e. since we have custom buttons in list items!).

This commit:
* Adds a new flag to uiBlock, UI_BLOCK_LIST_ITEM, to mark blocks used for each list item.
* Adds a new button type, LISTLABEL, which basically behaves exactly as LABEL, but uses wcol_list_item color set.
* When uiItemL is called, it checks whether current block has UI_BLOCK_LIST_ITEM set, and if so, switch produced button to LISTLABEL type.
* Adds a new helper func, ui_layout_list_set_labels_active, called after the active list item has been "drawn", to set all LISTLABEL buttons as UI_SELECT.

Note custom widget_state_label() was removed, in interface_widgets.c, as it did nothing more than default widget_state().

Thanks to Brecht for the review and advices.
2013-06-26 07:28:55 +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
815a87a652 fix [#35346] Python: still UI issue with popup and dropdown list 2013-06-13 09:12:53 +00:00