Commit Graph

107768 Commits

Author SHA1 Message Date
Germano Cavalcante
f6a581e28a UV: Vert and Edge Slide UI improvements
Changes:
- Add Vert Slide and Edge Slide to 'UV -> Transform' menu.
- Add a separator for Vert Slide and Edge Slide in the context menu.
- Don't display the "Correct UVs" option in the Redo menu of UV Editor.
2024-03-13 12:16:19 -03:00
Germano Cavalcante
31745a53f4 Cleanup: early return & avoid compare strings unnecessarily
`transform_poll_property` can be smarter in the conditions.
2024-03-13 12:16:18 -03:00
Hans Goudey
6b671c4b54 Cleanup: Use simpler lambda capture
It's typically only worth specifying specific captures when the lambda
is stored as a function object for use later. Since this is just passed
as a FunctionRef as an iteration callback, we can use a less complex
capture here. That also helps clarify that this isn't a callback.
2024-03-13 10:42:00 -04:00
Germano Cavalcante
03735d0339 Fix #119244: Auto-Depth fails when we have arrow gizmos in the 3D View
Caused by dd0e60fb51

That commit was an optimization attempt to reuse the depth buffer
updated by the engines.

But it fails when `GPU_clear_depth` is called for gizmos.

So, due to error proneness, revert that solution for now.
2024-03-13 10:50:14 -03:00
Jacques Lucke
9a127a967b Merge branch 'blender-v4.1-release' 2024-03-13 13:50:17 +01:00
Jacques Lucke
61aaf95709 Fix #119406: Node tools don't work in edit mode with unselected object
It's possible for an object to be in edit mode without being selected. Use the
`FOREACH_OBJECT_IN_MODE_BEGIN` iterator to find all objects in the mode instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/119412
2024-03-13 13:49:35 +01:00
Jacques Lucke
43dbb98625 Merge branch 'blender-v4.1-release' 2024-03-13 13:29:28 +01:00
Jacques Lucke
297157e1c7 Fix #119241: setting edge selection does not work correctly
This was likely a typo in bd4c310a19.

Pull Request: https://projects.blender.org/blender/blender/pulls/119413
2024-03-13 13:25:23 +01:00
Jeroen Bakker
f0f911590e EEVEE-Next: Viewport pixel size with up-sampling
EEVEE-Next performes less on integrated GPUs then discrete GPUs.
Most shaders have been analyzed, but there will always be bottlenecks
related to architectural differences.

In order to make EEVEE-Next run smooth on integrated GPUs this change
will implement viewport pixel size option similar to Cycles. The main difference
is that the samples will still be weighted and up-sampled to the final film
resolution. This makes the pixels not look squared in the viewport but will
resolve to something close to the results without up-scaling.

This improves the performance especially on integrated GPUs. The improvement
for discrete GPUs are less noticeable. See here the stats when playing
`rain_restaurant.blend` back on a RAPHAEL_MENDOCINO iGPU.

| Pixel size | Frames per second |
|------------|-------------------|
| 1x         | 0.25 FPS          |
| 2x         | 4.14 FPS          |
| 4x         | 6.90 FPS          |
| 8x         | 9.95 FPS          |

Related to: #114597
See PR for some example images.

Pull Request: https://projects.blender.org/blender/blender/pulls/118903
2024-03-13 12:00:24 +01:00
Jacques Lucke
f828f5d664 Merge branch 'blender-v4.1-release' 2024-03-13 10:45:13 +01:00
Jacques Lucke
48aec82426 Fix: memory leak when using node tool in mesh edit mode
Caused by b40a9ce60b.

For the non-edit mode code path, the mesh is freed as part of
`BKE_mesh_nomain_to_mesh`.
2024-03-13 10:44:39 +01:00
Pratik Borhade
615eceb92e Merge branch 'blender-v4.1-release' 2024-03-13 14:20:48 +05:30
Pratik Borhade
0f751c7e7d Fix #119362: Bone collection visibility when moved to root collection
When bone collection is moved to root collection by drag-drop,
visibility of dropped collection is lost. This is due to missing flags
for the root bone collection which cleared `BONE_COLLECTION_ANCESTORS_VISIBLE`
flag of dropped bcol.

Pull Request: https://projects.blender.org/blender/blender/pulls/119366
2024-03-13 09:48:45 +01:00
Campbell Barton
499a2b2b4b Cleanup: remove double-space in exception message 2024-03-13 17:12:51 +11:00
Campbell Barton
571834457b Extensions: treat a new repo with a blank URL as local
Now there is no difference between omitting remote_path or passing
in an empty string.
2024-03-13 17:10:53 +11:00
Campbell Barton
924561680e WM: suppress prints when G.quiet is set 2024-03-13 15:33:02 +11:00
Harley Acheson
bc70b597fc UI: Use New Internet Icon
We recently added a new "Internet" icon, meant to represent internet
services and protocols generally, in contrast with the existing "url"
icon which can be seen as being http (web link) specifically.  This
PR just uses this icon for cloud storage uses and for remote extension
repository.

Pull Request: https://projects.blender.org/blender/blender/pulls/119409
2024-03-13 02:39:36 +01:00
Harley Acheson
42e7a720c9 UI: Add "Internet" Icon
Add an icon called INTERNET that looks like our current URL without the
mouse cursor, so it looks less specifically like a web document. So can
be used to represent other internet and cloud-based services.

Pull Request: https://projects.blender.org/blender/blender/pulls/119186
2024-03-13 02:13:07 +01:00
Harley Acheson
443ea628c5 UI: Changes to Small Operator Confirmations
Small operator confirmations get separate confirm and cancel buttons,
better descriptions and configurable confirm button text. But still
popup at cursor location and can be cancelled with mouse movement.

Pull Request: https://projects.blender.org/blender/blender/pulls/118346
2024-03-12 23:12:45 +01:00
Hans Goudey
77b6f5d7e3 Merge branch 'blender-v4.1-release' 2024-03-12 17:34:52 -04:00
Hans Goudey
885b116c75 Fix: Socket names in auto smooth versioning node group
The current naming for node groups is "Socket" rather than "Input".
Also remove translation which is unnecessary since these are just identifiers.
2024-03-12 17:33:47 -04:00
Hans Goudey
6cbdb9c242 Merge branch 'blender-v4.1-release' 2024-03-12 17:12:00 -04:00
Hans Goudey
9141a8cb25 Fix #119398: Weighted normal modifier "Keep Sharp" option missing versioning
The Weighted Normal modifier has a "Keep Sharp" option that used to
recalculate the sharp edge tags based on the mesh's smoothing angle.
To keep the same behavior, an auto smooth versioning modifier has to
be added before that modifier when the option is on.

Pull Request: https://projects.blender.org/blender/blender/pulls/119400
2024-03-12 22:08:19 +01:00
Hans Goudey
51c738da1b Cleanup: Mesh: Use updated "corner" name for variables 2024-03-12 14:55:58 -04:00
Hans Goudey
9cafccf004 Cleanup: Sculpt: Unify face PBVH node face index access
Remove one function from the API.
2024-03-12 14:55:58 -04:00
Hans Goudey
b91d0aa0b8 Cleanup: Sculpt: Remove useless comments 2024-03-12 14:55:58 -04:00
Hans Goudey
be2944a6b5 Cleanup: Sculpt: Retrieve data directly from mesh
Remove more use of the redundant storage in SculptSession here.
2024-03-12 14:55:09 -04:00
Sean Kim
08801e8930 Cleanup: Extract project gesture to separate file
This PR extracts the `SCULPT_OT_project_line_gesture` operator into its
own file and namespace out of the `paint_mask.cc` file and
`blender::ed::sculpt_paint::mask` namespace.

Pull Request: https://projects.blender.org/blender/blender/pulls/119394
2024-03-12 19:52:50 +01:00
Sean Kim
40dbe99dd9 Cleanup: Migrate face set gesture operators
This PR moves the `SCULPT_OT_face_set_lasso_gesture` and
`SCULPT_OT_face_set_box_gesture` operator out of the `paint_mask.cc`
file and `blender::ed::sculpt_paint::mask` namespace to
`sculpt_face_set.cc` and `blender::ed::sculpt_paint::face_set`.

Pull Request: https://projects.blender.org/blender/blender/pulls/119392
2024-03-12 19:06:14 +01:00
Germano Cavalcante
a56a975760 UV: Enable 'Set Snap Base' feature
Just like for objects in 3D View, UVs can also benefit from the
`Set Snap Base` feature (key `B`).
2024-03-12 14:35:52 -03:00
Hans Goudey
06bb8bce26 Cleanup: Remove unused includes 2024-03-12 13:32:01 -04:00
Sean Kim
ff34b5f44a Cleanup: Sculpt: Extract trim operators
This PR extracts the `SCULPT_OT_trim_box_gesture` and
`SCULPT_OT_trim_lasso_gesture` into a separate file and
namespace from `blender::ed::sculpt_paint::mask`.

Pull Request: https://projects.blender.org/blender/blender/pulls/119390
2024-03-12 18:24:51 +01:00
Hans Goudey
2c55835c52 Fix: UI: Rename "Bright" property to "Brightness"
"Bright" is an adjective, not a noun.
2024-03-12 13:19:31 -04:00
Hans Goudey
32bc206cc4 Merge branch 'blender-v4.1-release' 2024-03-12 13:18:27 -04:00
Hans Goudey
7d2d590f0e Fix #119307: Anchored multires mask brush broken
I ran into this issue a while ago too, where the vertex iteration
macro didn't process all of the vertices. I didn't figure it out yet,
but it makes more sense in the context of the surrounding code
to specialize this anyway.
2024-03-12 13:17:38 -04:00
Christoph Lendenfeld
1e70c29320 Fix: Slider not respecting bounds when snapping to increments
The issue was that the clamping to the bounds happened before the rounding to the increment step.
In the reported case this led to a divide by 0 error.
The fix is to do the increment first, then the clamp to bounds.

This was reported by Raymond Luc on #117287

Pull Request: https://projects.blender.org/blender/blender/pulls/119367
2024-03-12 17:42:14 +01:00
Jacques Lucke
68c5e35be1 Merge branch 'blender-v4.1-release' 2024-03-12 17:33:59 +01:00
Jacques Lucke
ac8835f18b Fix #119350: shifting text overlay text
The issue was that the object location was taken into account twice using
`object_to_world` and `ob->loc`.

Pull Request: https://projects.blender.org/blender/blender/pulls/119378
2024-03-12 17:32:52 +01:00
Sean Kim
1982cad490 Fix: update comparator for std::sort for NamedAttribute
This PR applies a fix for the comparator being passed into std::sort to
avoid potential Mac / libc++ issues as seen in #119189

Pull Request: https://projects.blender.org/blender/blender/pulls/119385
2024-03-12 17:31:02 +01:00
Hans Goudey
20fbaa455e Merge branch 'blender-v4.1-release' 2024-03-12 12:13:40 -04:00
Hans Goudey
3c3f1e6d62 Fix #117603: Auto smooth replacement versioning skipped for link/append
Unfortunately the only versioning code that can "properly" add data-
blocks is not run when linking or appending (`do_versions_after_setup`
has details). The versioning has to be done manually for this case.
Fortunately that is simple since the versioning function already just
operators on a main database.
2024-03-12 12:09:30 -04:00
Philipp Oeser
6bd97d0477 Merge branch 'blender-v4.1-release' 2024-03-12 17:03:27 +01:00
Philipp Oeser
2886859347 Fix #116262: Modal knife tool can crash if used on hidden object
This could happen if objects were hidden after going to editmode and
knife was used on them.

In that case, raycasting would (rightfully) fail, but there is a
fallback in place using the back-buffer selection method (in which the
hidden object is still present). So a face would be found, but this
makes all following code confusing/wrong since we are working with
coordinates / faces under the assumption there would be a valid/
corresponding object to it in `KnifeTool_OpData` > `objects` -- which is
not the case...

So to resolve, just check if the object is visible before calling
`EDBM_face_find_nearest` in knife code.

Alternativeliy, we could also add a check for Base viewport visibility
to all the bmesh `find_nearest` functions (a bit hesitant though since i
am not sure this would be desired in all cases)

Pull Request: https://projects.blender.org/blender/blender/pulls/119383
2024-03-12 17:02:35 +01:00
Hans Goudey
9d76f93451 Merge branch 'blender-v4.1-release' 2024-03-12 11:43:07 -04:00
Iliya Katueshenock
9ee45646b4 Fix #119239: Use attribute names after free
Fix of error introduced in c31718649d. Attribute names will
be freed on domain resizing. This mean, ref-names which is attribute
ids is will be invalid. To avoid this, make sure names will be gathered
only after resize. To avoid unnecessary topology map computation before
mesh resize, check if attributes on required domain exists, instead
of gathering them and check if span is not empty.

Pull Request: https://projects.blender.org/blender/blender/pulls/119242
2024-03-12 16:42:16 +01:00
Hans Goudey
53f0c0a7e1 Merge branch 'blender-v4.1-release' 2024-03-12 11:40:41 -04:00
Hans Goudey
39ebd68a46 Fix #119361: Sculpt face set draw broken with multires
`PBVHVertexIter::g` is the grid index within the node, not the the global grid index.
2024-03-12 11:39:39 -04:00
Hans Goudey
daa1739953 Merge branch 'blender-v4.1-release' 2024-03-12 10:54:14 -04:00
Hans Goudey
91466f71f1 Fix #91256, #112646: IDProperty UI data lost when changing type
With some data-type conversions we can do a best-effort conversion of
UI data like default values and min and max to the new data type.
This can help to make Python scripts simpler and to avoid bugs like
#105965.

Pull Request: https://projects.blender.org/blender/blender/pulls/106161
2024-03-12 15:49:20 +01:00
Falk David
3d5e3b60be Fix: GPv3: Add missing call to selection.finish() 2024-03-12 15:48:33 +01:00