Commit Graph

2948 Commits

Author SHA1 Message Date
Campbell Barton
551d1a1ed5 Code cleanup: style 2014-03-24 13:14:19 +11:00
Campbell Barton
44d6c686fa Fix for Layout.operator_enum ignoring alignment 2014-03-20 01:34:24 +11:00
Bastien Montagne
c450ea2ab0 Fix T39203: Boid particle naming UI semi-freeze
uiList was not handling correctly UI_BUT_DISABLED TEX name buttons!
2014-03-18 15:24:34 +01:00
Campbell Barton
eaf387b8df UI: bypass text clipping on buttons with no text 2014-03-18 11:07:10 +11:00
Antony Riakiotakis
4d44f70d5f Follow up to previous commit:
Make HSL wheel useful in compositing.

In HSL, 0.5 lightness corresponds to most vibrant colors so make that
default for locked wheels (previous value of 1.0 just made it white).
Also, unlock the wheel for both very bright and very dark colors.
2014-03-18 01:33:28 +02:00
Antony Riakiotakis
06de5be90e Fix T39228 Gamma/lift/gain are burned out in the circular color pickers
and value/lightness slider stops midway.

Issue here is manyfold:

Color wheel does not support properties with different soft min/max
values than 1.0 (which after experimenting a little I left as is), and
also color management is completely destroying the mapping between the
value slider and the RNA property value range. To solve this I have
disabled color management by setting the property to gamma corrected
(only in RNA, Sequence editor coders please check!), otherwise it will
just become a big mess of tracking where color comes from and what kind
of color transforms it needs in different color pickers (if property has
non normalized range etc). HSL is not really meant to represent colors
outside a normalized space so I have disabled setting lightness above
1.0 in this model.

This will work, however it is hacking a color picker to do something
other than what it is supposed to do: pick a color from the screen
accurately. Which means normalized values always. The non normalized
colors picked for lift/gain/gamma through the pickers do not correspond
to any accurate colors; they are rather a user friendly way to 'sort of'
choose a color and a gamma with an indication of maximum value.

I think that lift/gamma/gain nodes need a dedicated widget for this
(besides it is quite clear that some options are written for that use
case) -or- a separate gamma multiplier for the picked color (which
should itself be in a normalized space)
2014-03-18 01:08:36 +02:00
Campbell Barton
a861e5572a UI: Add theme color for viewport overlay
Was using wire or black in many places, this color is used for cursor,
camera guides, transform helper lines. So its possible to have a dark
background with light overlay color.

Patch D331 by Brita, with some edits.
2014-03-18 05:40:18 +11:00
Antony Riakiotakis
7227117bed Fix own bug reported on irc by Venomgfx, missing value slider in color
pickers.
2014-03-17 20:01:33 +02:00
Campbell Barton
37dd7360d6 Code cleanup: naming conventions 2014-03-16 22:11:14 +11:00
Campbell Barton
2097e621ed Code cleanup: use r_ prefix for return args 2014-03-16 03:26:23 +11:00
Campbell Barton
433d55e9b4 Code cleanup: spelling & style 2014-03-15 23:46:02 +11:00
Antony Riakiotakis
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
Antony Riakiotakis
33f51abe4e Better fix for T37545.
This was supposed to fix inaccuracies between S-H wheel but it makes the
colors selected through the SV-H color cube wrong (see http://
%28SV-H%29-Inaccurate). Instead of deactivating color management for SV
and H widgets just reenable correction for the Hue wheel. This is wrong
because HSV always refers to display space and we -have- to account for
that when using linear color RNA properties.
2014-03-14 01:42:50 +02:00
Antony Riakiotakis
5e56f45a66 Fix own bug after HSL picker commit. HSV Cube based pickers missed HSV
buttons.
2014-03-13 18:43:21 +02:00
Campbell Barton
c17acf1d6e Code cleanup: quiet warning, 'else' would always crash (& never occurred)
also quiet waning clamping
2014-03-13 12:03:18 +11:00
Campbell Barton
032b42d48d Code cleanup: de-duplicate switch statement, style edits 2014-03-13 06:31:06 +11:00
Antony Riakiotakis
deef641878 Anticipate future color picker types and don't crash (uiBut could be
NULL in some cases)
2014-03-12 21:06:57 +02:00
Antony Riakiotakis
4fa93b1ea4 Code cleanup (tm): Some code deduplication for HSL 2014-03-12 19:12:58 +02:00
Antony Riakiotakis
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
Campbell Barton
e5e0888a8f UI: allow passing "" for icon only enum buttons and still get an icon
Enum icon-only buttons were getting their strings set,
then truncated with blenders string shortening methods, then not drawn
because there was no room (since buttons are icon width).

Modify UI code so icon-only buttons don't get names and passing "" to a
button won't have its text set later on.
2014-03-12 22:56:10 +11:00
Campbell Barton
a7faad9aa1 Code cleanup: UI - de-duplicate menu/row/listrow enum logic 2014-03-12 22:54:26 +11:00
Bastien Montagne
330272be9a Fix T39060: "Choose by numbers" do not work with Enum-menus, but work with operators-menus
The "layer" exception in handling numbers for menus was a bit too much greedy, eating numbers for all RNA props instead of just for layers ones...
2014-03-11 21:07:57 +01:00
Campbell Barton
ced595a37d Fix T39087: Weight Paint, custom color ranges don't update in viewport 2014-03-11 21:19:59 +11:00
Lukas Tönne
19935f0fc3 Fix for potential bug in copy-to-selected ui button operator: Return
value was mixing operator result with an int/boolean.
2014-03-10 09:51:59 +01:00
Bastien Montagne
571f184d35 Fix T39000: Align Objects Axis button is not redraw.
We have to apply button *before* checking others in the ROW, else changes are not propagated to them yet.
2014-03-06 22:03:11 +01:00
Campbell Barton
e60fb0fd29 Fix for collapse ignoring pinned panels 2014-03-02 12:49:30 +11:00
Campbell Barton
3b5ea6b972 Fix for own error with updating view2d for NDOF 2014-03-01 15:28:51 +11:00
Campbell Barton
13ea967cce Code cleanup: correct abs use and quiet warnings 2014-03-01 14:26:18 +11:00
Campbell Barton
45fc0514fb Fix for crash copying from non RNA color buttons 2014-02-28 23:45:31 +11:00
Campbell Barton
d3b9457991 Code cleanup: style/warnings 2014-02-28 11:04:15 +11:00
Campbell Barton
64eea27533 Fix T38602: Aligned layout breaks if panel too wide 2014-02-27 19:01:14 +11:00
Campbell Barton
118d86aa73 UI: avoid for divide by zero for icon buttons (no need to clip text) 2014-02-27 18:30:06 +11:00
Campbell Barton
5e7f995b08 Fix: 'F-Curve Editor' popup text was truncated. 2014-02-27 16:18:42 +11:00
Bastien Montagne
c35ac8f7ac Fix T38678: Long strings on Search widget not getting shortened/no tooltip.
Note this commit only makes search menus wider and adds shortening to their strings.
Adding tooltips here is not trivial, would need much bigger changes...

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D341
2014-02-26 21:53:56 +01:00
Campbell Barton
d2548f561c WM: hide screen management and ndof operators from seach popup 2014-02-26 13:48:41 +11:00
Campbell Barton
6a43c2ac1a Fix text select offset /w zoomed UI & popups (colorpicker) 2014-02-25 14:18:04 +11:00
Campbell Barton
b6c439d0c4 UI: remove number specific button offset when selecting text 2014-02-25 12:42:17 +11:00
Campbell Barton
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
Brecht Van Lommel
97e9bb9488 Fix T38804: unnecessary empty space in the modifier UI. 2014-02-24 21:03:19 +01:00
Brecht Van Lommel
0f96d0552d Fix T38810: ctrl + click panel collapse not taking tabs into account. 2014-02-24 19:53:15 +01:00
Brecht Van Lommel
97c66c9bf1 Fix T38812: color picker incorrectly cancelling operation when clicking next to it. 2014-02-24 19:53:15 +01:00
Brecht Van Lommel
e2734eb1dd Fix misaligned alpha slider label in color picker. 2014-02-24 19:53:14 +01:00
Campbell Barton
002b2c1541 MSVC: resolve utf8 encoding issue with some codepages 2014-02-23 14:38:27 +11:00
Bastien Montagne
ea5090f8c0 Minor UI messages fixes. 2014-02-22 13:49:40 +01:00
Campbell Barton
739ae1d809 NDOF: fix for view3d ignoring lens values when panning
image, mce, view2d and view3d now have matching pan speed.
2014-02-22 16:30:48 +11:00
Campbell Barton
543b57fbeb Fix T38348: Panel remains scrolled when switching tabs 2014-02-22 13:07:02 +11:00
Thomas Dinges
3436c41dee Fix T38739: Simulations, unsupported in the Game Engine, could not be removed from the UI.
Also shorten info messages a bit.
2014-02-21 12:46:17 +01:00
Campbell Barton
c50b23fa67 Fix own error - tab scrolling mixed up region/window coords 2014-02-21 16:12:53 +11:00
Campbell Barton
a00ebaecce UI: Increase cursor distance to leave keyboard navigation
This mitigates T38505, where moving the mouse while using the wheel/keys
can exit the submenu.
So at least smaller unintentional movements won't be misinterpreted.
2014-02-21 15:57:09 +11:00
Campbell Barton
1df068c39a UI: Fix for rna-enum submenus not showing a right arrow 2014-02-20 13:30:52 +11:00