Commit Graph

103517 Commits

Author SHA1 Message Date
Campbell Barton 3f90c11621 Fix T85318: Driver variable don't resolve collection indices
The driver variable `splines[0]` (on a curve)
behaved as if the path was `splines`.

Resolve pointers was well as properties as it's supported by the caller.

Error in original commit that added property support
82b0a9e369.
2021-02-04 11:19:09 +11:00
Campbell Barton d85c5accec Cleanup: unused function warning 2021-02-04 10:01:19 +11:00
Wayde Moss 0352546cdd NLA: Fix nlasnapshot_blend() Misplaced Null Check
From original commit: rB40b7929cc040
2021-02-03 17:35:21 -05:00
Wayde Moss 40b7929cc0 NLA: Extract nlasnapshot_blend()
Refactor
//nlastrip_evaluate_actionclip()// and //nlaeval_blend_value()// into
//nlasnapshot_blend()//, //nlastrip_evaluate_actionclip()//,
//nlasnapshot_from_action()//.

**Motivations**:
* {T83615} Requires reading all pose bone fcurves before being able to
apply pre-blend transforms. The function //nlasnapshot_from_action()//
achieves this. This effectively removed the need to specially handle
Quaternion blend queuing so that code has been removed.

* {D8296} Adds support for keyframe remapping through an upper stack of
strips. Instead of introducing a variant of the form:
//nlastrip_evaluate_actionclip_inverted_get_lower()//,
//nlastrip_evaluate_actionclip()// will later be extended to take an
`evaluation_mode` as input to avoid duplicating the recursion functions
related to //nlastrip_evaluate()//.

* //nlasnapshot_blend()// will eventually have variants of
//nlasnapshot_blend_get_inverted_lower_snapshot()// and
//nlasnapshot_blend_get_inverted_upper_snapshot()// which are all
independent of NlaStrips and NlaTracks, further simplifying the
blending implementation. Ideally, //nlastrip_evaluate()// would get
renamed to //nlasnapshot_blend_strip()// but that'll be a later patch
to avoid unnecessary patches slowing the review of more important
patches.

No User-side Functional changes

Reviewed By: sybren, #animation_rigging

Differential Revision: https://developer.blender.org/D10220
2021-02-03 16:45:53 -05:00
Wayde Moss 264af1519e NLA: Fix Strip Truncate When Next to Transition
**Problem**:
Translating a strip will truncate it when next to a transition.

**Solution**:
The code only accounted for the prev/next strip for whether it exceeds.
When it was a transition, the exceed logic fails. Now, we use the
nearest non-transition strip instead.

Reviewed By: sybren, #animation_rigging

Differential Revision: https://developer.blender.org/D10083
2021-02-03 16:19:07 -05:00
Pablo Dobarro 70371299ae Merge branch 'blender-v2.92-release' 2021-02-03 21:06:56 +01:00
Pablo Dobarro ebd2aa789e Fix T85230: Face Set Boundary automasking not working with dyntopo
Dyntopo does not have Face Sets implemented yet, so the entire mesh is
considered a single Face Set. In that case, the check unique face set
function should always return true.

Reviewed By: JacquesLucke

Maniphest Tasks: T85230

Differential Revision: https://developer.blender.org/D10259
2021-02-03 21:05:48 +01:00
Pablo Dobarro 0f238c5bcb Fix T85136: Sculpt geometry extract not using updated mesh
This ensured that the sculpt mode deformation is flushed to the mesh
datablock after leaving sculpt mode, so it can be duplicated and
extracted correctly.

Reviewed By: JacquesLucke

Maniphest Tasks: T85136

Differential Revision: https://developer.blender.org/D10254
2021-02-03 21:00:28 +01:00
Pablo Dobarro 1081eee4c5 Fix T84370: Project tool not working with shape keys
A missing flush of the deformed PBVH coordinates to the shape key.

Reviewed By: JacquesLucke

Maniphest Tasks: T84370

Differential Revision: https://developer.blender.org/D10174
2021-02-03 20:58:42 +01:00
Pablo Dobarro 7bde2844ae Fix memory leak in boundary brush preview data
The edge preview data of the boundary needs to be freed with the
boundary data created for the brush. Also, all data for the
ScultpSession preview that is used to render the cursor needs to be
freed with the ##SculptSession##.

Found by Jacques Lucke

Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D10173
2021-02-03 20:55:17 +01:00
Jacques Lucke fec6a4e24a Cleanup: don't end description with dot 2021-02-03 20:04:28 +01:00
Kévin Dietrich 55c88e5582 Alembic procedural: fix crash when cancelling a render during
synchronization
2021-02-03 19:15:49 +01:00
Ankit Meel 9734a78bc8 macOS: Fix build error due to std::optional<T>::value
Added in rBc5514d3a2a03242ddc43f83be4bb72df7f85469f
2021-02-03 23:30:10 +05:30
Germano Cavalcante 9d902d1b30 Merge branch 'blender-v2.92-release'
# Conflicts:
#	source/blender/editors/transform/transform_constraints.c
2021-02-03 14:57:06 -03:00
Germano Cavalcante 5eb5a7f4b7 Fix unreported: Rotation Gizmo "C" influenced by custom orientation
The white rotation Gizmo should always use the View orientation.

Before, if you set an orientation for the gizmo other than the default,
that gizmo would behave like the contraint Z Gizmo.
2021-02-03 14:54:58 -03:00
Ankit Meel dcb2821292 macOS/GTest: Fix duplicate symbol errors with some generators
Don't force load _and_ link against a library in case
linker fails to deduplicate them.
https://devtalk.blender.org/t/macos-duplicate-symbol-errors/17343

Reviewed By: #platform_macos, brecht
Differential Revision: https://developer.blender.org/D10294
2021-02-03 23:20:27 +05:30
Germano Cavalcante bbd74e9fd4 Fix T85340: Gizmo rotation inverted (in some perspective angles)
This is an old bug (strange not to have been reported before).

To define the direction of rotation, the View Vector is used.

However, only the projection matrix was being considered, but in
perspective mode, the position of the pivot also matters.
2021-02-03 14:48:17 -03:00
Germano Cavalcante 9042532085 Cleanup: Move and rename 'getViewVector' utility
This function is only being used by the constraint code.
2021-02-03 14:48:17 -03:00
Germano Cavalcante 8c7b78672e Fix 'getViewVector' returning inverted vector
Despite the wrong value, this change is harmless since the direction of
the vector is not really required.
2021-02-03 14:48:17 -03:00
Bastien Montagne 46e66cecb3 install_deps: Update OSL to 1.11.10.
Good news is, this version support LLVM 11.

But it was a serious pain to get working, even ended having to add an
ugly hack to manually specify the OIIO include dir...

Ref: T83631.
2021-02-03 18:07:48 +01:00
Fabian Schempp c5514d3a2a Geometry Nodes: Multi-Input Sockets
Normally sockets only have one input link. This commit adds the back-end
changes needed to use multiple input links per socket.

Multi-input sockets can be defined with a new flag in `bNodeSocketType`.
The changes necessary to make the sockets work in the geometry nodes
evaluator are generalizing input socket values as a vector of values,
and supporting this in the derived node tree structure.

This patch should contain no functional changes. Two upcoming patches
will use this system for the "Join Geometry" node and expose link picking
and updated display in the UI: D10069 and D10181.

Reviewed By: Jacques Lucke, Hans Goudey

Differential Revision: https://developer.blender.org/D10067
2021-02-03 11:03:00 -06:00
Sebastian Parborg 894cc9c915 Geometry Nodes: Add Collection Info Node
Implements a node to get collection objects.
These objects are then passed along as instances in the node tree.

Follow up tasks:
Multiple nodes does not support instancing yet: T85159
Changing collection offset does not trigger a refresh: T85274

Reviewed By: Jacques, Dalai, Hans

Differential Revision: http://developer.blender.org/D10151
2021-02-03 17:54:33 +01:00
Johannes Jakob 54a4eb5e17 UI: use system generated document icon on macOS
Adds Document Type Identifier configuration to use a system generated
document icon for Blender files on macOS. The system composites the
app’s icon and the extension name onto the document sheet icon
(new style on macOS 11 Big Sur and old style on macOS 10.15 Catalina
and earlier). This is in line with Apple’s Human Interface Guidelines.

Removes the previously used file icon because it is no longer needed.

Differential Revision: https://developer.blender.org/D10267
2021-02-03 17:14:46 +01:00
Yevgeny Makarov e54f88f092 macOS: trackpad scroll direction reversed in list views
The 'ui_pan_to_scroll' uses 'WM_event_absolute_delta_y'. For scrolling the List View
we need to invert the direction to respect "natural scroll direction" system preferences.

Differential Revision: https://developer.blender.org/D10291
2021-02-03 17:13:27 +01:00
Clément Foucault e49b702527 GL: Improve framebuffer error message by adding framebuffer name
Framebuffer error can be hard to track. This makes it much easier to
find the wrong framebuffer configuration.
2021-02-03 17:11:17 +01:00
Bastien Montagne f4f4495586 install_deps: OIIO: tweak to max version, and cleanup compile code.
OSL 1.10.10 does not build with OIIO 2.2.10.
2021-02-03 16:04:18 +01:00
Bastien Montagne 8e98983945 install_deps: Upgrade Alembic to 1.17.16.
See T83246.
2021-02-03 16:04:18 +01:00
Bastien Montagne 1a1aa5392d install_deps: Update Boost to 1.73.
See T83246.
2021-02-03 16:04:18 +01:00
Bastien Montagne 3200a135be install_deps: update Python to 3.9.1, numpy to 1.19.5.
See T83246.
2021-02-03 16:04:18 +01:00
Philipp Oeser 2b18c41c4d Merge branch 'blender-v2.92-release' 2021-02-03 15:53:55 +01:00
Philipp Oeser 85fe12071a Fix T85261: Eevee passes have slight inaccurate colors
In everything in `EEVEE_renderpasses_postprocess` (or the corresponding
renderpass_postprocess_frag.glsl) colors get divided by a
'currentSample'.

This 'currentSample' is always incremented in
`EEVEE_temporal_sampling_draw` (and also one more time before we reach
`EEVEE_renderpasses_postprocess`.
This results in a "off-by-one", slightly inacurate colors and slight
inaccurate transparency (in certain passes like AOVs).

Now decrement the currentSample `EEVEE_renderpasses_postprocess` again
by one to compensate.

Maniphest Tasks: T85261

Differential Revision: https://developer.blender.org/D10286
2021-02-03 15:50:17 +01:00
Jeroen Bakker 3a446f2d9f Merge branch 'blender-v2.92-release' 2021-02-03 15:30:15 +01:00
Jeroen Bakker 487fe5abfc Cryptomatte: Incorrect Coverage with Volumetrics
Related to {D10286}. When volumetrics are used in the scene the coverage
is incorrect. The reason is that the current sample is 1 over the num
samples that are calculated.
2021-02-03 15:30:03 +01:00
Jeroen Bakker 10e3b2dc8e Cryptomatte: Incorrect Coverage with Volumetrics
Related to {D10286}. When volumetrics are used in the scene the coverage
is incorrect. The reason is that the current sample is 1 over the num
samples that are calculated.
2021-02-03 15:27:52 +01:00
Julian Eisel e1f38b2169 Fix incorrect mesh selection duplication in internal utility function
`BKE_mesh_new_nomain_from_template_ex()` would duplicate the mesh selection
storage of the destination mesh to the destination mesh. Since that mesh was
default initialized at this point, the selection was `NULL`, so the duplication
call is essentially a no-op.

Mistake in 7efc75c709.

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

Reviewed by: Sybren Stüvel
2021-02-03 15:09:06 +01:00
Julian Eisel e69217b283 UI: Improve tooltip for continuous grab
Attempt to explain the feature better follow a better writing style.
2021-02-03 15:07:37 +01:00
Bastien Montagne c9d6737e3e BKE UndoSys refactor: deduplicate and simplify code, sanitize naming.
Now we only use 'undo' or 'redo' in function names when the direction is
clear (and we assert about it). Otherwise, use 'load' instead.

When passing an undo step to BKE functions, consider calling code has
done its work and is actually passing the target step (i.e. the final
step intended to be loaded), instead of assuming we have to load the
step before/after it.

Also deduplicate and simplify a lot of core undo code in BKE, now
`BKE_undosys_step_load_data_ex` is the only place where all the complex
logic of undo/redo loop (to handle several steps in a row) is placed. We also
only use a single loop there, instead of the two existing ones in
previous code.

Note that here we consider that when we are loading the current active
step, we are undoing. This makes sense in that doing so //may// undo
some changes (ideally it should never do so), but should never, ever
redo anything.

`BKE_undosys_step_load_from_index` also gets heavily simplified, it's
not basically a shallow wrapper around
`BKE_undosys_step_load_from_index`.

And some general update of variable names, commenting, etc.

Part of T83806.

Differential Revision: https://developer.blender.org/D10227
2021-02-03 11:11:12 +01:00
Bastien Montagne 4884153823 BPY: allow `bpy.data.libraries.load()` to filter out non-asset data-blocks.
Differential Revision: https://developer.blender.org/D10237
2021-02-03 09:53:56 +01:00
Clément Foucault 2ce1400297 Merge branch 'blender-v2.92-release' 2021-02-03 00:17:52 +01:00
Clément Foucault 0fc456f091 Fix T85314 GPU: Drawlist submit data overflows.
This was caused by an incorrect bound check. Since we now use different
data type for indexed and non-indexed drawcalls, we need to check if the
next drawcall is going to overflow the buffer.
2021-02-03 00:15:52 +01:00
Alexander Gavrilov 78ff852680 Force Fields: implement early filtering by the Affect flags.
Most fields have Affect Location and Rotation options that switch
off their effect, but they are only checked as the last step after
the force is already computed. It is more efficient to check it
when building the list of field objects, just like zero weight.
It is also possible to check the strength-related fields for 0.

As an aside, this adds Location to Texture fields (they don't
handle rotation) and both Location & Rotation checkboxes to
Fluid Flow. Boid and Curve Guide remain without options for
now as they are completely different from others.

Differential Revision: https://developer.blender.org/D10087
2021-02-02 23:03:16 +03:00
Robert Guetzkow 64a963486f Merge branch 'blender-v2.92-release' 2021-02-02 20:42:54 +01:00
Robert Guetzkow 4a80c0e275 Fix T85225: Variable scope in ridged multi-fractal noise
This patch fixes a bug introduced in
rB74188e65028d268af887ab2140e4253087410c1e.
The commit incorrectly moved the declaration and intialization of the
variable `pwr` inside the loop. Since the value was originally modified
in each iteration based on it's previous value and `pwHL` through
`pwr *= pwHL`, this change in scope was wrong. It resetted the value in
each iteration. This patch moves the declaration of `pwr` outside the
loop again.

Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D10258
2021-02-02 20:37:28 +01:00
Harley Acheson f2781e1c7c Fix for T82459 - Input Language Independent of Display Language
Allow OS input language to initiate IME, regardless of Blender output language.

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

Reviewed by Julian Eisel
2021-02-02 10:58:02 -08:00
Hans Goudey b3f9895ab0 Fix build error on windows after recent commit
rB198ff4703f84d0c3267 neglected to remove designated initializers,
which are not supported in the C++ 17 standard.
2021-02-02 11:26:17 -06:00
Sebastián Barschkis 1a5b988509 Merge branch 'blender-v2.92-release' 2021-02-02 17:51:18 +01:00
Sebastián Barschkis 8c36f6becf Fix T84649: Quick liquid causing crash on scale operation
This commit makes use of the updated fluid sources files (previous commit rB9ad828dbad94d279521875db47a3472a38cc9b29)
2021-02-02 17:50:08 +01:00
Sebastián Barschkis 9ad828dbad Fluid: Updated Mantaflow source files
Includes improvements for the file IO. Namely, more meta data will be written from now on.

This change is required to prevent IO issues (e.g. T84649) that arised through the use of sparse grids caching (introduced in 2.92).
2021-02-02 17:46:48 +01:00
Bastien Montagne 4ff5051ffc BKE BMain relations: add utils to (re)set tags of the entries. 2021-02-02 17:26:59 +01:00
Bastien Montagne 2262e18269 Cleanup: LibOverride: group logically utils static functions. 2021-02-02 17:26:59 +01:00