Commit Graph

73082 Commits

Author SHA1 Message Date
Campbell Barton fdebdfa320 Cleanup: rename uv_sel_co_from_eve, pass in UV layer offset 2020-05-04 17:08:57 +10:00
Campbell Barton a9ef6d5ad7 Cleanup: replace UV_SELECT_ISLAND_LIMIT macro with a function
Also make return argument last for uvedit_pixel_to_float.
2020-05-04 17:00:11 +10:00
Campbell Barton b048272825 Cleanup: split selection operations into uvedit_select.c 2020-05-04 16:59:35 +10:00
Antonio Vazquez b84c380aaa Merge branch 'blender-v2.83-release' 2020-05-04 08:24:08 +02:00
Antonio Vazquez 000fdd8a6e GPencil: Fix Chisel Brush pressure
In previous commit the pressure was disabled by error.
2020-05-04 08:23:27 +02:00
Campbell Barton 7b9d6ef2b6 Cleanup: use ELEM macro 2020-05-04 14:03:41 +10:00
Antonio Vazquez 57cfa8e2d0 Merge branch 'blender-v2.83-release' 2020-05-03 20:42:37 +02:00
Antonio Vazquez 331bf04fad GPencil: Hide Canvas Grid when Surface or Stroke mode is enabled
This was introduced by error during refactor. The grid must not be visible in these modes.
2020-05-03 20:42:18 +02:00
Antonio Vazquez bbfae8f184 Merge branch 'blender-v2.83-release' 2020-05-03 20:35:30 +02:00
Antonio Vazquez a577291b03 Fix T76364: GPencil grid is not located in the right place
During the refactor, the location of the grid was broken. Now, the grid is in Object origin or 3D cursor origin as it was in 2.82.
2020-05-03 20:34:48 +02:00
Ray Molenkamp ff8288ad1e Windows: Replace BLI_File* calls with system calls in system_win32.c
Using BLI calls in this file triggered a condition where
poorly modelled dependencies in cmake (ie bf_blenlib using
zlib headers but not linking the libraries) leading to
linker error in debug builds of some of the tests.

This diff sidesteps the dependencies issue by using native
calls rather than BLI calls to check if a file exists and
what its size is. Effectively sweeping the issue right back
under the rug where I found it.

The best solution would be to audit all libraries and ensure
they have proper link requirements set, but that requires
significantly more time than I have available right now.
(zlib in blenlib was one of them and would have been easy
to fix, but there were others that required more work)

The alternative is tests that fail to build which worse.

I'll revisit this and fix it properly but for now this will
have to do.
2020-05-03 12:07:22 -06:00
Jörg Müller fe891d581d Audaspace: update from upstream
- Changing API for time values from float to double for better precision.
- Fixing minor mistakes in the documentation.
- Fixing minor unnecessary large memory allocation.
2020-05-03 15:30:35 +02:00
Antonio Vazquez 2b7d5caae8 Merge branch 'blender-v2.83-release' 2020-05-03 13:34:55 +02:00
Antonio Vazquez 1a6119c8e4 GPencil: More changes to improve Chisel brush
More small tweaks to get the right "feeling" when drawing.

The defaults has been tested by @pepeland.
2020-05-03 13:34:35 +02:00
Campbell Barton a6380d063f Cleanup: store BLF buffer size in a variable 2020-05-03 18:10:25 +10:00
Campbell Barton ccaab72685 BLF: use 'int' for internal glyph x,y bearing
These were stored as float but were originally cast from an int
and were often cast back to int.

Also use int pairs for dimensions values.
2020-05-03 18:01:20 +10:00
Harley Acheson 5366eb89c6 UI: improve widget text cursor position
Use BLF_boundbox_foreach_glyph for more accurate cursor placement.
2020-05-03 17:08:05 +10:00
Campbell Barton 0d65520f05 BLF: add new arguments to BLF_GlyphBoundsFn
- glyph_bounds: to get the character width.
- glyph_bearing: lower left character starting point.

These values are needed for more precise glyph calculations.
2020-05-03 16:51:34 +10:00
Campbell Barton d388c1c524 Cleanup: sort file lists 2020-05-03 13:45:40 +10:00
Campbell Barton 76be35efb2 Cleanup: clang-format 2020-05-03 13:42:49 +10:00
Campbell Barton b64fdbfb98 Cleanup: remove unused alpha argument 2020-05-03 13:40:56 +10:00
Antonio Vazquez 6408cd00c5 Annotations: Remove old unused code
This code was part of the old grease pencil when annotations was not a separated module.
2020-05-02 18:01:58 +02:00
mano-wii 7df51ca11a Possible fix for T76113: Use GL_STATIC_DRAW in immBegin
This fixes a freeze when closing temporary windows with `AMD Radeon HD 7570M`
The performance is practically the same between calls (with a micro advantage for `GL_STATIC_DRAW`)
I couldn't check the difference in memory usage.
The ideal would be profile in different setups.
But due to the seriousness of the bug, these tests were postponed.
2020-05-02 10:21:38 -03:00
Richard Antalik 5ef94c9c41 Merge branch 'blender-v2.83-release' 2020-05-02 13:35:19 +02:00
Richard Antalik 1623fdb3bc Cleanup: Fix return NULL from bool type function 2020-05-02 13:33:23 +02:00
Antonio Vazquez 719cff1414 Merge branch 'blender-v2.83-release' 2020-05-02 10:48:15 +02:00
Antonio Vazquez cfdff4fb63 GPencil: Improve Market Chisel angle algorithm
With the previous commit, the angle effect was too subtle. Now the effect is more visible,
2020-05-02 10:47:45 +02:00
Nathan Craddock 03b911dd87 Merge branch 'blender-v2.83-release' 2020-05-01 22:12:47 -06:00
Nathan Craddock e590199949 Revert "Outliner: Fix selection sync for various operators"
This reverts commit 92d62148be.

When merging in from blender-v2.83-release the merge was somehow rebased
after viewing the log.
2020-05-01 22:10:46 -06:00
Nathan Craddock 92d62148be Outliner: Fix selection sync for various operators
Add missing outliner selection sync tagging for various non-outliner
operators.
* Curve separate
* Grease Pencil separate
* Mesh separate
* Make instances real
* 3D view paste
* Sequencer paste
* Armature delete, dissolve, separate, duplicate, subdivide, extrude,
  click extrude, primitive add
* Pose Group select, delete

Resolves T71404
2020-05-01 21:42:56 -06:00
Nathan Craddock c06a40006d Outliner: Fix selection sync for various operators
Add missing outliner selection sync tagging for various non-outliner
operators.
* Curve separate
* Grease Pencil separate
* Mesh separate
* Make instances real
* 3D view paste
* Sequencer paste
* Armature delete, dissolve, separate, duplicate, subdivide, extrude,
  click extrude, primitive add
* Pose Group select, delete

Resolves T71404
2020-05-01 21:13:19 -06:00
Brecht Van Lommel 83304e4c22 Merge branch 'blender-v2.83-release' 2020-05-01 23:55:13 +02:00
Hans Goudey 7212dbd7be Fix T76062: Interpolate Radius in Curve Subdivide Special Case
Differential Revision: https://developer.blender.org/D7523
2020-05-01 16:49:36 -05:00
Brecht Van Lommel 447a7f510e Fix T76309: changing AOV type does not update compositor socket 2020-05-01 23:10:45 +02:00
Germano Cavalcante 06839379c5 Transform: Allow orientation change with custom matrix in modal 2020-05-01 17:41:06 -03:00
Richard Antalik 87602d886f Merge branch 'blender-v2.83-release' 2020-05-01 21:28:55 +02:00
Richard Antalik 98990f6ba4 Fix T76033: VSE crash with prefetch, disk cache and meta strips
`BKE_sequencer_prefetch_get_original_sequence()` didn't look in metas
and returned NULL. This caused crash in disk cache that was trying to
read seq->name.

Add function that will look in meta strips recursively and condition
that seq must not be NULL.

Reviewed By: brecht

Maniphest Tasks: T76033

Differential Revision: https://developer.blender.org/D7597
2020-05-01 21:22:04 +02:00
Nathan Craddock b52b5e15af Outliner: Fix selection extend not toggling
An unintentional side-effect of rBfe7528ee919b was that when
extend-selecting a selected element in the outliner, it would be
deselected and activated rather than selected and activated.

This commit restores the expected toggling behavior. Consistent behavior
for extend-selecting child datablocks is not resolvable without a much
larger cleanup of the outliner select functions.
2020-05-01 13:01:31 -06:00
Harley Acheson 9ca78c9bcc Fix for T76281: Engine Info Overlay Formatting
Allow render engine info to display correctly among other text overlays and scene statistics.

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

Reviewed by Brecht Van Lommel
2020-05-01 10:30:38 -07:00
Antonio Vazquez eddddceb8e Merge branch 'blender-v2.83-release' 2020-05-01 19:17:29 +02:00
Antonio Vazquez 716638458d GPencil: Fix unreported noise using Market Chisel pen
The interpolated points recalculated the angle again and this added noise. The angle must not be calculated and must use the previous thickness.
2020-05-01 19:17:04 +02:00
Sybren A. Stüvel 57d1db27c7 Cleanup: Animation, refactored FCurve interpolation
Early returns are used to heavily reduce code indentation and clean up
some code flow.

No functional changes.
2020-05-01 17:37:28 +02:00
Sybren A. Stüvel 5b6ee80351 Cleanup: Animation, split FCurve interpolation into separate function 2020-05-01 17:37:28 +02:00
Sergey Sharybin 9c2c697011 Tracking: Cleanup, localize variable
Also avoid possible accumulation of floating point error.
2020-05-01 16:13:10 +02:00
Sergey Sharybin b22abd112d Tracking: Cleanup, localize iterator variables 2020-05-01 16:13:10 +02:00
Ray Molenkamp 60741cfe18 Fix: Fix build error on windows
Headers and implementation had slightly different signatures
2020-05-01 08:06:34 -06:00
Sybren A. Stüvel b83a8d6fc4 Cleanup: Animation, unify FCurve extrapolation
Previously there were two functions for FCurve extrapolation, one for
before the first keyframe, and the other for after the last. After the
previous cleanup made the variable names consistent, it was clear that
the code was almost identical. The biggest difference was in the sign of
many of the calculations, which was cancelled out by swapping `B-A` to
`A-B`. This showed that the computations are actually the same, and the
only remaining difference was which neighbouring handle to use in case
of Bézier curves.

No functional changes.

# Conflicts:
#	source/blender/blenkernel/intern/fcurve.c
2020-05-01 15:38:45 +02:00
Sybren A. Stüvel f651548c2e Cleanup: Animation, refactored FCurve extrapolation
Variables have been renamed so that they refer to the endpoint and its
neighbor (rather than `bezt`, `prevbezt`, or `lastbezt`), and
unnecessary variables have been removed. By returning early the code
flow is also easier to understand.

No functional changes.
2020-05-01 15:38:45 +02:00
Sybren A. Stüvel 75370684fa Cleanup: Animation, split FCurve extrapolation into separate functions
The `fcurve_eval_keyframes` consists of three parts:
- Before the first keyframe
- After the last keyframe
- Between the keyframes

This commit splits the first two parts into separate functions. This is
the first of a series of refactors, which will be committed into smaller
parts so that each is easier to follow & validate.

No functional changes.
2020-05-01 15:38:45 +02:00
Ray Molenkamp b523911e86 Windows: Support backtraces on release builds.
This diff add supports for crash logs on windows for
release builds. This can be toggled on/off with the
`WITH_WINDOWS_PDB` cmake option. by default it is on.

Things to take into consideration:

Release builds are hightly optimized and the resulting
backtraces can be wrong/misleading, take the backtrace
as a general area where the problem resides rather than
an exact location.

By default we ship a minimized symbol file that can only
resolve the function names. This was chosen to strike
a balance between growth in size of the download vs
functionality gained. If more detailed information is
required such as source file + line number information
a full pdb can be shipped by setting `WITH_WINDOWS_STRIPPED_PDB`
to off.

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

Reviewed by: brecht
2020-05-01 07:37:48 -06:00
Julian Eisel 4cc8123377 UI: Use property split layout and decorators for material properties
Use the automatic property split layout (hence, change to the new 40/60% split
ratio) and add decorator buttons for animatable properties.
This actually applies to all node input buttons in the properties, e.g. world shading,
light shading, texture nodes.

Doing this makes the layout more consistent with other layouts in the
properties. But the decorators are also a useful hint for users that these
options can be animated. Previously using decorators and the automatic split
layout wasn't possible, I've done a number of changes now to have it supported.
Before I moved the socket icons to the left side, the decorators also looked
weird (two circle icons next to each other).

{F8497704} With nested items: {F8497708}

Reviewed By: William Reynish, Pablo Vazquez

Differential Revision: https://developer.blender.org/D7544
2020-05-01 15:21:41 +02:00
Germano Cavalcante 2188175891 Transform: Invert shear direction aligned to view
Issue introduced in rBc57e4418bb85.
2020-05-01 10:00:13 -03:00
Germano Cavalcante d49b148459 Revert "Improve proportional edit drawing"
Accident!

This reverts commit ae049a6c6a.
2020-05-01 09:35:29 -03:00
Germano Cavalcante 185e1d5395 Fix T76254: 'Normal' Transformation Orientation using Global
Issue introduced in rBc57e4418bb85.
2020-05-01 09:32:22 -03:00
Germano Cavalcante ae049a6c6a Improve proportional edit drawing
(This is a simplified version of D4786)

The advantage of highlighting the points would be to indicate more
clearly what is affected by the proportional edit.

The default circle is not so informative and sometimes it is even off
screen so the user loses the quick identification of the influence.
(See T75482)

The disadvantage of this design is that the points could end up hiding
the mesh.

The original patch added the option `draw_proportional_gradient`, but I
prefer to avoid adding more options and more information to the
interface.

I'm not sure if the advantages outweigh the disadvantages.

{F8504097}

Reviewers: #user_interface, #modeling

Subscribers:
2020-05-01 09:32:22 -03:00
Sybren A. Stüvel aa72e3abf9 Cleanup: moved drivers to BKE_fcurve_driver.h / fcurve_driver.c
All the driver-specific code in `fcurve.c` has been moved into a new file
`fcurve_driver.c`. The corresponding declarations have been moved from
`BKE_fcurve.h` to `BKE_fcurve_driver.h`.

All the `#include "BKE_fcurve.h"` statements have been investigated and
replaced with `BKE_fcurve_driver.h` where necessary.

No functional changes.
2020-05-01 13:08:22 +02:00
Bastien Montagne d1c0d77e18 Merge branch 'blender-v2.83-release' 2020-05-01 11:47:55 +02:00
Demeter Dzadik b2d850efc0 Cleanup: Solidify modifier: Remove unneccessary error message.
For any modifier, the expected output when the input mesh is empty, is an
empty mesh. So this error message was useless, and could spam the
console in some usecases of the modifier stack...

Reviewed By: weasel, mont29

Differential Revision: https://developer.blender.org/D7571
2020-05-01 11:41:38 +02:00
Campbell Barton 7ded7610ce Cleanup: rename WITH_X11 to WITH_GHOST_X11
Matches WITH_GHOST_{SDL|WAYLAND}
2020-05-01 19:14:50 +10:00
Christian Rauch d602af73d3 WM: remove X11 hard coded window size workaround
Causes issues with Wayland and is no longer required for Gnome/KDE.
2020-05-01 18:43:00 +10:00
Campbell Barton aff5e18adb Cleanup: replace inline dot-product with dot_v4v4 2020-05-01 15:05:39 +10:00
Campbell Barton ff1174e52c Cleanup: improve readability for color assignment 2020-05-01 15:05:25 +10:00
Campbell Barton a6fbd4c9c8 Cleanup: pass const arguments to texture functions 2020-05-01 14:40:35 +10:00
Campbell Barton b7117b5728 Cleanup: avoid returning a bit-flag as a float
Texture functions were returning a float which was cast back to an int
to use as a flag.
2020-05-01 14:19:04 +10:00
Campbell Barton f7d98d3582 Cleanup: rename externtex to RE_texture_evaluate
- Pass in return arguments last.
- Pass in RGBA as a vector.
- Use boolean return argument.
2020-05-01 14:03:12 +10:00
Campbell Barton 635754a876 Cleanup: use sections for outliner sources 2020-05-01 13:27:20 +10:00
Campbell Barton 5ee1c7f695 Cleanup: spelling, comments 2020-05-01 12:36:19 +10:00
Campbell Barton 0cb53d4740 Cleanup: warnings 2020-05-01 12:34:43 +10:00
Clément Foucault 7a809a7504 Curve: Force pretesselate modifier to output a Mesh output
This is to improve the case of T71055 where curves share the same batch
cache when they shouldn't.

This however, does not help to fix edit mode display.

The real fix would be to have a similar handling to what the mesh modifiers
do and duplicate the whole Curve data. But this is too much work/change for
the 2.83 release.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7569
2020-05-01 00:07:38 +02:00
Clément Foucault 4d790516fb Curve: Force pretesselate modifier to output a Mesh output
This is to improve the case of T71055 where curves share the same batch
cache when they shouldn't.

This however, does not help to fix edit mode display.

The real fix would be to have a similar handling to what the mesh modifiers
do and duplicate the whole Curve data. But this is too much work/change for
the 2.83 release.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7569
2020-05-01 00:03:28 +02:00
Ray Molenkamp 03f4d20bcf Revert "Windows: Support backtraces on release builds."
Issues with older cmake.
2020-04-30 14:00:11 -06:00
Israel Medina 99cb6dbe65 VSE: Add frame interpolation option to speed effect
Do cross transition from current to next frame instead of displaying
one image for n frames.

Reviewed By: ISS, sergey, campbellbarton

Differential Revision: https://developer.blender.org/D7417
2020-04-30 21:51:22 +02:00
Hans Goudey 1960b8a361 UI: Fix animating panels after drag changing region size
The previous commit for this issue, 8e08d80e52, missed the case
where the panel animates to its aligned position when the mouse is
released.
2020-04-30 14:21:14 -05:00
Ray Molenkamp f90a716e68 Windows: Support backtraces on release builds.
This diff add supports for crash logs on windows for
release builds. This can be toggled on/off with the
`WITH_WINDOWS_PDB` cmake option. by default it is on.

Things to take into consideration:

Release builds are hightly optimized and the resulting
backtraces can be wrong/misleading, take the backtrace
as a general area where the problem resides rather than
an exact location.

By default we ship a minimized symbol file that can only
resolve the function names. This was chosen to strike
a balance between growth in size of the download vs
functionality gained. If more detailed information is
required such as source file + line number information
a full pdb can be shipped by setting `WITH_WINDOWS_STRIPPED_PDB`
to off.

The Release in the title of this diff refers to the
release build type, not the official blender releases.

Initially this will only be enabled for nightly build
bot versions of blender, official releases as of now
will not ship with symbols.

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

Reviewed by: brecht
2020-04-30 12:41:16 -06:00
Julian Eisel 8e08d80e52 Fix dragging panels changing region size
While dragging panels, the region size would change which would feel glitchy.

See D7462 for a demo of the issue.
2020-04-30 19:20:01 +02:00
Pablo Dobarro d44f323df5 Fix crash when switching subdivision level in Multires
When using multires_reshape_context_create_from_ccg to create the
context mmd is null, so the subdivision smooth mode can't be checked
there.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7579
2020-04-30 18:43:59 +02:00
Antonio Vazquez 38456d3e82 Cleanup: Fix compiler warning 2020-04-30 18:10:23 +02:00
Sebastián Barschkis 31d3f034ab Fix T76097: Simulations don't take animated gravity into account
Together with 21485e94aa this commit should fix the issue with animated gravity values.
2020-04-30 18:09:05 +02:00
Bastien Montagne 4612ca3ede Cleanup: simplify a bit libquery code. 2020-04-30 18:01:47 +02:00
Sebastián Barschkis 21485e94aa Fluid: Refactored fluid gravity settings
Refactored setup that converts from Blender to Mantaflow units.
2020-04-30 17:33:22 +02:00
Sebastián Barschkis e7e6b02ed9 Fluid: Minor cleanup and sanity checks 2020-04-30 17:33:22 +02:00
Harley Acheson 713b4c10a6 UI: Statistics Visual Changes
Improving scene statistics readability, and showing objects count while in Edit mode.

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

Reviewed by Campbell Barton
2020-04-30 08:16:33 -07:00
Pablo Dobarro 134619fabb Multires: Subdivide Simple and Subdivide Linear
This introduces two alternative subdivision modes that generates
displacement on the grids that look as Simple subdivisions but while
using the Catmull-Clark subdivision type in the modifier. This way,
Simple and Catmull-Clark subdivision can be combined when creating new
levels if needed, for example, to sculpt hard surface objects.

Subdivide simple smooths the sculpted data when creating a new
subdivision level. Subdivide linear also preserves the sharpness
in the sculpted data.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7415
2020-04-30 16:57:29 +02:00
Pablo Dobarro f28875a998 Multires: Unsubdivide and Rebuild Subdivisions
This implements the main unsubdivide algorithm which rebuilds a base mesh and extracts the grid's data from a high resolution mesh.
It includes the Rebuild Subdivisions operator, which generates all subdivision levels down to the level 0 base mesh.

It supports:
- Rebuilding an arbitrary number of levels (Unsubdivide) or as many levels as possible down to level 0 in a single step (Rebuild Subdivisions).
- Rebuilding with already existing grids.
- Meshes with n-gons and triangles
- Meshes with more than 2 faces per edge
- Base mesh made completely out of triangles
- Meshes without poles
- Meshes with multiple disconnected elements at the same subdivision level

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7372
2020-04-30 16:49:56 +02:00
Pablo Dobarro d4c547b7bd Multires: Enable sculpting in all subdivision levels
Return the correct sculpt level in BKE_multires_sculpt_level_get and
enable the property in the UI

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7575
2020-04-30 16:45:01 +02:00
Antonio Vazquez 6a7e9f2b76 GPencil: Add material selector to context menus
Now it's possible to select the material in context menu and new menu to select material.

The patch and workflow  has been tested in greasepencil-object branch.

* New Material selector in Draw mode Context menu:

{F8499259}

* Pressing `U`key in Draw mode display material menu.

{F8503224}

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7554
2020-04-30 16:13:23 +02:00
Sebastián Barschkis dc0a564c06 Merge branch 'blender-v2.83-release' 2020-04-30 15:55:35 +02:00
Sebastián Barschkis 9ee7fc15af Fluid: Removed domain size option from diffusion panel
Domain size parameter no longer needed (unsed right now). Domain size is directly taken from object.
2020-04-30 15:42:44 +02:00
Campbell Barton 7163e159c5 UI: add all operators to search menu when developer extras is enabled
This allows developers to easily access operators they're working on,
without having to add them to the interface first.
2020-04-30 21:54:50 +10:00
Germano Cavalcante ea77584d36 Fix orientation change in Redo
Some transform redo operations require contraint to be enabled.
Issue introduced in rBc57e4418bb85.
2020-04-30 08:52:38 -03:00
Germano Cavalcante 41b45d9159 Fix T76260: Inverted rotation in non-3d views
Issue introduced in rBc57e4418bb85.
2020-04-30 08:38:18 -03:00
Nathan Craddock ae98a033c8 Outliner: Add new delete operator
In the industry standard keymap, both deleting objects and collections
were mapped to the same keys causing confusion when only collections
could be deleted through the keymap.

This adds a new delete operator to delete all selected objects and
collections, accessible from both the keymap and context menu. Now any
selected objects and collections are deleted when Delete is chosen from
the keymap. This also updates the tooltip description which was
previously undocumented.

Resolves T67462
2020-04-30 19:53:36 +10:00
Antonio Vazquez 79269e4237 Merge branch 'blender-v2.83-release' 2020-04-30 10:48:09 +02:00
Antonio Vazquez 36bf067ddc Fix T76236: GPencil drrawing resetting posed positions with armature after layer renaming
The datablock was not tagged for updating.
2020-04-30 10:47:39 +02:00
Philipp Oeser 328da12598 Merge branch 'blender-v2.83-release' 2020-04-30 09:55:31 +02:00
Philipp Oeser 2b094be949 Fix T75985: Texture paint brush gradients results in wrong color
A Colorband's CBData color **is not** considered `PROP_COLOR_GAMMA`.
A Brushes color **is** considered `PROP_COLOR_GAMMA`.
(PROP_COLOR_GAMMA is used for colors which would be color managed before
display, could be renamed to something better once...)

This leads to different rgb values in ColorBand.CBData of br->gradient
and brush->rgb for seemingly identical colors. (this is because color
pickers do differently in case block->is_color_gamma_picker/
ui_but_is_color_gamma)

Now it looks like `paint_brush_color_get` is expected to return a color
in sRGB (according to @jbakker this is for legacy reasons) so we need to
run the colorband colors through linear -> sRGB.

It might very well be the case that a much deeper cleanup in this area
is needed, this is just a fix to get gradient brush colors
consistent again...

Maniphest Tasks: T75985

Differential Revision: https://developer.blender.org/D7501
2020-04-30 09:54:09 +02:00
Campbell Barton 02c77e4e5c Fix animation player checkerboard drawing with alpha channels
Was using uninitialized theme values.
2020-04-30 17:45:02 +10:00
Campbell Barton e1d4c3bc36 Cleanup: clang-format 2020-04-30 17:28:28 +10:00
Campbell Barton 040e98dfc9 Cleanup: unused variable warnings 2020-04-30 17:28:28 +10:00
Brecht Van Lommel d8a3f3595a Task: Use TBB as Task Scheduler
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor.

Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance.
* Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend.
* AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D7475
2020-04-30 08:09:21 +02:00
Bastien Montagne 00e0034b13 Merge branch 'blender-v2.83-release' 2020-04-29 21:38:18 +02:00
Bastien Montagne cd833d8879 Readfile: debug check all IDs are properly linked at the end.
Should prevent issue fixed by previous commit to happen again (since
read code, especially in undo case, is not really straight forward to
follow anymore).
2020-04-29 21:35:13 +02:00
Bastien Montagne a54c1f1e77 Fix T76155: 'Object lost data' on copy-pasting with new undo code. 2020-04-29 18:11:33 +02:00
Germano Cavalcante 080732ae5c Fix crash with Orbit Around Selection
Missing check of `NULL` `op` introduced in rBc57e4418bb85.
2020-04-29 12:12:28 -03:00
Sergey Sharybin b7bcd0a87c Tracking: Implement Nuke/Natron distortion model
Neither Nuke nor Natron support OpenCV's radial distortion model
which makes it impossible to have any kind of interoperability.

The new model is available under the distortion model menu in Lens
settings.

Differential Revision: https://developer.blender.org/D7484
2020-04-29 16:39:30 +02:00
Brecht Van Lommel 6c4ef6159c Fix T71334: top part of render window disappears on repeated renders 2020-04-29 14:56:17 +02:00
Julian Eisel 0cfd2d6f4b VR: Reset pose offsets when changing base pose
The offsets are applied after toggling positional tracking off, so that
the view does not jump at that moment. But when changing the base pose,
keeping that offset doesn't make sense. Especially with landmarks, which
are supposed to give precise positions/rotations to jump to. For that
part the VR Scene Inspection Add-on will need a little adjustment
though.

Also exposes an explicit function to the Python API to reset the
offsets, to be used by the Add-on.

This is mostly untested since I don't have access to an HMD currently.
2020-04-29 13:53:25 +02:00
Germano Cavalcante c57e4418bb Transform Orientation Refactor
- Use `t->spacemtx` as the orientation matrix instead `t->orient_matrix`.
- Unify constraint behavior between modal and non-modal.
- Simplify code to remove old workarounds and rearrange struct members.

This fix T66142 since the actual `orient_type` (in the case
`V3D_ORIENT_NORMAL`) is used during Redo instead of always using
`V3D_ORIENT_CUSTOM_MATRIX`).

Differential Revision: https://developer.blender.org/D7469
2020-04-29 08:07:25 -03:00
Philipp Oeser 980cebc459 Merge branch 'blender-v2.83-release' 2020-04-29 11:44:56 +02:00
Jacques Lucke 157f836493 Depsgraph: use native BLI data structures in registry
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7559
2020-04-29 11:37:19 +02:00
Philipp Oeser 2845b232a7 Fix T75522: Math node truncate operator tooltip provides no explanation 2020-04-29 11:36:20 +02:00
Philipp Oeser 657188c1a2 Merge branch 'blender-v2.83-release' 2020-04-29 11:25:08 +02:00
Philipp Oeser 08048f7cce Fix T75810: Child bone frozen when both Auto IK and X-Axis mirror are
used

Caused by {rBa6a9a12e8f32}

Other relevant commits:
rBb8ca806b7798e2f8dd6effca8f0d081b3cd8c23f
rBde530a95dc7b482dc22c933b9b8b2a98c79b5663

The issue is caused by some leftover BONE_TRANSFORM_MIRROR flags on a
bone from previous runs (file in the report had the flag still on
forearm.R).

With these false leftover flags still set, `pose_grab_with_ik()` cannot
work correctly. Culprit commit above removed the early clearing of this
flag on all bones, this should be restored [this happened in
`count_set_pose_transflags()`].

This should only be done in the beginning of the transform process, so
now still clear the flags early in 'createTransPose()' [but dont restore
this in 'count_set_pose_transflags()' -- this will be called from
special_aftertrans_update again, so placing the clearance here only
complicates things (autokeyframe_pose() still needs to work as well)...]

Maniphest Tasks: T75810

Differential Revision: https://developer.blender.org/D7527
2020-04-29 11:18:38 +02:00
Philipp Oeser fed5e0ca04 Merge branch 'blender-v2.83-release' 2020-04-29 11:10:24 +02:00
Philipp Oeser e07b245fe1 Armature posemode: add mouse independent "Select Linked" operator
The current "Select Linked" operator works based on mouse position and
makes no sense to call from the menus and was removed in rB536055e1ee0b.

This patch adds an operator independent from mouse position that just
selects all bones in relation to selected bones (and adds back menu
entries, adds keymap entry CTRL+L).

The original operator is renamed to 'select_linked_pick' internally
(this is now more in line to how "Select Linked" works for meshes,
curves etc)

ref T76071

Maniphest Tasks: T76071

Differential Revision: https://developer.blender.org/D7542
2020-04-29 11:06:41 +02:00
Bastien Montagne cedf9f5cb7 Fix/cleanup: lib_query: missing case handling of new ID_SIM type.
Also update comments.
2020-04-29 11:05:45 +02:00
Bastien Montagne 9a9ecad65f Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_query.c
2020-04-29 10:57:47 +02:00
Bastien Montagne afeddd42e6 Cleanup: use LISTBASE_FOREACH iterator everywhere possible in libquery.
Done also in 2.83 release branch to avoid too much conflicts on merging
(some of those were already done for nodes in master, and gave me
conflicts yesterday...).
2020-04-29 10:53:34 +02:00
Jens Verwiebe 839fe335d2 Fix crash after 475bd6b occuring on each render end, we need another nullcheck here
(cherry picked from commit 3ea67e08fe)
2020-04-29 10:26:32 +02:00
Antonio Vazquez 770605312f Merge branch 'blender-v2.83-release' 2020-04-29 10:14:55 +02:00
Antonio Vazquez 601a1a3fda Fix T76185: GPencil from Curve ignores Cyclic when curve has only 2 points
Also changed default thickness to 10 because after draw engine refactor the final line was too thin.
2020-04-29 10:14:20 +02:00
Campbell Barton 21ef8c4d44 Cleanup: use const args for depsgraph functions 2020-04-29 12:36:33 +10:00
Campbell Barton af835ee6f8 Cleanup: use doxy sections for multires & subdiv sources 2020-04-29 12:21:12 +10:00
Jens Verwiebe 3ea67e08fe Fix crash after 475bd6b occuring on each render end, we need another nullcheck here 2020-04-28 23:49:52 +02:00
Germano Cavalcante d66aa52528 Cleanup: Use more descriptive names for functions
count_set_pose_transflags --> transform_convert_pose_transflags_update
count_bone_select --> armature_bone_transflags_update_recursive

Also don't mix `BONE_TRANSFORM_MIRROR` with `BONE_TRANSFORM` in
transflag. (This was a mess introduced in rBde530a95dc7b).
2020-04-28 17:32:05 -03:00
Hans Goudey b443e1b7d4 UI: Improve DataTransfer Modifier Error Message
Differential Revision: https://developer.blender.org/D7546
2020-04-28 15:15:36 -05:00
Jacques Lucke 4d06c1c25b BLI: add VectorSet.is_empty method 2020-04-28 19:18:12 +02:00
Antonio Vazquez 44ac789a3a GPencil: Remove redundant UVs text
It's clear you change the UVs
2020-04-28 18:42:26 +02:00
Antonio Vazquez cdd980cd56 GPencil: Rename modifier Texture to Texture Mapping 2020-04-28 18:40:18 +02:00
Jacques Lucke c1e6865ee3 Cleanup: remove unnecessary includes 2020-04-28 18:08:00 +02:00
Jacques Lucke 67bd6bbcdd Depsgraph: use BLI::Vector for Relations
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7556
2020-04-28 17:53:09 +02:00
Jacques Lucke 05283f8c96 Depsgraph: Use BLI::Map for constraint_to_pchan_map_
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7553
2020-04-28 17:44:36 +02:00
Jacques Lucke 7dfa1b18c1 Depsgraph: use BLI::Set for entry_tags
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7555
2020-04-28 17:40:23 +02:00
Philipp Oeser 7bc4a436a0 Merge branch 'blender-v2.83-release' 2020-04-28 17:18:01 +02:00
Philipp Oeser 475bd6b829 Fix T76179: Unable to select render passes when a render has fewer
passes than one in another slot

If a particular pass is not available in a slot we are switching to,
still show the menu, but with a blank name for the currently selected
item so that the user can change it to a valid value.

thx @brecht for providing the standard way Blender deals with these
kinds of situations.

Maniphest Tasks: T76179

Differential Revision: https://developer.blender.org/D7552
2020-04-28 17:06:53 +02:00
Jacques Lucke a72eed7dd5 BLI: rename Vector.empty to Vector.is_empty 2020-04-28 17:04:07 +02:00
Jacques Lucke c05ef1459c BLI: add Set.clear method 2020-04-28 16:41:37 +02:00
Jacques Lucke d575b72c16 BLI: add Set.is_empty method 2020-04-28 16:35:49 +02:00
Jacques Lucke 69e8de434f Depsgraph: use BLI::Map in RootPChanMap
Reviewers: sergey, sybren

Differential Revision: https://developer.blender.org/D7521
2020-04-28 15:56:53 +02:00
Bastien Montagne 6278b48ea1 Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_query.c
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
2020-04-28 15:40:12 +02:00
Bastien Montagne 37e08e526c Depsgraph: Add IDProperties handling.
Fix T75279: BLI_assert failed when deleting object in debug build
(only).

And all general cases of ID pointer idproperties that would use a
data-block not referenced anywhere else in the depsgraph.

This includes idproperties from:
* All ID types;
* Bones and pose bones;
* Sequences;
* Nodes and sockets.

Differential Revision: https://developer.blender.org/D7551
2020-04-28 15:31:08 +02:00
Bastien Montagne 9f090bac5c IDProperties: add a foreach looper and use it in libquery code.
Note: part of fix for T75279.

Differential Revision: https://developer.blender.org/D7550
2020-04-28 15:25:19 +02:00
Jacques Lucke 1c7317a6da BLI: add library to simplify writing dot graph exporters
See D6799 for some examples on how to use the library.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D6799
2020-04-28 14:05:24 +02:00
Jacques Lucke 9c65ac7311 BLI: add Map.lookup_or_add_default method 2020-04-28 13:55:36 +02:00
Sergey Sharybin 7d1bb2edfd Cleanup: Strict compiler warning in release mode 2020-04-28 13:31:01 +02:00
Jacques Lucke b21a3e7702 Depsgraph: Use BLI::Map in more places
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7519
2020-04-28 12:49:52 +02:00
Jacques Lucke 9c2715ffda BLI: add Map.is_empty() method 2020-04-28 11:44:10 +02:00
Jacques Lucke 7acc8a5a92 Depsgraph: Use BLI::Map for RNANodeQuery.id_data_map_
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7512
2020-04-28 11:39:49 +02:00
Pablo Vazquez 0372121e17 UI: Title case for 'Prefetch Frames' in VSE 2020-04-28 11:27:05 +02:00
Campbell Barton 3afa2e94ba Merge branch 'blender-v2.83-release' 2020-04-28 18:38:15 +10:00