Commit Graph

112452 Commits

Author SHA1 Message Date
Campbell Barton 7b0174ef81 Cleanup: remove overly detailed contact info, correct md5 copyright
Also remove copyright text with no assignment.
2022-02-10 09:05:40 +11:00
Hans Goudey e420514892 Merge branch 'blender-v3.1-release' 2022-02-09 11:06:34 -06:00
Hans Goudey d1202bd641 Fix T95620: Crash When Entering Edit Mode on a Curve
Under some circumstances, simply adding a curve object and going
to edit mode would cause a crash. This is because the evaluated
`CurveEval` was accessed but also freed by the dependency graph.

The fix reverts the part of b76918717d that uses the
`CurveEval` for the curve object bounds. While this isn't ideal,
it was the previous behavior, and some unexpected behavior
with object bounds is much better than a crash. Plus, given the plans
of using the new "Curves" data-block for evaluated curves, this
situation will change relatively soon anyway.
2022-02-09 11:06:10 -06:00
Sergey Sharybin 6e14be858c Merge branch 'blender-v3.1-release' 2022-02-09 16:16:34 +01:00
Sergey Sharybin c69ee218d7 Revert "Fix size_t -> int -> size_t round trip in Cycles"
This reverts commit d74bb7be19.

Need to re-iterate to have a proper support of all platforms.
2022-02-09 16:16:21 +01:00
Richard Antalik 3e67831d3f VSE: Fix sound strip not aligned with movie strip
Strip aligning wasn't done when length of 2 strip is equal, but since
these strips are aligned according to position in stream this can
produce offset.
2022-02-09 16:06:56 +01:00
Jacques Lucke e098a29606 Merge branch 'blender-v3.1-release' 2022-02-09 15:54:41 +01:00
Jacques Lucke 7313a84c5a Fix T95612: only overwrite existing attributes with matching domain and type
Also fixes T95611 and T95610.

Differential Revision: https://developer.blender.org/D14051
2022-02-09 15:50:03 +01:00
Sergey Sharybin 669d3bbad6 Merge branch 'blender-v3.1-release' 2022-02-09 14:46:00 +01:00
Sergey Sharybin d74bb7be19 Fix size_t -> int -> size_t round trip in Cycles
There are two things achieved by this change:

- No possible downcast of size_t to int when calculating motion steps.
- Disambiguate call to min() which was for some reason considered
  ambiguous on 32bit platforms `min(int, unsigned int)`.

On an implementation side the `min()` is defined for a fixed width
integer type to disambiguate uint from size_t on 32bit platforms,
and yet be able to use it for 32bit operands on 64bit platforms without
upcast.

Fixes 32bit platforms (such as i386) in Debian package build system.

Differential Revision: https://developer.blender.org/D13992
2022-02-09 14:45:39 +01:00
Jeroen Bakker 3577ccc9c0 Cleanup: Add newline in error message.
Increases readability during debugging.
2022-02-09 14:09:04 +01:00
Campbell Barton 6345032a49 Cleanup: non-standard license formatting, minor changes 2022-02-09 23:57:12 +11:00
Campbell Barton 312d6925c4 Cleanup: make file headers more consistent
Also some descriptive text into doc-strings.
2022-02-09 23:47:34 +11:00
Richard Antalik b4700a13c6 VSE: Use float for transformation offset
When image position is animated, float makes movement look smoother.
2022-02-09 13:42:58 +01:00
Jacques Lucke 7c10e364b2 BLI: wrap parallel_invoke from tbb 2022-02-09 13:08:04 +01:00
Jacques Lucke 3f061ef050 Merge branch 'blender-v3.1-release' 2022-02-09 12:38:08 +01:00
Jacques Lucke d82384f7e1 Fix T95640: missing null check in previous commit 2022-02-09 12:36:49 +01:00
Jeroen Bakker 312c8fdaf9 Cleanup: Better naming in lib_remap.
Renames is_never_null to violates_never_null.
2022-02-09 11:44:14 +01:00
Alaska fd6506626b Adjust "Show Backface" tool tip to be more accurate
Reviewed By: fclem

Differential Revision: https://developer.blender.org/D13849
2022-02-09 11:28:39 +01:00
Alaska d3d9e2abbf Fix small grammatical mistake in Refraction Depth tooltip
Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D13850
2022-02-09 11:26:21 +01:00
Jacques Lucke bfacb22a93 Merge branch 'blender-v3.1-release' 2022-02-09 11:20:51 +01:00
Jacques Lucke 06ac599261 Fix T91840: do not create invalid links when inserting a node
Differential Revision: https://developer.blender.org/D14050
2022-02-09 11:19:23 +01:00
Colin Basnett 6f01758b47 Added a "Sharpen Less" kernel for the Filter Compositor node
Added a new "Sharpen Less" kernel to the filter compositor node. The intent here is to provide a much less aggressive sharpening filter that can't simply be solved by toning down the factor on the existing sharpen filter.

The existing "Sharpen" filter uses a "box" kernel:

```
-1 -1 -1
-1  9 -1
-1 -1 -1
```

The new "Sharpen Less" filter uses a "diamond" kernel:

```
 0 -1  0
-1  5 -1
 0 -1  0
```

The difference between the two is clear to see in the following side-by-side:

{F12847431}

Below shows the difference between the filtering kernels as applied to a B&W render of Suzanne with the UV grid as a texture. The left side of the render using the existing "Sharpen" filter, and the right side showing the new "Sharpen Less" filter. Notice that the left side is more aggressive in accentuating localized contrasts across the image. This can lead to what appears to be aliasing or striations in the resulting image:

{F12847429}

https://developer.blender.org/T95275
https://blender.community/c/rightclickselect/57Kq/?sorting=hot
{F12847428}

Reviewed By: #compositing, jbakker

Differential Revision: https://developer.blender.org/D14019
2022-02-09 10:28:00 +01:00
Campbell Barton 81da638c44 Cleanup: move file descriptions into doxygen file section
Continuation of 19100aa57d.
2022-02-09 18:33:29 +11:00
Campbell Barton 19100aa57d Cleanup: move file descriptions into doxygen file section
Also other minor corrections & reformat particle system copyright.
2022-02-09 18:10:43 +11:00
Campbell Barton 2c7f2a0ba4 Cleanup: simplify copyright headers for sequence & imbuf 2022-02-09 16:47:15 +11:00
Campbell Barton 68a21697be Cleanup: remove "The Original Code is: ..." from code comments
This is almost always meaningless as most code has changed
since the comment was added. Besides this, version control can be used
to check if/when a file was modified.

Some cases of this were kept when they contain details
about the original copyright holder.
2022-02-09 16:04:31 +11:00
Campbell Barton 59a7095f79 Cleanup: use consistent copyright location, move descriptions
Order copyright immediately after the license block,
this was done almost everywhere with a few exceptions.

Remove authors from a few files (we had already removed "Contributors"
section however with old patches being applied this gets added back in).

Also move descriptive text into the doxygen comment block under \file.
In some cases remove the text as it was accidentally copied.
2022-02-09 16:00:16 +11:00
Shrey Aggarwal f021d46752 Cleanup: GHOST_ISystem::toggleConsole API
GHOST_ISystem::toggleConsole had a somewhat misleading name
it could be fed 4 different values, so it was not as much a
toggle as a set console window state.

This change renames `toggleConsole` to a more appropriately
named `setConsoleWindowState` and replaces the integer it had
to an enum so it's easy to tell what is being asked of it at
the call site.

Reviewed By: LazyDodo
Differential Revision: https://developer.blender.org/D14020
2022-02-08 17:40:48 -07:00
Paolo Acampora 452a7f6731 Fix T91871: Symmetrize Armature on custom bone shape
Symmetrize Armature now also symmetrizes the transform of custom bone
shapes.

Adds a new property to `bpy.ops.armature.symmetrize`:

//Parameters//:

- **direction **(enum in ['NEGATIVE_X', 'POSITIVE_X'], (optional)) –
  **Direction**, Which sides to copy from and to (when both are selected)

- **custom_shape **(enum in ['SYMMETRIZE_SAME', 'SYMMETRIZE_ALL',
  'SYMMETRIZE_NONE'], (optional)) – **Custom Shapes**, Wether to
  symmetrize non symmetric custom bone shapes, all custom shapes, or
  none at all

//Rationale//:

Reviewed By: #animation_rigging, Mets, sybren

Maniphest Tasks: T91871

Differential Revision: https://developer.blender.org/D13416
2022-02-08 18:09:48 +01:00
Harley Acheson 55c90df316 BLF: Enable Filtering of woff and woff2 Fonts
Add files with extension ".woff" and ".woff2" to FILE_TYPE_FTFONT
file type. Allows selecting and using these types of font files.

See D13822 for more details.

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

Reviewed by Campbell Barton
2022-02-08 08:43:01 -08:00
Campbell Barton 5d9d2565d2 Cleanup: simplify DNA genfile casting
Avoid using the uint64_t as an intermediate cast since it complicates
behavior for signed types (which first need to be cast to an int64_t).

Assign both old_value_i & old_value_f from the original value to avoid
the need for different handling of signed/unsigned types.

Reviewed By: JacquesLucke

Ref D14039
2022-02-08 22:52:46 +11:00
Alexander Gavrilov 460d1a4cb3 Eevee: support the no-op Bump node optimization like in Cycles.
A Bump node without a Height input is meaningless and does nothing.
As such, it is available as an old workaround that allows making Node
Group inputs that default to normal when not connected, by routing
via a no-op Bump node before doing math.

Cycles specifically recognizes this use case and either bypasses
the node, or converts it into a Geometry Normal node, but Eevee
was still evaluating it as usual. That incurred performance cost,
and also normalized the vector unlike Cycles.

This implements the same bypass logic for Eevee. Since I'm not
sure if it's possible to totally remove the node at this stage,
it emits a no-op function call to copy the input vector.

Differential Revision: https://developer.blender.org/D14045
2022-02-08 14:37:25 +03:00
Campbell Barton 3267c91b4d Fix T91253: Slow pose bone selection with many bones
Viewport cull bones during selection to avoid depth-picking
reading the depth buffer for bones that aren't in the viewport.

Files with thousands of bones could hang blender for seconds while
selecting. The issue could still happen with overlapping bones or when
zoomed out so all bones are under the cursor, however in practice this
rarely happens.

Now files with many bones select quickly.

Related changes include:

- Split `BKE_pchan_minmax` out of `BKE_pose_minmax`.
- Add `mat3_to_size_max_axis` to return the length of the largest
  axis (used for scaling the radius).

Reviewed By: sybren

Maniphest Tasks: T91253

Ref D13990
2022-02-08 22:16:51 +11:00
Jacques Lucke 530be35516 Merge branch 'blender-v3.1-release' 2022-02-08 12:13:24 +01:00
Jacques Lucke de71860555 Fix T95570: missing task isolation when computing normals 2022-02-08 12:12:49 +01:00
Bastien Montagne 923ccf6b10 LibOverride: Use new 'hierarchy root' info in relevant override code.
This new info simplifies greatly the handling of resync and deleting
liboverride hierarchies, and makes those operations more robust to
complex dependencies cases between different hierarchies.

Related to T95283.
2022-02-08 11:22:56 +01:00
Bastien Montagne 98c242affd LibOverride: Add 'hierarchy root ID' info.
This change will make handling of liboverrides hierarchies (especially
resyncing) much easier and efficient. It should also make it more
resilient to 'degenerate' cases, and allow proper support of things like
parenting an override to another override of the same linked data (e.g.
a override character parented to another override of the same
character).

NOTE: this commit only implements minimal changes to add that data and
generate it for existing files on load. Actual refactor of resync code
to take advantage of this new info will happen separately.
2022-02-08 10:51:31 +01:00
Bastien Montagne 32278b79a8 LibOverride: Add 'hierarchy root ID' info.
This change will make handling of liboverrides hierarchies (especially
resyncing) much easier and efficient. It should also make it more
resilient to 'degenerate' cases, and allow proper support of things like
parenting an override to another override of the same linked data (e.g.
a override character parented to another override of the same
character).

NOTE: this commit only implements minimal changes to add that data and
generate it for existing files on load. Actual refactor of resync code
to take advantage of this new info will happen separately.
2022-02-08 10:50:39 +01:00
Philipp Oeser 0617efd51b Merge branch 'blender-v3.1-release' 2022-02-08 10:26:42 +01:00
Philipp Oeser 1995aae6e3 Fix T94415: Nodes: poor selection behavior inside frame nodes
Previously, node selection made no distinction between a frame node and
other nodes. So a frame node would be selected by their whole rect or
center (depending on box/lasso/circle select). As a consequence of this,
box and lasso could not pratically be started inside a frame node (with
the intention to select a subset of contained child nodes) because the
frame would be selected immediately and tweak-transforming started.
Circle selecting would always contain the frame node as well (making
transforming a subset of nodes without also transforming the whole frame
impossible).

Now change selection behavior so that for all selection modes only the
border [the margin area that is automatically added around all nodes,
see note below] of a frame node is considered in selection. This makes
for a much more intuitive experience when arranging nodes inside frames.

note: to make the area of interest for selection/moving more obvious,
the cursor changes when hovering over (as is done for resizing).
note: this also makes the resize margin consistent with other nodes.
note: this also fixes right resize border (was exclusive instead of
inclusive as every other border)

Also fixes T46540.
2022-02-08 10:14:14 +01:00
Bastien Montagne 67c12ed765 Cleanup: remove useless statement.
Layouts are active by default when created, no need to set this
explicitely. Leftover from proxy removal.
2022-02-08 09:16:49 +01:00
Kévin Dietrich 8abd8865d2 Mesh: add option to select vertices by similar vertex crease
This adds an option to the "Select Similar" operator in edit mode to
select vertices based on vertex crease similarity. The implementation
follows that of the edge crease, with a 1-dimensional KD-tree used to
store and retrieve vertex indices base on crease values.

To maintain compatibility with old files (scripts), the `SIMEDGE_CREASE`
enumeration identifier remains `CREASE`, while the one for the new
`SIMVERT_CREASE` is `VCREASE` to follow the naming convention of other
enum values.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D14037
2022-02-08 06:10:22 +01:00
Dominik Fill 7047bd41c6 UI: Change computation of node socket position to align with label
This Diff changes the computation of the input and output socket
position to being always aligned with its corresponding label.

Reviewed By: campbellbarton

Ref D14025
2022-02-08 14:55:02 +11:00
Campbell Barton 667b4bc0e4 Cleanup: clang-format 2022-02-08 14:25:31 +11:00
Campbell Barton 9d674d9852 Fix dna_genfile error converting signed int types to floating point
Regression in 51befa4108
caused negative values to overflow into a uint64_t.

Resolve by casting to a signed int from originally signed types.

This caused D14033 not to work properly.
2022-02-08 11:54:44 +11:00
Campbell Barton 7df651367f Cleanup: use an intermediate value for cast_primitive_type
Assign the actual value before casting to large uint64_t/double types.

This improves readability, especially in cases where both pointer
and integer casts were used in one expression, to make matters worse
clang-format treated these casts as a multiplication.

This also made debugging/printing the values more of a hassle.

No functional changes (GCC produced identical output).
2022-02-08 11:54:44 +11:00
Hans Goudey e5fc579073 Merge branch 'blender-v3.1-release' 2022-02-07 18:42:58 -06:00
Hans Goudey b76918717d Fix T95573: Incorrect bounding box of evaluated curve
Account for `CurveEval`, which stores the proper deformed and
procedurally created data, unlike the `nurb` list, which has always
just meant a copy of the original curve.

Also account for the case when the curve is empty by using a -1, 1,
fallback bounding box in that case, just like mesh objects.
2022-02-07 18:42:31 -06:00
Hans Goudey 770793e545 Merge branch 'blender-v3.1-release' 2022-02-07 16:11:21 -06:00