Commit Graph

4940 Commits

Author SHA1 Message Date
758bb8c70d Clenaup: odd use of ternary operators 2019-04-16 12:09:34 +02:00
5498e7f193 CMake: add library deps to CMakeLists.txt
Tested to work on Linux and macOS.

This will be enabled once all platforms are verified.

See D4684
2019-04-16 06:20:52 +02:00
f5ea1fc4fb Render: new material preview
* EEVEE support through irradiance volume and light probe.
* New shader ball shape (designed by Robin Marin).
* New cloth and liquid shapes, removed monkey.
* Replace world sphere by toggle to use world for any shape.
* Slight bevel on cube.
* More subdivision for displacement preview.
* Fixed and improved UV mapping for all shapes.
* Material icon / asset preview now uses specified shape instead of always
  a sphere. So for example hair material can be displayed as hair.

Ref T57683
2019-04-14 20:09:02 +02:00
47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
eff8cc9ccc Cleanup: doxy comments
Use doxy references to function and enums,
also correct some names which became out of sync.
2019-04-14 10:48:42 +02:00
6b06440ed8 Fix 'static override' message showing in ID template tooltip.
We only want to show that when library overrides are enabled.
2019-04-11 17:47:38 +02:00
b5d1e0ad1e Cleanup: spelling 2019-04-10 00:38:47 +10:00
eb9237eb20 Cleanup: style 2019-04-09 08:44:06 +02:00
George Vogiatzis
a180b754eb Interface: New region type 'Footer', used by text editor
* It can be hidden by dragging it up/down.
* It can be at the top or bottom, independent of the header.
* It uses the color theme from the header.
* It does not change its color, when the area becomes active.

Currently, it is used in the text editor to display the file path.

Differential Revision: https://developer.blender.org/D4601
2019-04-05 13:48:26 +02:00
Victor Seiji Hariki
2f8b7030d4 Fix T62939: Incorrect cursor position when exiting UI slider
Differential Revision: https://developer.blender.org/D4629
2019-04-03 15:14:57 +02:00
1d365374e8 Merge branch 'blender2.7' 2019-04-02 17:51:44 +02:00
4c2b79a1d5 Constraints: Use RNA update instead of block update
Allows to have more control over which tags are done for which
properties.

This is a part of T62960 which fixes the issue in the 2.7 series.
2019-04-02 17:44:18 +02:00
6470056a0d Cleanup: empty expression statement warning 2019-04-02 17:54:04 +11:00
90638d850d Remove evaluated RNA pointer lookup in interface
Since there is a flush of evaluated values back to the original
for an active dependency graph we don't need this lookup anymore.

Not only it slows interface drawing down, but also is becoming
in a way of the upcoming fix.
2019-04-01 14:30:42 +02:00
700346d377 Fix T63137: crash pressing enter to confirm menu, after recent changes. 2019-03-30 20:37:45 +01:00
Nathan Craddock
1ef59026e4 UI: tweak display of report messages in the status bar.
Remove fading away the color, share theme colors with info editor.

Differential Revision: https://developer.blender.org/D4197
2019-03-28 20:02:59 +01:00
fdf92b923a Fix T63037: Accelerator keys fail when another key is highlighted 2019-03-28 16:44:27 +11:00
5a1a633d04 UI: minor change to active-default logic
Don't attempt to activate default button if it's already active.

Also expand on the flags comment.
2019-03-28 00:59:50 +11:00
2d34420648 UI: support an 'active default' button for pop-ups
Use this for the save confirmation dialog so it has a default action
when pressing enter which draws with a highlight so it's clear what the
default action is (the dialog was just closing before).

Resolves T57686
2019-03-28 00:26:00 +11:00
e26b67fa1e Fix popovers from enums failing on drag-release 2019-03-27 15:35:49 +11:00
6f7392312c Fix T62929: Linked To Scene Object cannot be made single user.
Code was still 2.7x one here, Object's IDtemplate in properties editor
is now based on current view layer's collection of objects, not scene's
one anymore.
2019-03-26 14:41:37 +01:00
67516b93d8 Fix T62515: crash when rendering finishes with mouse over progress bar.
Tooltip should be copied entirely, not just the the argument because then the
function and argument don't always match.
2019-03-26 12:04:14 +01:00
1bde690e91 Cleanup: style, use braces for editor/interface 2019-03-26 21:16:13 +11:00
c602ec74fd GPU: State: Replace GL_BLEND by GPU_blend 2019-03-25 20:26:52 +01:00
a3e9b61a2f RNA: add UILayout.prop_with_menu function
Matches prop_with_popover, supporting menu types,
useful if we want to control behavior of enum switching.
2019-03-25 20:34:47 +11:00
d8d06120e4 RNA: rename prop_popover_enum to prop_with_popover
A version for menu's is going to be added next and we already have
UILayout.prop_menu_enum.

This name indicates the popover is added behavior instead of a
different kind of widget.
2019-03-25 20:34:30 +11:00
2fa0a9a329 Error in last commit 2019-03-25 19:08:02 +11:00
e583642312 UI: add UILayout.prop_popover_enum function
Support for RNA enum buttons that activate popovers when clicked.

This means we get useful tooltips, shortcuts and Ctrl-Wheel cycling
over enum items.

It also avoids inconvenient & slow access of enum values currently done
via RNA type lookups on the type to get the name & icon to use for a
regular popover button.

Resolves T57738
2019-03-25 19:05:13 +11:00
ca0cc0518f Cleanup: simplify toggle button logic 2019-03-25 16:21:13 +11:00
6dbe96757b Cleanup: return argument naming 2019-03-25 12:19:55 +11:00
e86e0aad55 Cleanup: use braces for interface code 2019-03-25 11:16:46 +11:00
72ede30d0f Cleanup: pass const image data to IMB_ibImageFromMemory 2019-03-25 09:08:29 +11:00
a38313c3bd Cleanup: style, array wrapping
Add trailing comma for clang-format.
2019-03-25 09:02:04 +11:00
ff8c32fa6b Fix uninitialized variable use for right aligned checkbox 2019-03-25 07:34:06 +11:00
809101e69e UI: support Ctrl-C copy for popover buttons
Match menu logic that sets the Python expression to call the popover.
2019-03-24 10:52:23 +11:00
72c323d50c GPU: State: Replace GL_LINE_SMOOTH by GPU_line_smooth 2019-03-23 23:54:01 +01:00
ed9af18c76 GPU: Replace glEnable/glDisable but GPU_state calls 2019-03-23 23:43:26 +01:00
ce658d2485 Cleanup: add doxy sections to interface_ops.c 2019-03-23 12:10:23 +11:00
4dc6259cfe Cleanup: doxy sections & function name 2019-03-23 12:10:23 +11:00
Dalai Felinto
820be185bc Silence false positive uninitialized warning
Techically we would never get to the part where we would use the
uninitialized value due to an assert.
2019-03-22 16:31:23 -03:00
Dalai Felinto
243a9254ea Fix warning for uninitialized icon_only
Warning/issue introduced on rBcaa357dae70322e.
2019-03-22 16:03:38 -03:00
be750e2aee Cleanup: minor UI code changes
- Rename ui_but_find_active_in_region -> ui_region_find_active_but
- Remove ui_but_is_active (use ui_region_find_active_but instead)
- Re-order ui_but_* functions take the button as their first arg.
2019-03-23 00:18:16 +11:00
8f3ecd08e1 Fix checkboxes being right aligned when property split is disabled 2019-03-23 00:03:48 +11:00
caa357dae7 Cleanup: typo in variable name 2019-03-23 00:01:00 +11:00
2d60618746 UI: refactor queries into interface_query.c
interface_handlers.c is quite large (over 10k lines),
move general button utility functions into a separate file.
2019-03-22 23:38:24 +11:00
3f852e00f9 Fix T62835: Color picker template value slider does not scale correctly with UI scale
Missing multiplication with UI_DPI_FAC.
2019-03-22 10:59:12 +01:00
5cd3e1b5d1 Cleanup: move widget enum into source file 2019-03-22 17:56:58 +11:00
813694e07b UI: use checkbox text for property split layout
Use right aligned checkboxes when 'use_property_split' is enabled
instead of a separate label.
2019-03-22 15:43:23 +11:00
bd2299aae5 UI: support for showing checkboxes after text
Needed so the new layouts that show right aligned checkboxes can have
clickable text (as left aligned checkboxes do already).
2019-03-22 15:43:23 +11:00
27da43ba86 UI: refactor color picker flags out of buttons
These are specialized color picker options which don't need to be
stored in the button (frees of flags for buttons too).
2019-03-22 15:43:23 +11:00