Commit Graph

112404 Commits

Author SHA1 Message Date
Richard Antalik
4681987d92 Fix T96156: Snap to 3D cursor can't be undone
Caused by oversight in 2bcf93bbbeb. Operator returns `OPERATOR_CANCELLED`
when it should return `OPERATOR_FINISHED`.

Reviewed By: mano-wii, campbellbarton

Differential Revision: https://developer.blender.org/D14243
2022-03-07 07:46:24 +01:00
Jacques Lucke
45079b169d Fix T96160: freezing when using multiple Handle Type Selection nodes
Differential Revision: https://developer.blender.org/D14245
2022-03-04 15:21:18 +01:00
Sergey Sharybin
769ae5c866 Fix T96139: Cycles doesn't warn if the render is paused
Caused by 6ec83afb1db8.

Technically, a regression since 3.0.

Differential Revision: https://developer.blender.org/D14239
2022-03-03 17:21:11 +01:00
Brecht Van Lommel
9c2e385509 Fix Cycles hang in classroom scene with upcomping AMD driver version 22.10
This is a workaround until there is a fix in the HIP compiler or driver.

Differential Revision: https://developer.blender.org/D14232
2022-03-03 13:42:58 +01:00
Campbell Barton
d961adb866 Fix T96135: Mesh coordinates are set to the last edited shape-key
When exiting edit-mode set the vertex coordinates to the basis-shape when editing non-basis keys.

Regression in bfdbc78466ac14d45f353db9aa39cb21bb962701.

Reviewed By: sergey

Ref D14234
2022-03-03 20:42:30 +11:00
Thomas Dinges
8506f3d9fe Blender 3.1 bcon4 - change release cycle to release candidate
This is still a rolling release candidate with new builds every day
as a preparation to the final release.
2022-03-02 17:17:38 +01:00
Jacques Lucke
2fb31f34af Fix T95692: incorrect interpolated children particle hair
Differential Revision: https://developer.blender.org/D14227
2022-03-02 17:12:56 +01:00
Hans Goudey
216a215ba5 Fix T93573: Remove outline from instances in edit mode
This commit removes the outline from instances generated from an object
when in edit mode. This takes the change in aa13c4b386b1 a bit further,
with the idea that instance outlines are more like regular outlines.

Because evaluated object data that doesn't match the original object
type is treated as an instance internally, this fixes the way evaluated
meshes for curves objects have an outline, for example.

See the differential revision for a visual comparison.

Differential Revision: https://developer.blender.org/D14226
2022-03-02 10:49:48 -05:00
Jacques Lucke
7935d3668a Fix T95479: geometry nodes crash with cage display
Differential Revision: https://developer.blender.org/D14225
2022-03-02 16:10:42 +01:00
Kévin Dietrich
6883c47bb5 Fix T94729: GPU subdivision does not support meshes without polygons
There are two issues revealed in the bug report:
- the GPU subdivision does not support meshes with only loose geometry
- the loose geometry is not subdivided

For the first case, checks are added to ensure we still fill the
buffers with loose geometry even if no polygons are present.

For the second case, this adds
`BKE_subdiv_mesh_interpolate_position_on_edge` which encapsulates the
loose vertex interpolation mechanism previously found in
`subdiv_mesh_vertex_of_loose_edge`.

The subdivided loose geometry is stored in a new specific data structure
`DRWSubdivLooseGeom` so as to not pollute `MeshExtractLooseGeom`. These
structures store the corresponding coarse element data, which will be
used for filling GPU buffers appropriately.

Differential Revision: https://developer.blender.org/D14171
2022-03-02 15:19:55 +01:00
Jacques Lucke
4a95c3466f Fix T96085: repeated evaluation of geometry nodes when nothing changed
Differential Revision: https://developer.blender.org/D14216
2022-03-02 14:12:08 +01:00
Brecht Van Lommel
383a6ee78c Fix T94609: geometry nodes always re-evaluated with image texture nodes
previously_visible_components_mask was not preserved for Image ID nodes, which
meant it was always detected as newly visible and tagged to be updated, which
in turn caused the geometry nodes using it to be always updated also.

Reviewed By: sergey, JacquesLucke

Maniphest Tasks: T94609

Differential Revision: https://developer.blender.org/D14217
2022-03-02 11:45:17 +01:00
Jeroen Bakker
5086913b28 Fix T96116: Image editor not updated when adding new tile. 2022-03-02 11:42:23 +01:00
Kévin Dietrich
4932269ec3 Fix T94952: normals maps don't render correctly with GPU subdivision
A simple case of missing the tangent VBO. The tangents are computed from
the coarse mesh, and interpolated on the GPU for the final mesh. Code for
initializing the tangents, and the vertex format for the VBO was
factored out of the coarse extraction routine, to be shared with the
subdivision routine.
2022-03-02 00:58:40 +01:00
Aaron Carlisle
a75e9863fe Cmake: Re-enable Amaranth add-on
This add-on now conforms to the distribution requirements, see: T95442.
2022-03-01 17:45:13 -05:00
Germano Cavalcante
9bd586a01e Fix T95608: Mac issues with drag drop on multi-monitor
Mousemove events are sent to windows.

In Windows OS, almost all mousemove events are sent to the window whose
mouse cursor is over.

On MacOS, the window with mousemove events is always the active window.
It doesn't matter if the mouse cursor is inside or outside the window.

So, in order for non-active windows to also have events,
`WM_window_find_under_cursor` is called to find those windows and send
the same events.

The problem is that to find the window, `WM_window_find_under_cursor`
only has the mouse coordinates available, it doesn't differentiate
which monitor these coordinates came from.

So the mouse on one monitor may incorrectly send events to a window on
another monitor.

The solution used is to use a native API on Mac to detect the window
under the cursor.

For Windows and Linux nothing has changed.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D14197
2022-03-01 18:25:12 -03:00
Germano Cavalcante
8e88af9934 Fix wrong object mode checking in snap code
The value of `OB_MODE_OBJECT` is 0, this makes it unsuitable as a bitflag.

Issue pointed out at https://pvs-studio.com/en/blog/posts/cpp/0922/

Thanks to Andrey Karpov
2022-03-01 16:30:30 -03:00
Brecht Van Lommel
8322a4f6b7 Fix T92980: missing Cycles video texture update with persistent data 2022-03-01 19:51:30 +01:00
Aaron Carlisle
f085c2bab5 Cmake: Re-enable tiny cad add-on
This add-on now conforms to the distribution requirements, see: T95442.
2022-03-01 11:58:27 -05:00
Michael Jones
952a613d38 Cycles: Hide MetalRT checkbox for AMD GPUs
This patch hides the MetalRT checkbox for AMD GPUs, pending fixes for MetalRT argument encoding on AMD.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D14175
2022-03-01 16:05:47 +00:00
Campbell Barton
d681d82d41 Fix T96035: Some tool settings do not work
Oversight in 74611e3555684a22e9a07bd0992a444b571b8083 missed updating
property access to use the tool identifier to lookup the property group.
2022-03-01 23:09:56 +11:00
Sergey Sharybin
629f22f161 Fix T95997: Crash when entering edit mode
The issue was uncovered by the 0f89bcdbebf5, but the root cause goes
into a much earlier design violation happened in the code: the modifier
evaluation function is modifying input mesh, which is not something
what is ever expected.

Bring code closer to the older state where such modification is only
done for the object in edit mode.

---

From own tests works seems to work fine, but extra eyes and testing
is needed.

Differential Revision: https://developer.blender.org/D14191
2022-03-01 11:46:38 +01:00
Jeroen Bakker
cde5e12c0b Fix T96097: Image editor tile drawing not working.
The image engine is depth aware when using tile drawing the depth is
only updated for the central image what lead to showing the background
on top of other areas.

Also makes sure that switching the tile drawing would lead to an update
of the texture slots.
2022-03-01 11:37:18 +01:00
Jacques Lucke
9216cf9cb5 Fix: dangling internal links after removing sockets
This is a follow up for rBd5e73fa13dd275fb9c76b1e41142ab086dd2e6be.
The issue was found with the file in T95997.
2022-03-01 11:34:36 +01:00
Jeroen Bakker
476fe7d164 Fix T95979: Bake doesn't update Image editor. 2022-03-01 11:20:54 +01:00
Jeroen Bakker
eec1c16200 Fix T96030: Update Image editor after reload. 2022-03-01 11:04:09 +01:00
Jeroen Bakker
a5214212cf Fix T96030: ImageEditor not updated for generated images. 2022-03-01 10:51:07 +01:00
Jeroen Bakker
d743ef91df Fix 3d texture painting artifacts.
When dimension of images aren't a multifold of 256 parts of the gpu
textures are not updated. This patch will calculate the correct part of
the image that needs to be reuploaded.
2022-03-01 10:45:19 +01:00
Jeroen Bakker
4a4701b43c Fix painting on none 256 aligned images.
Internally the update tiles are 256x256. Due to some miscalculations
tiles were not generated correctly if the dimension of the image wasn't
a multifold of 256.
2022-03-01 09:32:58 +01:00
Jeroen Bakker
34f6a99433 Fix crash triggered by an introduced assert. 2022-03-01 08:56:58 +01:00
Jeroen Bakker
ead84d2ba6 Fix building error in previous commit. 2022-03-01 08:53:23 +01:00
Jeroen Bakker
5e9c1feb8a Image Engine: Performance 8 byte images.
Previously we used to cache a float image representation of the image in
rect_float. This adds some incorrect behavior as many areas only expect
one of these buffers to be used.

This patch stores float buffers inside the image engine. This is done per
instance. In the future we should consider making a global cache.
2022-03-01 08:41:25 +01:00
Aaron Carlisle
91de337dc5 Cmake: Re-enable tissue add-on
This add-on now conforms to the distribution requirements, see: T95442.
2022-02-28 23:45:59 -05:00
Aaron Carlisle
59a133b61f Cmake: Re-enable real snow add-on
This add-on now conforms to the distribution requirements, see: T95442.
2022-02-28 14:38:13 -05:00
Brecht Van Lommel
44b0c70919 Fix T92288, T96041: instancing of shared mesh objects without modifiers broken
New code from the vertex normal refactor cfa53e0fbeed combined with older code
from 592759e3d62a that disabled instancing for custom normals and autosmooth
meant that instancing was always disabled.

However we do not need to disable instancing for custom normals and autosmooth
at all, this can be shared between instances just fine.
2022-02-28 18:32:27 +01:00
Jacques Lucke
37d2c774c1 Fix T96073: Don't remove links when inserting reroute nodes
This was an oversight in rB06ac5992618a75c453e495e06af7c5faf30499a7.
2022-02-28 16:42:15 +01:00
Bastien Montagne
413e87b6b7 Fix T96048: Crash on appending with driver variables loop in shapekeys.
The usual 'shape keys snowflake' nightmare again...
2022-02-28 15:02:17 +01:00
Sergey Sharybin
6bbf63f251 Fix T96054: Switching vertex group does not update display
Caused by 0f89bcdbebf5 and was not fully addressed by 6f9828289f39:
tagging an ID with flag 0 is to be seen as an explicit tag for copy
on write.

Would be nice to either consolidate code paths of flag 0 and explicit
component tag, or get rid of tagging with 0 flag, but that is above of
what we can do for the upcoming release.
2022-02-28 10:54:07 +01:00
Jeroen Bakker
cb736d2f03 Fix T95298: Multiview images not displaying correctly.
Image users have a multi_index that wasn't updated in case it is a normal
image.
2022-02-28 09:23:45 +01:00
Jeroen Bakker
540fd10b4f Fix T95992: Crash Ancored strokes 2d texture painting.
When using ancored stroked the diameter of the stroke can be 0 what
leads to a division by zero that on certain platforms wrap to a large
negative number that cannot be looked up. This fix will clamp the size
of the brush to 1.
2022-02-28 09:03:47 +01:00
Jeroen Bakker
2a644deaa7 Fix T95981: Remove implicit conversion in texture paint shader.
This fixes a crash on selected platforms.
2022-02-28 08:40:59 +01:00
Germano Cavalcante
4ee4b61dd8 Ghost/Event System: Support mapping more keys
This fixes T93051, T76405 and maybe others.

Characters like '²', '<' are not recognized in Blender's shortcut keys.
And sometimes simple buttons like {key .} and {key /} on the Windows
keyboard, although the symbol is "known", Blender also doesn't
detect for shortcuts.

For Windows, some of the symbols represented by `VK_OEM_[1-8]` values,
depending on the language, are not mapped by Blender.

On Mac there is a fallback reading the "actual character value of the
'remappable' keys". But sometimes the character is not mapped either.

On Windows, the solution now mimics the Mac and tries to read the button's
character as a fallback.

For unmapped characters ('²', '<', '\''), now another value is chosen as a
substitute.

More "substitutes" may be added over time.

Differential Revision: https://developer.blender.org/D14149
2022-02-26 17:56:17 -03:00
Hans Goudey
7aa0be4b32 Fix: Failing OBJ export tests due to mesh normals commit
In some cases, the normal edit modifier calculated the normals on one
mesh with the "ensure" functions, then copied the mesh and retrieved
the layers "for write" on the copy. Since 59343ee1627f4c369e23, normal
layers are never copied, and normals are allocated with malloc instead
of calloc, so the mutable memory was uninitialized.

Fix by calculating normals on the correct mesh, and also add a warning
to the "for write" functions in the header.
2022-02-25 17:18:07 -05:00
Kévin Dietrich
a911f075d7 Fix T93123: viewport lags with custom attributes
The check to see if newly requested attributes are not already in the
cache was not taking into account the possibility that we do not have
new requested attributes (`num_requests == 0`). In this case, if
`attr_used` already had attributes, but `attr_requested` is empty, we
would consider the cache as dirty, and needlessly rebuild the attribute
VBOs.
2022-02-25 22:04:10 +01:00
Kévin Dietrich
72a286760f Fix compile warning from earlier commit. 2022-02-25 22:01:17 +01:00
Kévin Dietrich
c8b4e0c0b5 Disable GPU subdivision if autosmooth or split normals are used
These features are complicated to support on GPU and hardly compatible
with subdivision in the first place. In the future, with T68891 and
T68893, subdivision and custom smooth shading will be separate workflows.
For now, and to better prepare for this future (although long term
plan), we should discourage workflows mixing subdivision and custom
smooth normals, and as such, this disables GPU subdivision when
autosmoothing or custom split normals are used.

This also adds a message in the modifier's UI to indicate that GPU
subdivision will be disabled if autosmooth or custom split normals are
used on the mesh.

Differential Revision: https://developer.blender.org/D14194
2022-02-25 21:28:13 +01:00
Kévin Dietrich
118a219e9d Fix different shading between CPU and GPU subdivision
Reuse the same vertex normals calculation as for the GPU code, by
weighing each vertex normals by the angle of the edges incident to the
vertex on the face.

Additionally, remove limit normals, as the CPU code does not use them
either, and would also cause different shading issues when limit surface
is used.

Fixes T95242: shade smooth artifacts with edge crease and limit surface
Fixes T94919: subdivision, different shading between CPU and GPU
2022-02-25 21:25:13 +01:00
Brecht Van Lommel
4896e72a4d Fix T95977: Point Info node radius wrong under rotation 2022-02-25 20:51:22 +01:00
Bastien Montagne
e84b42bfcf Fix (unreported) Outliner 'liboverride create hierarchy' applied on several IDs.
This operation can only be applied on one ID at a time, so only apply it
to the active Outliner item, and not all the selected ones.

Also renamed `Make Library Override` menu entry to `Make Library Override
Single` to emphasis this is not the 'default expected' option for the
user.
2022-02-25 15:06:43 +01:00
Campbell Barton
0bac962fe5 CMake: exclude add-ons that don't confirm to key requirements
These add-ons don't have documentation on blender.org, see: T95442

These can be re-enabled once documentation has been relocated.
2022-02-25 21:50:00 +11:00