Commit Graph

5070 Commits

Author SHA1 Message Date
Harley Acheson
d2f7b93ba0 Inconsistent Percentage Formatting
Percentage formatting of x% (used elsewhere) when using percentage display factor

Differential Revision: https://developer.blender.org/D5050

Reviewed by Brecht Van Lommel
2019-06-17 10:34:09 -07:00
Harley Acheson
7c229172a6 UI_GetThemeColorShadeAlpha4fv not clamping alpha channel
Fixing small error in UI_GetThemeColorShadeAlpha4fv() clamping blue channel twice instead of alpha

Differential Revision: https://developer.blender.org/D5048

Reviewed by Brecht Van Lommel
2019-06-17 10:23:07 -07:00
Campbell Barton
12da679fa0 UI: remove redundant RNA_TYPE property in the key-map editor 2019-06-17 09:08:17 +10:00
Campbell Barton
e85635b882 Cleanup: comment spelling 2019-06-17 08:05:58 +10:00
Bastien Montagne
23254ce4ee Cleanup: Rename: Static Override -> Library Override.
Better to make internal code naming match official/UI naming to some
extent, this will reduce confusion in the future.

This is 'breaking' scripts and files that would use that feature, but
since it is not yet officially supported nor exposed in 2.80, as far
as that release is concerned, it is effectively
a 'no functional changes' commit.
2019-06-14 23:21:12 +02:00
Campbell Barton
6529d20d79 Cleanup: spelling in comments 2019-06-12 09:43:49 +10:00
Bastien Montagne
23df1a774b Fix/Cleanup: I18N: Bad usage of IFACE_ instead of TIP_.
Cheap tip: anything that is not "Camel Case" and/or that is more than
a few words long should use `TIP_` translation, not `IFACE_` one.

Also added several missing strings (including the one reported in D5056
by Jean First (@robbott), thanks).
2019-06-11 22:25:01 +02:00
Campbell Barton
749d53effd Cleanup: use doxygen sections for 2D view operators 2019-06-08 09:24:11 +10:00
Bruno Boaventura Scholl
8db514f81d Fix T60441, T60619: incorrect values for color values > 1.0
Modulo makes no sense here at all, is from an old bugfix to prevent a crash
that is no longer an issue.

Differential Revision: https://developer.blender.org/D4727
2019-06-06 18:06:33 +02:00
Jeroen Bakker
a73b250fc5 Code Style: Make Format 2019-06-05 14:30:44 +02:00
Brecht Van Lommel
0dbbc5aac7 Fix status bar and keymap editor showing Call Menu instead of menu name 2019-06-04 18:26:02 +02:00
William Reynish
e388cd8bb4 UI: Add icons to Constraints
Each constraint now has a unique icon, just like modifiers.

Icons are designed by Andrzej Ambroż & Alessio Monti, with user input.

Patch by Alessio Monti.
2019-06-04 18:10:47 +02:00
Sergey Sharybin
f5f1407a7e Fix T65451: Changing driver expression doesn't update relations 2019-06-04 12:10:42 +02:00
Campbell Barton
271ec9ff53 Cleanup: rename 2D scroll defines
- Use `V2D_SCROLL_` prefix.
- Use more descriptive names.
2019-06-04 11:05:32 +10:00
EitanSomething
cd90986bcb UI: Prevent scrollbars from getting too small to grab
Differential Revision: https://developer.blender.org/D5001
2019-06-03 18:17:24 +02:00
Campbell Barton
3041705c51 Fix T65294: Orbit navigate gizmo fails in paint modes 2019-06-03 17:55:56 +10:00
Brecht Van Lommel
114973584d Cleanup: better comments and naming for redraw flags 2019-06-02 12:47:52 +02:00
Campbell Barton
a9450dbf0d Gizmo: add 2D navigation for image/clip/sequencer views 2019-05-31 21:51:02 +10:00
Campbell Barton
56a533c071 WM: option to ignore cursor image/clip/view2d zoom
In preparation for view navigation gizmos.
2019-05-31 21:48:43 +10:00
Campbell Barton
82e8e5c871 Cleanup: move click/drag events to functions
Simplifies future changes to dragging checks and avoids
each check for drag using slightly different logic.
2019-05-30 15:02:53 +10:00
Campbell Barton
07d453dd9e UI: use matching distance checks & define for dragging 2019-05-29 18:13:33 +10:00
Aaron Carlisle
501dd9e231 Cleanup: Remove Dead Code 2019-05-28 21:11:56 -04:00
Clément Foucault
2100dba34b Cleanup: GPU: Move program point size to GPU_state 2019-05-28 17:19:42 +02:00
Campbell Barton
916c2d0e7f Cleanup: use WM_ prefix for cursor enum 2019-05-29 01:05:22 +10:00
Campbell Barton
e4ac8ab212 WM: support X/Y axis cursor wrapping
Operator flags to wrap on a single axis.

D4865 by @Gvgeo with updates.

Resolves T64585
2019-05-29 00:52:43 +10:00
Philipp Oeser
b2b1aa2f8e Fix T57090: selected node group input sockets circles not drawing in
sidebar UIList

nodesockets were actually drawn, but immediately drawn over by widgets
from the widget draw batch cache.

solution here is to "widgify" nodesocket drawing as well.

Reviewers: brecht

Maniphest Tasks: T57090

Differential Revision: https://developer.blender.org/D4963
2019-05-28 12:22:48 +02:00
Campbell Barton
7bf8d8b3c8 Cleanup: use time scrub instead of scrubbing
Renaming was only done to ED_time_scrub_ui.h, function names
and struct members used term 'scrubbing' which is ambiguous.
2019-05-28 16:17:15 +10:00
Campbell Barton
2e22cfd08a Gizmo: changes to internal drag logic
Minor changes to recent gizmo click/drag logic 08dff7b40b

Changing the gizmos highlighted part in the invoke_prepare
callback is too error prone since it needs to run
before it's known which operator will execute.

Add back 'drag_part', since it simplifies click-drag use.
While this isn't essential with custom keymaps per gizmo
it avoids having to define a keymap in the case a drag
event needs a different action.
2019-05-28 13:36:43 +10:00
Ray Molenkamp
8a484aca22 Cleanup: Fix build warning in bf_editor_interface
widget_draw_text_ime_underline was not const correct
leading to warnings with MSVC
2019-05-27 10:46:50 -06:00
Campbell Barton
08dff7b40b Gizmo: add per gizmo keymaps
Remove click-drag support for tweak gizmo,
rely on keymap events instead.

This is needed for some gizmos to use modifiers keys
without having all gizmos use all modifier keys (see: T63996).
2019-05-28 02:41:59 +10:00
Jacques Lucke
e472646282 Fix T65080: handle case when View2D has 0 scale 2019-05-27 17:15:29 +02:00
Mal Duffin
118ac491d2 Fix poor display of time codes in sequencer Info panel
Allow using : in labels inside buttons.

Differential Revision: https://developer.blender.org/D4944
2019-05-27 13:31:27 +02:00
Campbell Barton
c25164e16d UI: use tool label instead of id-names for quick favorites 2019-05-27 16:30:23 +10:00
Campbell Barton
552f5da3c4 Mitigate T64346: Quick Favorites items cant be removed
For now don't show missing quick favorite menu items which are missing.

Once menu editing is supported they could be displayed.
2019-05-27 15:33:12 +10:00
Campbell Barton
ab0e839f9a Fix T65074: Crash on switching color
Make buttons to take active `Paint` from the context.

D4946 by @Gvgeo
2019-05-27 14:00:15 +10:00
Brecht Van Lommel
8fdbd1377e Sequencer: ensure Strip is the default active panel 2019-05-22 19:52:41 +02:00
Alexander Gavrilov
5397d8d268 UI: allow shrinking panel height to zero when open.
Currently if a panel becomes empty (draw simply returns), it stays
at the last non-empty height. This seems to be caused by some legacy
checks that may be completely obsolete, but the safest fix is to at
least allow resetting height when the panel is open.
2019-05-22 17:59:22 +03:00
Campbell Barton
521b96fa69 Error in last commit 2019-05-23 00:38:29 +10:00
Campbell Barton
8ec3b5b7c6 Fix T64679: Missing dirty preferences tag
Use a default update function for user preferences that tags
dirty and redraws (if changed).

This avoids relying on button changes which fail in some cases.
2019-05-23 00:35:37 +10:00
Clément Foucault
60319e25f2 GPU: Refactor GPU_batch_draw_range_ex
Rename it to GPU_batch_draw_advanced and use base instance when possible.

Also add GPU_batch_bind to bind the vao independantly of drawing commands.
2019-05-22 13:29:05 +02:00
Campbell Barton
0f98c05c8b Fix WITH_HEADLESS build 2019-05-22 10:34:55 +10:00
Campbell Barton
a459a590c2 Fix part of T64679: Missing dirty preferences tag
- Editing shortcuts.
- Editing walk mode navigation.
- Adding/removing paths.
2019-05-22 00:59:43 +10:00
Jacques Lucke
9877445ed7 Fix T64927: bad timeline number spacing with scaled UI 2019-05-21 10:57:11 +02:00
Campbell Barton
2cec669d34 Fix T64912: Crash right clicking on 'Add New Material'
D4904 by @Gvgeo
2019-05-21 16:58:34 +10:00
Campbell Barton
6640bcca74 UI: support drawing booleans with icons as check-boxes
Previously, if a boolean happened to use an icon there was no way
to make it display as a check-box from Python scripts.

The previous logic meant we ended up having to edit the RNA.
Since booleans with icons don't work well with the split-property layout
(now used for most of the interface).
Icons were being removed from RNA then added back using awkward Python
ternary expressions in the interface scripts.

The toggle argument now has an unset state (-1).

- toggle=True: no checkbox (emboss).
- toggle=False: always use a checkbox (no icon).
- toggle=(unset/-1): depends on the icon status, default as before.

Since toggle=False was default, this isn't used in existing UI logic.
2019-05-21 15:06:44 +10:00
Campbell Barton
87fda5bc60 Cleanup: const assignments to simplify code
Also avoids using uninitialized vars.
2019-05-21 12:30:07 +10:00
Campbell Barton
d00c54c855 Cleanup: reorder report argument for pointer assignment
Most code uses ReportList argument last (or at least not first)
when an optional report list can be passed in.
2019-05-20 23:11:57 +10:00
Dalai Felinto
785ff8e1d2 UI: add Visibility panel for objects
The outliner should not be the only way for users to change these settings.
The Python API was extended to keep these properties positive and keyframable.

Differential Revision: https://developer.blender.org/D4889
2019-05-20 13:47:37 +02:00
Jacques Lucke
81320ce7f7 Fix T64766: use grid size from user preferences 2019-05-20 11:48:37 +02:00
Brecht Van Lommel
c0352551d2 Fix T64822: curve widget point selection does not take into account DPI 2019-05-19 11:33:27 +02:00