Commit Graph

129728 Commits

Author SHA1 Message Date
Campbell Barton 1486f4bc05 UI: add dynamic topology toggle to sculpt menu
This wasn't available in any menus making it inaccessible from menu
search.
2023-10-25 16:18:04 +11:00
Campbell Barton dbd7c5f35a WM: reduce noisy logging storing/loading operator properties
Don't log wm.operator operator properties when no properties
are stored/loaded, this was noisy, especially for the
INFO_OT_reports_display_update operator when runs from a timer.
2023-10-25 16:01:45 +11:00
Campbell Barton be9b604190 WM: use a fake clipboard when simulating input
Allow simulated interactions to run without clobbering the users
clipboard text.
2023-10-25 15:51:22 +11:00
Campbell Barton 6ba74de1f2 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:27 +11:00
Campbell Barton 14e92decd0 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:24 +11:00
Campbell Barton 16551f9201 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:22 +11:00
Campbell Barton 5d3ce7c679 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:18 +11:00
Campbell Barton 0b4dd16830 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:15 +11:00
Campbell Barton 272f7637d0 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:13 +11:00
Campbell Barton 7cdd73b247 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:10 +11:00
Campbell Barton fc1c41b121 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:05 +11:00
Campbell Barton 3638aa5b77 Fix Wayland/LIBDECOR assuming a normal window state on startup
As the window state will have been initialized, read the current window
state instead of assuming normal so changes are properly detected.

Also note that the cause of #107314 has been fixed up-stream.
2023-10-25 11:21:17 +11:00
Campbell Barton 60a8ae7830 Build: use /etc/ssl for OPENSSLDIR on Linux & macOS
Define the OPENSSLDIR so the local build paths from the build systems
aren't being searched on users systems.
2023-10-25 11:05:34 +11:00
Michael Jones 4e3ee4f026 Cycles: Fix animation hangs/crashes in Metal due to leaking temp objects
This PR adds `@autoreleasepool` blocks around functions that have been observed to create hidden temporary NSObjects, and eventually cause command buffer failures. A couple of allocations needed to be tweaked in order to maintain correct retain/release behaviour. This PR also fixes the command buffer error text to show more useful information.
2023-10-24 23:20:16 +01:00
Hans Goudey 692292536f Fix #113665: Sculpt mode does not unshare color attribute data
When retrieving a color attribute to paint it, the layer data needs to
be unshared so that it doesn't modify data from separate meshes.
In the past I think we've unknowingly avoided this problem by porting
code to the new attribute API. I've been refactoring `PBVH` and
`SculptSession` to make that possible (removing the long-lived
layer pointers in the two structs). But that wouldn't fit as a bug fix.
In the meantime, make sure the color attribute data is un-shared
and separate "for read" and "for write" versions of the function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114119
2023-10-24 20:19:14 +02:00
Hans Goudey 7dcd777379 Fix #114077: Duplicate edges for two point evaluated curves
A curve with only two points shouldn't be considered cyclic. Otherwise
a duplicate edge is added between the points. This fixes the utility
that calculates the segment count to account for this and adjusts
other code to account for that as necessary. Curves now evaluate
correctly to a single evaluated segment in this case (in the case of
Bezier and NURBS curves, it depends on the resolution though).

Co-authored-by: Dalai Felinto <dalai@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/114095
2023-10-24 19:39:21 +02:00
Hans Goudey 5af8b839cf Fix #113988: Deformed PBVH modifies original normals
The PBVH is given the evaluated positions from the end of the modifier
stack, but then updates normals from the original mesh based on those
positions. This causes a feedback loop, even when in vertex paint mode.

As mentioned in a comment, calculating these normals and duplicating
the arrays is quite wasteful. But it's necessary since the PBVH always
assumes we are interested in modifying the positions, and also always
retrieves the normals from the original mesh too. Those things would
be good to untangle at some point too, but for now this change is small
and helps to clarify the situation as well.

Caused by: b339e3937d

Pull Request: https://projects.blender.org/blender/blender/pulls/114118
2023-10-24 18:56:15 +02:00
Hans Goudey 74af0528f4 Fix #113752: Explode modifier edge cut option broken
`EdgeHash` was replaced by `VectorSet`, but the changes in the data
structure hid some other changes, causing incorrect indices to be used.
Instead use `Map` and explicitly build the indices similar to how they
were counted in a separate loop before.

Caused by: 425b871607
2023-10-24 18:44:24 +02:00
Dalai Felinto 753e9e0f2b Fix Node Tools popovers dark text
Labels in popover menus are always darker. That made the popovers for
Type and Modes to have a way too dark color. Specially when the values
were off.

This commit mimics what we do in the viewport Selectability &
Visibility menu. Basically we don't gray out the labels even if the
values are off.

Co-authored by: Hans Goudey <hans@blender.org>
2023-10-24 16:32:13 +02:00
Dalai Felinto 7b7cef7998 Merge remote-tracking branch 'origin/blender-v4.0-release' 2023-10-24 16:09:51 +02:00
Dalai Felinto 2d7ccae528 Fix #114015: Search filter removes panel header checkboxes
Caused by 1eb90ee519.

Co-authored by: Hans Goudey <hans@blender.org>
2023-10-24 16:09:26 +02:00
Dalai Felinto 91124fcff6 Fix #114015: Search filter removes panel header checkboxes
Caused by 1eb90ee519.

Co-authored by: Hans Goudey <hans@blender.org>
2023-10-24 16:08:21 +02:00
Charles Wardlaw 8caee74a11 Fix #112294: USD import: Fix spammy prints for unsupported and non-array attributes.
- Added support for Point3* and Normal3* attributes as CD_PROP_FLOAT3.
- Caught the last two quaternion formats.
- Silenced prints on quaternion and string formats, as they are known unsupported attributes.

This pull addresses https://projects.blender.org/blender/blender/issues/112294.
The test file provided for that issue now only generates one error, which I believe
is important to keep.

Co-authored-by: Charles Wardlaw <kattkieru@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112298
2023-10-24 15:31:09 +02:00
Jeroen Bakker ea2746d468 Fix #113235: Voronoi GLSL Shaders On Legacy Intel
When using Voronoi shader nodes on legacy Intel platforms (HD4400) Blender would crash
due to a driver bug. The bug is related to generating the `fractal_voronoi_x_fx` functions.
It doesn't effect all drivers, but mainly from vendors that don't allow installing the official
intel drivers.

We have tried several approaches including using unique function names and unroll only the
function of the body. But none worked on the failing platform.

In the future we could solve this by including our own GLSL compiler, but that is still very
experimental and requires a lot of testing.#113938

Pull Request: https://projects.blender.org/blender/blender/pulls/113834
2023-10-24 14:49:09 +02:00
Sergey Sharybin 92a19747f0 Sculpt: Add timing information for BMesh PBVH
The goal is to make it possible to have more or less reliable way
to perform performance comparisons of changes in algorithms used
in dynamic topology.

This change allows to run Blender with the following arguments:

  blender --log "sculpt.detail,pbvh.bmesh" --log-level 2

and see timing of dynamic topology flood-fill operation, as well as
individual timings of edge subdivision/collapsing.

Pull Request: https://projects.blender.org/blender/blender/pulls/114099
2023-10-24 14:37:54 +02:00
Campbell Barton 15692501b2 Merge branch 'blender-v4.0-release' 2023-10-24 23:35:15 +11:00
Campbell Barton 0f36ac4e66 Revert "Fix #112441: Restore Key Map Item does not restore the active property"
This reverts commit bb39f4fa41.
2023-10-24 23:35:06 +11:00
Michael Jones af629b8c20 Cycles: Remove MetalRT experimental status, and add "auto enable" option
This PR removes the "experimental" disclaimer from the MetalRT control now that the unit tests all render correctly with it enabled. As well as "Off" and "On", this adds a third "Auto" setting  - a new default which can be used to pick the best option.

Pull Request: https://projects.blender.org/blender/blender/pulls/114067
2023-10-24 14:33:47 +02:00
Campbell Barton cdbde7d941 Fix #113603: User modified key-map preferences for add-ons don't load
Regression from [0] where the key-map was attempting to load preferences
for key-map items for add-on operators which were not yet defined.
Resolve by postponing keymap updating until after loading add-ons.

[0]: 6de294a191
2023-10-24 23:32:16 +11:00
Jacques Lucke bef2155baa Merge branch 'blender-v4.0-release' 2023-10-24 14:05:33 +02:00
Jacques Lucke e4ad58114b Nodes: support looking up node sockets by identifier and name
The main goal of this patch is to turn `node.inputs[...]` and `node.outputs[...]` into
the main way to lookup sockets on a node. Currently, it's used for that sometimes,
but often it is not, because it does not work in all cases. More specifically, it does
 not work when a node has multiple sockets with the same name but different
identifiers, which is relatively common.

This patch proposes to make the string lookup more convenient, more useful and
less prone to breaking after changes in Blender.

This is achieved by changing how the lookup works:
* First, it tries to find an available socket with an identifier that matches the given
  key. This is checked first, it makes sure that every socket can be accessed by its
  identifier. The identifier matching is currently disabled in some nodes where we
  want to change identifiers soonish.
* If that didn't work, it tries to find an available socket with a matching name. This
  is often convenient because it generally matches what can be seen in the UI.
  Furthermore, it's also necessary to avoid breakage with old usages of this lookup
  function.
* If both options above didn't work, it checks whether the given key matches any
  socket name/identifier that the node used to have in the past, but has been
  renamed for whatever reason. This mainly exists to avoid breaking scripts by certain
  kinds of changes in the future. This is not included in this patch.

Note, previously, string lookup would also find unavailable sockets. This is disabled
now, because the way we handle unavailable sockets internally is likely to change.
Therefor, any use of unavailable sockets might break (unavailable != hidden). For
the time being, it's still possible to find unavailable sockets by iterating over all sockets.

This change has a small chance to break existing scripts because the behavior
changes for some inputs in some nodes. However, for the cases where the function
is used in practice, I don't really expect any breakage.

This patch also allows us to give a better answer to reports like #113106.

Pull Request: https://projects.blender.org/blender/blender/pulls/113984
2023-10-24 14:04:18 +02:00
bonj 7c5b78d2c7 Fix "Fix #102885": Wrong check is always False
The check was incorrect, so it always reset the subtype to NONE.

Pull Request: https://projects.blender.org/blender/blender/pulls/114038
2023-10-24 13:57:23 +02:00
Jeroen Bakker b0b46b1c59 EEVEE-Next: Fix Updating Reflection Probes
Due to missing logic reflection probe updates where not always
performed. There were multiple artifacts:

* Lookdev Worlds where Black Until the Scene world was rendered.
  Issue was that the lookdev world didn't initialized its atlas
  coordinates.
* Lookdev world should only retrigger reflection probe update when
  material is compiled
* When world is updated, reflection probes should be updated; this
  might require a redraw when reflection probe draw passes aren't
  updated this sample.

Pull Request: https://projects.blender.org/blender/blender/pulls/114064
2023-10-24 13:43:10 +02:00
Philipp Oeser 4ce55752ae Merge branch 'blender-v4.0-release' 2023-10-24 13:14:19 +02:00
Philipp Oeser a48d4184b5 Fix #114094: Mask by Color brush has stopped working
Caused by 97f2b01ea9.

Above commit refactored code in a way that it was always early out
(always comparing the current mask value to itself and not the new mask
value).

Pull Request: https://projects.blender.org/blender/blender/pulls/114101
2023-10-24 13:11:27 +02:00
Hans Goudey f2627a55ee Fix #114053: Sculpt visibility broken after undo
Caused by 3e81f66998, The `BLI_BITMAP_TEST` macro
is very flexible and seems to compile with `BitVector` as well.
2023-10-24 12:31:15 +02:00
Julian Eisel 7654898c18 Fix compile error on GCC
Was getting a compile error after 7afa5aaa59.
2023-10-24 12:07:17 +02:00
Julian Eisel 489d07de69 Fix memory leak when renaming node group sockets/panels
Steps to reproduce:
- Download .blend from #114059
- Edit name of socket or panel in the node interface tree view
- Close Blender

Pull Request: https://projects.blender.org/blender/blender/pulls/114083
2023-10-24 11:48:08 +02:00
Sergey Sharybin 7afa5aaa59 BLI: Add std::string variant of BLI_uniquename_cb
Allows to ensure unique name for cases when name is a dynamically
sized string.

Pull Request: https://projects.blender.org/blender/blender/pulls/114052
2023-10-24 11:35:52 +02:00
Hans Goudey 7ba92a2a2f Fix #114081: Auto smooth versioning node group missing UI data
Fix the missing min and max and correc the interface socket's subtype.
2023-10-24 11:28:10 +02:00
Philipp Oeser e219cddae5 Merge branch 'blender-v4.0-release' 2023-10-24 10:41:08 +02:00
Philipp Oeser dcdafaa9f5 Fix #114082: Disabling Geometry Nodes is_tool also disables is_modifier
fd9d22ba57 introduced `GeometryNodeAssetTraitFlag` (at that time
`GEO_NODE_ASSET_POINT_CLOUD` was the max enum value), then 6da4b87661
added `GEO_NODE_ASSET_MODIFIER` (but the max enum value was not changed
accordingly).

Pull Request: https://projects.blender.org/blender/blender/pulls/114092
2023-10-24 10:40:28 +02:00
Christoph Lendenfeld 265858525e Refactor: ANIM_setting_get_rna_values to return a Vector
No functional changes.

Changing old C code to C++ by returning a `Vector` from `ANIM_setting_get_rna_values`.
This reduces the argument count for that function and simplifies the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/113931
2023-10-24 09:01:38 +02:00
Jesse Yurkovich 125776e660 Merge branch 'blender-v4.0-release' 2023-10-23 21:51:27 -07:00
Jesse Yurkovich 10eb1ac8e4 Fix #111442: Correctly handle 1-channel image formats during save
It's possible to encounter a true 1-channel image if it's coming
directly from, say, a float-value AOV or similar.

This was not accounted for and would cause issues when saving the image
out to a 3 or 4 channel format (wrong values) or when saving out to
another 1 channel format (unnecessary usage of luminance weight values).

Pull Request: https://projects.blender.org/blender/blender/pulls/111577
2023-10-24 06:50:13 +02:00
Campbell Barton 64d5938662 Merge branch 'blender-v4.0-release' 2023-10-24 14:13:43 +11:00
Campbell Barton 0ff1414f04 Docs: update bpy documentation, referencing PIP which is now supported
Resolve #114076.
2023-10-24 14:10:34 +11:00
Richard Antalik d9f66a78f7 Merge branch 'blender-v4.0-release' 2023-10-24 05:07:23 +02:00
Richard Antalik dadbb5c5f7 Fix VSE retiming last key position incorrect
Last key is drawn on the right edge of the strip, but that is end of
the frame, which it should be bound to. Because of this, drawing code
and operators must consider, that this key is always displaced.

This was not done in 86a0d0015a and caused issues like #113755 that was
fixed incorrectly.
2023-10-24 04:57:00 +02:00
Richard Antalik 79b1eacba9 Fix #113890: Buffer overread when rendering after strip content range
Caused by incorrect frame index clamping in `SEQ_give_frame_index()`.
2023-10-24 04:37:34 +02:00