Commit Graph

73232 Commits

Author SHA1 Message Date
Bastien Montagne
29433da4c6 BLI_task: Add new generic BLI_task_parallel_iterator().
This new function is part of the 'parallel for loops' functions. It
takes an iterator callback to generate items to be processed, in
addition to the usual 'process' func callback.

This allows to use common code from BLI_task for a wide range of custom
iteratiors, whithout having to re-invent the wheel of the whole tasks &
data chuncks handling.

This supports all settings features from `BLI_task_parallel_range()`,
including dynamic and static (if total number of items is knwon)
scheduling, TLS data and its finalize callback, etc.

One question here is whether we should provide usercode with a spinlock
by default, or enforce it to always handle its own sync mechanism.
I kept it, since imho it will be needed very often, and generating one
is pretty cheap even if unused...

----------

Additionaly, this commit converts (currently unused)
`BLI_task_parallel_listbase()` to use that generic code. This was done
mostly as proof of concept, but performance-wise it shows some
interesting data, roughly:
 - Very light processing (that should not be threaded anyway) is several
   times slower, which is expected due to more overhead in loop management
   code.
 - Heavier processing can be up to 10% quicker (probably thanks to the
   switch from dynamic to static scheduling, which reduces a lot locking
   to fill-in the per-tasks chunks of data). Similar speed-up in
   non-threaded case comes as a surprise though, not sure what can
   explain that.

While this conversion is not really needed, imho we should keep it
(instead of existing code for that function), it's easier to have
complex handling logic in as few places as possible, for maintaining and
for improving it.

Note: That work was initially done to allow for D5372 to be possible... Unfortunately that one proved to be not better  than orig code on performances point of view.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D5371
2019-10-30 12:23:45 +01:00
William Reynish
58f378817c UI: Add new toolbar icons for polyline & eyedropper
These are meant for use in Grease Pencil Draw mode.
2019-10-30 10:53:01 +01:00
Philipp Oeser
84386c45d8 Merge branch 'blender-v2.81-release' 2019-10-30 09:57:19 +01:00
Philipp Oeser
d45c7c997f Fix T71026: Outliner - Show Hierarchy (Home Hotkey) Not Working Correctly
In 2.8, code would not enter the new 'Objects' and Collections'
'folders'.

Maniphest Tasks: T71026

Differential Revision: https://developer.blender.org/D6123
2019-10-30 09:44:00 +01:00
Harley Acheson
dff7abf061 UI: Hover States
Hover (active) widget states now affecting more elements and in a more consistent way.

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

Reviewed by Campbell Barton
2019-10-29 18:11:19 -07:00
Harley Acheson
5207b977f7 UI: Correct prvicons
Correct source, output, and formatting of prvicons - larger icons used for file browser.

Not Reviewed
2019-10-30 09:27:12 +11:00
Campbell Barton
01171c3380 Merge branch 'blender-v2.81-release' 2019-10-30 07:50:11 +11:00
Campbell Barton
aff6446e06 UI: remove text alignment icons for sequencer text
This implied paragraph alignment, when the alignment defines
the origin of the text relative to the X,Y coordinates.

Resolves T71082
2019-10-30 07:49:22 +11:00
Campbell Barton
3ec23f619a Merge branch 'blender-v2.81-release' 2019-10-30 06:08:30 +11:00
Campbell Barton
10b83a94d9 Cleanup: use "use_" prefix for booleans 2019-10-30 05:50:17 +11:00
Clément Foucault
3d40121370 Merge branch 'blender-v2.81-release' 2019-10-29 19:49:37 +01:00
Clément Foucault
8e6882a70d Fix T69468 EEVEE: Collections Holdout Button in Outliner Is Ignored
Not the cleanest implementation but the simplest.

This doubles the number of default shader variations.
2019-10-29 19:44:02 +01:00
Campbell Barton
77acda6fd0 Merge branch 'blender-v2.81-release' 2019-10-30 03:40:03 +11:00
Campbell Barton
f20cd49c30 Fix bones without parents missing head vertex
When the connected was enabled for a parentless bone the head vertex
wasn't displayed and couldn't be selected.
2019-10-30 03:37:50 +11:00
Philipp Oeser
81cc09b78a Merge branch 'blender-v2.81-release' 2019-10-29 17:16:35 +01:00
William Reynish
cf95d7f10e UI: Icons update.
Updated icon set from Andrzej Ambroż.

  - Includes new icons for Top Bar, Status Bar, CD/DVD drives, Home, Documents, Temp, Memory, Options.
  - Includes small tweaks to many icons throughout Blender
  - Also adds a large CD/DVD drive icon for the file browser

This does not add the new icons in the interface yet.
2019-10-29 16:55:56 +01:00
Philipp Oeser
87ac3d14b2 Fix T70905: Image Editor header hides mask, cache and keyframe info if
flipped to bottom

While flipping the header to bottom works in the MCE (because MCE doesnt
allow overlapping UI) we need to take the regions visible rect into
account for the Image Editor.

Also correct clickable scubbing area (poll for frame_change) in the
Image Editor and the MovieClip Editor not taking UI_DPI_FAC into
account.

Maniphest Tasks: T70905

Differential Revision: https://developer.blender.org/D6090
2019-10-29 16:51:55 +01:00
Campbell Barton
0e45ca2e70 Merge branch 'blender-v2.81-release' 2019-10-30 02:12:09 +11:00
Campbell Barton
aa841e2bd5 Fix T62116: Delete ruler ignored on edit-mode toggle
D6129 by @smramsay
2019-10-30 02:10:32 +11:00
Sergey Sharybin
de56d69689 Merge branch 'blender-v2.81-release' 2019-10-29 15:40:24 +01:00
Sergey Sharybin
f17aac33a1 Fix strict compiler warning
Implicit function declaration caused by missing include
in the recent fix.
2019-10-29 15:37:19 +01:00
Clément Foucault
2b133ee78c Merge branch 'blender-v2.81-release' 2019-10-29 15:18:33 +01:00
Clément Foucault
d0d57f1712 Fix T70091 EEVEE: volumetric broken, not refresh
Thanks @mano-wii for finding the fix.
2019-10-29 15:16:47 +01:00
Clément Foucault
883e22a92c Fix T71050 EEVEE: Light Path Node broken in 2.81
Also fixes the sampling of hashed shadows.
2019-10-29 15:16:47 +01:00
Clément Foucault
d758a79557 Fix T71062 EEVEE: Holdout shader is broken in 2.81 2019-10-29 15:16:47 +01:00
Philipp Oeser
c43183bcc9 Merge branch 'blender-v2.81-release' 2019-10-29 14:32:28 +01:00
Philipp Oeser
9efe12d77a Fix T71171: Problems removing texture packing (without writing anything)
using image.unpack() or bpy.ops.image.unpack()

If we offer this in the UI, also expose this to .unpack

Maniphest Tasks: T71171

Differential Revision: https://developer.blender.org/D6152
2019-10-29 14:30:22 +01:00
Campbell Barton
455ccac5b8 Merge branch 'blender-v2.81-release' 2019-10-30 00:15:29 +11:00
Jeroen Bakker
bcac0ed977 Fix T70913: OpenCL Compiler Errors
Reverting part of a clean up that was done 6 months ago. The
consequence was that OpenCL compositing wasn't working since
then.
2019-10-29 09:40:29 +01:00
Campbell Barton
51ac654b3f Merge branch 'blender-v2.81-release' 2019-10-29 19:30:24 +11:00
Campbell Barton
7cc489a2c8 Error in last commit 2019-10-29 19:29:38 +11:00
Campbell Barton
7d7bd02ea7 Cleanup: quiet TBB deprecation warning 2019-10-29 19:25:08 +11:00
Julian Eisel
7c1fbe24ca Fix T71019: Disappearing file thumbnails & crash on area split
When opening the file browser as regular editor, the ID filter flags
as stored in FileSelectParams were not set explicitly, so they were 0.
Since 9100982e80, the value actually passed to the filtering could
differ from that, causing the file list cache to be constantly updated
on every redraw.

Caused by 9100982e80.

Note that this "accidentially" got fixed in master with b546263642,
which is why the issue only showed up in the release branch from that
point.
2019-10-28 19:34:41 +01:00
Campbell Barton
5a481e41ce Merge branch 'blender-v2.81-release' 2019-10-29 04:51:35 +11:00
Campbell Barton
43a8fdb6ad UI: add icon for drawing space key
Drawing was already added, only the icon was missing.
2019-10-29 04:50:04 +11:00
Campbell Barton
d310cbfa0f Merge branch 'blender-v2.81-release' 2019-10-29 01:38:34 +11:00
Campbell Barton
312075e688 CMake: add missing headers, use space before comments 2019-10-29 01:33:44 +11:00
Julian Eisel
74c9a4769e Fix: Some ID-Filters not enabled on Link/Append
Caused by 9100982e80.
2019-10-28 15:19:26 +01:00
Campbell Barton
1bde6c04f9 Merge branch 'blender-v2.81-release' 2019-10-29 00:46:59 +11:00
Campbell Barton
f5ebe8395d Cleanup: correct argument type mismatch
Add transform_snap.h header which includes DNA enum.
2019-10-29 00:45:05 +11:00
mano-wii
9cd0e75fff Merge branch 'blender-v2.81-release' 2019-10-28 09:54:35 -03:00
mano-wii
ce0db668ec Fix T50148: Header: Wrong rounding when moving frames
Deduplicate the code and use the same logic used to
calculate individual elements in `t->values_final[0]`.

Differential revision: https://developer.blender.org/D6135
2019-10-28 09:51:53 -03:00
mano-wii
a83bbefec6 Cleanup: use doxy sections for transform_snap 2019-10-28 09:32:59 -03:00
Campbell Barton
df9f1d91da UI: use zero box-spacing when used in headers
Without this, boxes are unusable in header layouts as they
add vertical space which shifts the items out of the header.
2019-10-28 22:40:12 +11:00
Campbell Barton
dd904f6761 WM: add utility to lookup a keymap item from an event
Useful for modal operators to be able to match events
against regular keymaps.
2019-10-28 04:59:35 +11:00
Campbell Barton
ae55523013 UI: add utility to show icons for the keymap item
This is useful for drawing keymap items into the header or status bar

While these icons are available directly,
mapping them from the keymap item isn't trivial.
2019-10-28 02:57:56 +11:00
Campbell Barton
c036db9f57 Merge branch 'blender-v2.81-release' 2019-10-28 00:44:31 +11:00
Campbell Barton
9b6aa740be Cleanup: remove redundant NULL checks 2019-10-28 00:40:51 +11:00
Antonio Vazquez
1e630d79fb Merge branch 'blender-v2.81-release' 2019-10-27 10:05:43 +01:00
Antonio Vazquez
f1824e6ec4 Cleanup: Fix tooltip text 2019-10-27 10:05:08 +01:00