Commit Graph

88347 Commits

Author SHA1 Message Date
Campbell Barton
3532da44ee Merge branch 'blender-v3.0-release' 2021-11-03 22:26:39 +11:00
Campbell Barton
42d0107ee5 Fix crash dissolving overlapping faces
In rare cases disolving faces would crash, caused by iterator
variable reuse in b29a8a5dfe.
2021-11-03 22:17:10 +11:00
Julian Eisel
5095e4fc22 UI: Display disabled-hint when dragging material outside object mode
Display a "disabled hint" (text explaining why something isn't possible)
when dragging a material over the 3D View, while being in edit mode or
so (anything that isn't object mode).
2021-11-03 11:57:05 +01:00
Jacques Lucke
bdf6665e3a Merge branch 'blender-v3.0-release' 2021-11-03 10:54:53 +01:00
Jacques Lucke
b55bddde40 Fix T91862: do type conversion when data enters or exists node group
The geometry node evaluator now has access to the entire socket path
from the node that produces a value to the node that uses it. This allows
the evaluator to make decisions about at which points in the path the
value should be converted. Multiple conversions may be necessary under
some circumstances with nested node groups.

Differential Revision: https://developer.blender.org/D13034
2021-11-03 10:54:17 +01:00
Jacques Lucke
2b12b4cd7d Fix: make sure geometry owns mesh before taking ownership
Differential Revision: https://developer.blender.org/D13075
2021-11-03 10:42:48 +01:00
Campbell Barton
cea7ee7582 Merge branch 'blender-v3.0-release' 2021-11-03 11:49:58 +11:00
Campbell Barton
7996b49cb0 Cleanup: spelling 2021-11-03 11:42:07 +11:00
Campbell Barton
8dbca01531 Fix T92515: Incorrect translation when scaling pose bones 2021-11-03 11:24:29 +11:00
Hans Goudey
ac0eefe26f Merge branch 'blender-v3.0-release' 2021-11-02 18:22:50 -05:00
Hans Goudey
11392829ad Fix T92316: Inconsistent name for Set Curve Tilt node 2021-11-02 17:38:58 -05:00
Harley Acheson
c4b73847d3 BLF: Remove Thread Locking For Font Metrics
This patch removes the need to lock the thread just to get to some
generic (not glyph-specific) font metrics.

See D12976 for more details.

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

Reviewed by Campbell Barton
2021-11-02 14:28:25 -07:00
Hans Goudey
8c58838f6a Merge branch 'blender-v3.0-release' 2021-11-02 15:23:59 -05:00
Hans Goudey
a72ed0bb7f Cleanup: Improve curve point attribute assert
This properly checks the order of point domain attributes on each
spline, and avoids the map, which makes the code easier to understand.
The assert is also added to realizing instances and the join node.

Differential Revision: https://developer.blender.org/D13071
2021-11-02 15:22:49 -05:00
Hans Goudey
18392cef17 Fix T92652: Joining curves breaks point attribute order
Currently the curve to mesh node relies on the order of attributes being
the same on every spline. This is a worthwhile assumption, because it
will allow removing the attribute name storage duplication on every
spline in the future.

However, the join geometry node broke this order, since it just created
new attributes without any regard to the order. To fix this, I added a
"reorder" step after all the merged attributes have been created, the
types have been joined, etc. It should be possible to change this code
so that the attributes are added with the right order in the first
place, but I would like to do that after refactoring spline attribute
storage, and not for 3.0.

Differential Revision: https://developer.blender.org/D13074
2021-11-02 15:16:52 -05:00
Hans Goudey
5cd1210b52 Merge branch 'blender-v3.0-release' 2021-11-02 13:44:17 -05:00
Hans Goudey
7aa311e539 Cleanup: Add function to get attribute ID from custom data layer 2021-11-02 13:43:54 -05:00
Brecht Van Lommel
48e2a15160 Fix T77681, T92634: noise texture artifacts with high detail
We run into float precision issues here, clamp the number of octaves to
one less, which has little to no visual difference. This was empirically
determined to work up to 16 before, but with additional inputs like
roughness only 15 appears to work.

Also adds misisng clamp for the geometry nodes implementation.
2021-11-02 18:56:25 +01:00
Sergey Sharybin
3dcd042bfc Merge branch 'blender-v3.0-release' 2021-11-02 18:38:59 +01:00
Sergey Sharybin
978f2cb900 Fix T89487: Crash adding Rigid Body to object with shared mesh data
Not sure why this bug was only discovered by such an elaborate steps
and why it took so long to be discovered. The root of the issue is
that in the 956c539e59 the typical flow of tag+flush+evaluate was
violated and tagging for visibility change happened after flush.
2021-11-02 18:36:24 +01:00
Jacques Lucke
53fdde3f64 Merge branch 'blender-v3.0-release' 2021-11-02 18:14:59 +01:00
Jacques Lucke
3a454beae7 Fix T91094: missing update after collection changed
Since rBb67fe05d4bea2d3c9efbd127e9d9dc3a897e89e6 collections
have a geometry component that depends on all the geometries
inside the collection. Contrary to what I originally thought
`ID_RECALC_COPY_ON_WRITE` does not trigger a collection geometry
update. This makes sense because a collection may change in ways
that do not require a geometry update.
Instead, we have to trigger the geometry update manually now by
passing `ID_RECALC_GEOMETRY` when appropriate.
2021-11-02 18:13:01 +01:00
Bastien Montagne
0a254109b8 Merge branch 'blender-v3.0-release' 2021-11-02 17:52:03 +01:00
Bastien Montagne
29dff8f844 Fix lots of missing messages i18n handling in uiItemL calls.
Also fix several wrong usages of `IFACE_` (as a reminder, error/info
messages should use `TIP_`, not `IFACE_`).
2021-11-02 17:50:18 +01:00
Bastien Montagne
242ad4bd0f Merge branch 'blender-v3.0-release' 2021-11-02 17:49:52 +01:00
Bastien Montagne
20b163b533 UIMessages/i18n: Fix incorrect part of rBdabfac37e35274b.
My bad, forgot lower-level UI code does not handle translations itself.

Thanks to Hans Goudey (@HooglyBoogly) for the heads up.
2021-11-02 17:49:32 +01:00
Omar Emara
27621490c2 Merge branch 'blender-v3.0-release' 2021-11-02 18:33:25 +02:00
Omar Emara
980bc5a707 UI: Use socket type info color to draw links
Currently, colored links overlay only supports standard sockets defined
by Blender. Some add-ons like Animation Nodes defines custom sockets for
everything and hence doesn't get colored sockets.

This patch uses the draw color from the socket type info to draw links
in order to support custom sockets.

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

Reviewed By: Hans Goudey
2021-11-02 18:29:35 +02:00
Bastien Montagne
12bf4adbe3 Merge branch 'blender-v3.0-release' 2021-11-02 17:05:03 +01:00
Charlie Jolly
2c23256288 Merge branch 'blender-v3.0-release' 2021-11-02 16:03:17 +00:00
Bastien Montagne
dabfac37e3 Fix more UI message/i18n issues. 2021-11-02 17:02:33 +01:00
Charlie Jolly
6981bee2c7 Fix T92736: Hole in mesh after Set Position
The geometry node port of voronoi_smooth_f1 function has a
division by zero when smoothness is set to zero.
Using a safe_divide within the function causes issues
and was noted in the original patch D12725.
Solution in this case is to clamp zero smoothness to FLT_EPSILON.

Reviewed By: JacquesLucke

Maniphest Tasks: T92736

Differential Revision: https://developer.blender.org/D13069
2021-11-02 15:58:17 +00:00
Sergey Sharybin
c01b3c534b Merge branch 'blender-v3.0-release' 2021-11-02 15:42:09 +01:00
Jacques Lucke
698b05fc58 BLI: avoid passing nullptr to strncmp
This resulted in an ASAN warning.
2021-11-02 15:07:50 +01:00
Ray Molenkamp
a7e92843f7 Fix: Build error on windows.
External symbols in C files need
to be marked as such otherwise
the linker will not find them.
2021-11-02 07:43:44 -06:00
Hans Goudey
e64d4d0200 Merge branch 'blender-v3.0-release' 2021-11-02 07:59:35 -05:00
Hans Goudey
efcf36f2e9 Fix T92532: Missing null checks in IDPropertyManager.update_from
Calling it with a None argument, or no arguments, or with a property
that is missing UI data for some reason would fail. There is no
particular reason why ensuring those things don't happen is helpful,
so just add null checks for safety.

Differential Revision: https://developer.blender.org/D13024
2021-11-02 07:59:10 -05:00
Campbell Barton
0daf429591 Merge branch 'blender-v3.0-release' 2021-11-02 23:38:01 +11:00
Campbell Barton
2f0f08bc98 Fix T92733: Error moving a completely locked bone 2021-11-02 23:36:22 +11:00
Jacques Lucke
b7dc667eb2 Merge branch 'blender-v3.0-release' 2021-11-02 12:31:05 +01:00
Jacques Lucke
b1bf884889 Images: fix error in previous refactor
Some compositor tests (e.g. `compositor_color_test`) broke
because of rB0c3b215e7d5456878b155d13440864f49ad1f230.
The issue was a heap-use-after-free bug caused by a missing
call to `MEM_CacheLimiter_unmanage`.
2021-11-02 12:30:27 +01:00
Campbell Barton
7a4ee2fd4f Merge branch 'blender-v3.0-release' 2021-11-02 22:06:35 +11:00
Campbell Barton
9bd97e62ad Fix T92464: Operators fail after opening blend files via an operator
Operators such as setting the object mode failed after calling
WM_OT_open_mainfile from Python.

Keep the window after loading a file outside the main event loop.
2021-11-02 22:01:38 +11:00
Jeroen Bakker
52f4a908f7 Removed compilation warning nullptr check in image engine. 2021-11-02 12:00:07 +01:00
Jacques Lucke
ffd3dd6376 Merge branch 'blender-v3.0-release' 2021-11-02 11:17:53 +01:00
Jacques Lucke
0c3b215e7d Images: refactor how failed image load attempts are remembered
Previously, `ImageTile->ok` and `ImageUser->ok` were used to indicate
whether an image failed to load. There were three possible values
which (probably) had the following meanings:
* `0`: There was an error while loading the image. Don't try to load again.
* `1`: Default value. Try to load the image.
* `2`: The image was loaded successfully.

This image-wide flag did not make sense unfortunately, because loading
may work for some frames of an image sequence but not for others.
Remember than an image data block can also contain a movie.

The purpose of the `->ok` flag was to serve as an optimization to avoid
trying to load a file over and over again when there is an error (e.g. the
file does not exist or is invalid). To get the optimization back, the patch
is changing `MovieCache` so that it can also cache failed load attempts.
As a consequence, `ibuf` is allowed to be `NULL` in a few more places.
I added the appropriate null checks.

This also solves issues when image sequences are used with the
Image Texture node in Geometry nodes (also see D12827).

Differential Revision: https://developer.blender.org/D12957
2021-11-02 11:17:12 +01:00
Philipp Oeser
223f2b27d1 Merge branch 'blender-v3.0-release' 2021-11-02 09:57:16 +01:00
Campbell Barton
21e168069d Merge branch 'blender-v3.0-release' 2021-11-02 19:52:01 +11:00
Campbell Barton
8ca6e51ade Cleanup: clang-tidy 2021-11-02 19:50:53 +11:00
Philipp Oeser
a5b996df88 Fix T92608: Image Editor does not display stereo images
Caused by own {rB5aa3167e48b2}.
Related commit: {rBebaa3fcedd23}.

For stereo renders, `BKE_image_is_multilayer` is true, however we seem
to get to down to `space_image_gpu_texture_get` [where this is called]
from `IMAGE_cache_init` with a NULL Image->RenderResult.

So what then happens is that `BKE_image_multilayer_index` is called and
even though it has an appropriate codepath for stereo, it earlies out
and does not set multi_index correctly.

Still a bit puzzled why RenderResult is NULL for a render, but since
other places also check for a valid RenderResult before going down the
_multilayer_ route (and doing _multiview_ instead), now do the same
thing, BKE_image_multiview_index is now called in these cases (and seems
to behave correctly, checked with layers and passes and all seems to
display correctly, either in stereo or choosing individual eyes).

thx @jbakker & @brecht for double-checking.

Maniphest Tasks: T92608

Differential Revision: https://developer.blender.org/D13063
2021-11-02 09:42:32 +01:00