Commit Graph

103517 Commits

Author SHA1 Message Date
Jacques Lucke f22e85d721 Fix T84935: improve previous fix for boolean custom data layers
This improves the fix introduced in rBdc8b31af578bfcf9f77dbce6d7b7da1006a3c8c1.
While it did not result in other bugs afaik, I thought it would be
good to make the fix more specific, in case some other code did
expect `layer->data` to be null. This updated fix checks for the
very specific case the fix was intended for.
2021-01-26 17:49:58 +01:00
Jacques Lucke ff7a557c67 Geometry Nodes: new Points to Volume node
This implements a new geometry node based on T84606.
It is the first node that generates a `VolumeComponent`.

Differential Revision: https://developer.blender.org/D10169
2021-01-26 17:37:58 +01:00
Hans Goudey 89484e9754 Geometry Nodes: Use highest complexity attribute in join node
This just implements a todo with a utility function that didn't exist
at the time. For example, if one geometry has a "scale" attribute with
a float type and another has a "scale" attribute with a vector type,
the vector type will be used for the resulting geometry.

Differential Revision: https://developer.blender.org/D10206
2021-01-26 10:10:07 -06:00
Sergey Sharybin 66f8835f9c Fix T84850: "Lock to Selection" causes unwanted jumps
Adding new tracks, mask points, mask primitives, changing selection was
causing an unwanted jumps in the view.

This change makes it so those operations are preserving view offset.

Differential Revision: https://developer.blender.org/D10146
2021-01-26 16:23:09 +01:00
Sergey Sharybin 3d3b6d94e6 Subdiv: Use better default UV interpolation
The default one is now UVs are smoothed, boundaries are kept sharp.

After some time of experimentation seems this is better default from
interoperability point of view.

This fixes distortion reported in T83470.

Differential Revision: https://developer.blender.org/D10111
2021-01-26 16:23:09 +01:00
Sergey Sharybin 66151b5de3 Subsurf: Expose all UV interpolation options
Useful for interoperability, and allows to change default mode
without breaking compatibility.
2021-01-26 16:23:09 +01:00
Sergey Sharybin c1d0b234fb Subdiv: Fix typo in RNA enum value name
Was duplicated from SUBSURF_UV_SMOOTH_PRESERVE_BOUNDARIES value.
2021-01-26 16:23:09 +01:00
Hans Goudey 8d51c06611 Cleanup: Reduce variable scope 2021-01-26 09:21:42 -06:00
Antonio Vazquez 20d0bb43af GPencil: Swap positions of Pie menu options for Vertex Paint and Weight Paint
This keep the same logic used with meshes because now the Weight Paint and Vertex Paint are not in the same position for grease pencil.
2021-01-26 16:11:06 +01:00
Brecht Van Lommel 31f568c336 Fix: incomplete integration of PugiXML and Potrace build options
Add them to the standard build configurations, disable properly when library
not found and print as part of configuration overview.
2021-01-26 15:55:27 +01:00
Brecht Van Lommel dde3ecc1a8 Cleanup: compiler warnings
If one method is marked as override, clang warns if others are not.
2021-01-26 15:52:05 +01:00
Brecht Van Lommel c51a5b204c Fix T85048: Cycles sculpt vertex color issues after recent changes
Attribute fields were not fully copied.

Ref D10208
2021-01-26 15:32:05 +01:00
Sybren A. Stüvel 26b5760d6d Fix T85038: No curve is "active" after selecting all curves
Check for selection status beforec learing the "active" flag from an
FCurve. This allows the "Select All Curves" operator to retain what is
seen as the active curve.
2021-01-26 15:13:42 +01:00
Charles Flèche 76ab0381d1 Fix Cycles standalone compilation following API changes
The changes to the socket API were not applied to the standalone app.

Also modify Camera.compute_auto_viewplane() to use Camera.full_width and Camera.full_height as it is not possible to publicly access Camera.width and Camera.height anymore, so the aspect ratio could be computed with stale data.

Differential Revision: https://developer.blender.org/D9961
2021-01-26 14:39:32 +01:00
Charles Flèche 532d3a103a Cycles standalone: fix missing dependencies in CMake files
Also set default CYCLES_INSTALL_PATH to CMAKE_INSTALL_PREFIX.

By default with a `make cycles` this will build to ${CMAKE_BINARY_DIR}/bin

Differential Revision: https://developer.blender.org/D9961
2021-01-26 14:39:32 +01:00
Sybren A. Stüvel 84671d796d Merge remote-tracking branch 'origin/blender-v2.92-release' 2021-01-26 14:38:40 +01:00
Sybren A. Stüvel b665781808 Asset Browser: fix context properties reported to Python
Change `"active_id"` to `"id"` so that tab completion in the asset browser
context returns the correct properties.

055ef5df61 renamed the `active_id` property
to `id`, but `dir(thecontext)` still returned `"active_id"`.
2021-01-26 14:27:33 +01:00
Jeroen Bakker ed809866b1 Viewport Rendering: Don't clamp when overlays are disabled.
During viewport rendering the color values were clamped in order to
apply the overlay on top of it. This clamping would show the scene
colors washed out.

This patch adds a work around to skip the clamping when the overlays are
turned off.

Parial fix for {T77909}
2021-01-26 14:25:18 +01:00
Jeroen Bakker e6aece32a0 GPU: Enable HQ normals workaround for any AMD Drivers on Polaris. 2021-01-26 12:48:50 +01:00
Robert Guetzkow 74633c0456 Merge branch 'blender-v2.92-release' 2021-01-26 12:41:47 +01:00
Robert Guetzkow c399651637 Fix T84708: Versioning for Set Alpha node
The versioning code introduced in rB38df935c0985 skips the composite node
tree that is used by the scene thus not correctly versioning Set Alpha
nodes outside of node groups. This fix iterates through all node trees to
version all Set Alpha nodes.

Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D10110
2021-01-26 12:38:43 +01:00
Jeroen Bakker c3a4c6c209 GPU: Enable HQ normals workaround for AMD 21.1.1 driver.
AMD 21.1.1 still has the same issues as reported in T82856.
2021-01-26 12:30:54 +01:00
Jacques Lucke 4935ed6ce6 Fix T84907: incorrect dirty mask after geometry join node
Hans noticed that these dirty flags are only used for normals currently
and that the edge flag is not used at all. This patch still applies the
"entire" fix with all four flags.

Differential Revision: https://developer.blender.org/D10193
2021-01-26 12:09:44 +01:00
Jacques Lucke dc8b31af57 Fix T84935: boolean custom data layers not saved correctly
The issue was that boolean custom data layers were not written to files,
because the dna struct name `bool` does not exist. Adding a struct that
just contains a `bool/uint8_t` does not seem to be possible, it looks like
the minimum dna struct size is 4 bytes.

The proposed solution has two parts:

1. Write the custom data layer using `BLO_write_raw` instead of
   `BLO_write_struct_array_by_name`.
2. When loading a file, reinitialize any custom data layer that was
   not saved correctly (this is just a fix for existing files).

Differential Revision: https://developer.blender.org/D10194
2021-01-26 12:05:40 +01:00
Campbell Barton f066cee92f Merge branch 'blender-v2.92-release' 2021-01-26 22:04:21 +11:00
Campbell Barton 548d8a397c Fix T85011: "Allow Execution" reloads the wrong file when recovering
Support custom revert actions, necessary for recover operations
to be able to reload the file with scripts enabled.
2021-01-26 21:56:49 +11:00
Bastien Montagne 2a8122fb65 ed_undo refactor: split/remove `ed_undo_step_impl`.
This function was doing too many things, with behaviors fairly different
depending on its input parameters. This was making the code fragile and
hard to follow.

Split it in three:
* `ed_undo_step_pre` does the common actions before we actually undo
  data.
* `ed_undo_step_post` does the common actions after we have undone/redone
  data.

Then, `ed_undo_step_direction`, `ed_undo_step_by_name` and
`ed_undo_step_by_index` do their actual specific actions, with their own
logic.

Note: Since the actual behavior of those three funtions is fairly
different (the first only undo/redo one effective step, the second is only
supposed to **undo** //before// given named step, and the third actually
undo/redo until given indexed step become active), we could also find
better names for those. right now, it sounds like they are doing the
same thing, with just different ways to specify the target step.

Note: This is part of on-going refactor work on undo system, see T83806.

Differential Revision: https://developer.blender.org/D10112
2021-01-26 09:44:46 +01:00
Hans Goudey 0d9f79b163 Cleanup: Reduce variable scope, use LISTBASE_FOREACH macro 2021-01-25 23:47:56 -06:00
Campbell Barton f21de01b84 Merge branch 'blender-v2.92-release' 2021-01-26 15:38:08 +11:00
Campbell Barton 7909f70f64 WM: add "use_scripts" to recover auto-save/session operators
Support recovering blend files with scripts enabled,
needed to fix T85011, can be useful in general too.

Adding this also resolves an assert in BKE_autoexec_match,
since it ran even when scripts were enabled.
2021-01-26 15:34:38 +11:00
Hans Goudey e9e054b987 Geometry Nodes: Add float2 to attribute complexity map 2021-01-25 22:20:41 -06:00
Campbell Barton 71a8e32dc0 Merge branch 'blender-v2.92-release' 2021-01-26 15:18:10 +11:00
Campbell Barton d55d95b04d WM: return success from WM_recover_last_session, minor cleanup
- Return success from WM_recover_last_session
- Avoid setting global variables is already called in WM_file_read.
  While it didn't cause any problems, these assignments ran even when
  recovering the session failed to load the file.
- Return OPERATOR_CANCELLED when the operator fails.

Returning success is needed to fix T85011.
2021-01-26 15:16:12 +11:00
Juanfran Matheu 7d2f746369 TEXTURE PAINT: Tools with wrong cursor
Texture paint tools were using DEFAULT cursor instead of PAINT_CROSS cursor as vertex paint, weight paint and sculpt modes.

Before
{F9591366}

After
{F9591370}

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D10172
2021-01-25 22:37:14 -05:00
Zev Eisenberg 6499a2ec5c Fix typos in driver_functions.py
I'm learning how driver functions work, and I found a couple of typos in the driver_functions.py template file. Here's a quick patch to fix them up.

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D10149
2021-01-25 22:37:14 -05:00
Hans Goudey d7a2e0b83c Cleanup: Use const arguments 2021-01-25 21:11:57 -06:00
Juanfran Matheu be262cf561 TEXTURE PAINT: Tools with wrong cursor
Texture paint tools were using DEFAULT cursor instead of PAINT_CROSS cursor as vertex paint, weight paint and sculpt modes.

Before
{F9591366}

After
{F9591370}

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D10172
2021-01-25 22:01:12 -05:00
Zev Eisenberg 0734b235d2 Fix typos in driver_functions.py
I'm learning how driver functions work, and I found a couple of typos in the driver_functions.py template file. Here's a quick patch to fix them up.

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D10149
2021-01-25 21:59:25 -05:00
Hans Goudey ae1e68f514 Cleanup: Declare variables where initialized 2021-01-25 17:22:52 -06:00
Hans Goudey 70e064f111 Cleanup: Correct comments in ID type enum 2021-01-25 16:28:00 -06:00
Campbell Barton c4f3475612 Cleanup: update comment from 77f73a9284 2021-01-26 09:23:44 +11:00
Falk David 6249995c5e Fix T85054: undo/redo app handlers broken
Regression in recent commit c13383da41
which swapped undo/redo when calling the handlers.

Ref D10200
2021-01-26 09:18:26 +11:00
Julian Eisel eaa726542e Merge branch 'blender-v2.92-release' 2021-01-25 23:12:02 +01:00
Julian Eisel 77f73a9284 Fix library name clipping most of the data-block name in data-block menus
Issue is visible here https://developer.blender.org/F8626313.

If there is enough space for both the item name and the library hint, display
both. Otherwise, clip either the item name, the library hint, or both so that
not more than 60% and 40% of the available width are used repectively.
There are further improvements we could do, as noted in T84188, this just fixes
the regression for the release.

Part of T84188. There were multiple reports about this, see merged in and
mentioned reports in T84188 and T78012.
2021-01-25 23:10:16 +01:00
Campbell Barton a35c0fe6ce Merge branch 'blender-v2.92-release' 2021-01-26 08:16:22 +11:00
Campbell Barton 14f61c619b Fix wm.context_* operators reusing values when it's not expected
wm.context_* operators typically have their options set by menus
or key bindings.

Re-using options in this case can cause problems where two
actions that change unrelated properties will re-use a setting
from the previous execution.

For example changing the lights Power impacted
changing it's Radius afterwards.
2021-01-26 08:13:58 +11:00
Campbell Barton 4fc54ddae1 Cleanup: spelling 2021-01-26 07:50:40 +11:00
Pablo Dobarro 1559aa3da0 Merge branch 'blender-v2.92-release' 2021-01-25 21:11:48 +01:00
Greg Neumiller c134d7437d Fix T84031 initialize connectivity info of the base mesh before using Displacement Smear brush.
Reviewed By: pablodp606

Maniphest Tasks: T84031

Differential Revision: https://developer.blender.org/D9956
2021-01-25 21:09:58 +01:00
Hans Goudey 93e3aed041 Merge branch 'blender-v2.92-release' 2021-01-25 11:48:53 -06:00