Commit Graph

133545 Commits

Author SHA1 Message Date
Bastien Montagne de5451b112 Cleanup: Move BKE_anim_data header to be fully C++. 2024-02-28 11:51:03 +01:00
Sergey Sharybin 44810e137f Merge branch 'blender-v4.1-release' 2024-02-28 11:37:09 +01:00
Sergey Sharybin 9060b0dfb7 Cleanup: Correction to type annotation and smaller fixes/optimizations
This commit contains changes done to these scripts in the main branch.
2024-02-28 11:36:44 +01:00
Sergey Sharybin 066f7d9eea Revert "Cleanup: Address mypy errors and warnings"
The similar cleanup with a lot of other changes were committed
to the main branch. Is easier to revert this change, copy the
scripts from main, and merge things back.

This reverts commit 4bc1ba3c2d.
2024-02-28 11:36:44 +01:00
Jacques Lucke 4a4916db45 Fix #118237: don't allow changing NodeSocket.type directly on built-in nodes
Changing socket types like this is not generally supported. Usually one should
modify a property that is stored on the node instead. For custom node trees,
one should generally remove one socket and replace it with the new one.

Existing addons might use this functionality on custom node trees where it's
okayish. This patch forbids changing socket types directly on built-in nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/118794
2024-02-28 11:35:32 +01:00
Falk David a492a8f695 Fix #118837: Time offset modifier not working as expected
The time offset modifier was working differently than in GPv2. This is because in the new implementation, the time offset modifier actually modifies the keyframe mappings. And thus the order of the modifiers, and where the time offset modifier is placed in the stack, matters.

The problem is that this can lead to unexpected results like seeing unmodified drawings.
Technically, the issue here is that other modifiers only modify the current frame as supposed to all drawings in the timeline.
This is done as an optimization, but doesn't work when drawings can be shifted around on the timeline using the time offset modifier.

The fix changes the way the modifiers are executed. Because the time offset modifier can only modify **when** the drawings
are show, and not the drawing data themselves, we execute all the time offset modifiers first (in the order they appear in the stack) and then execute all the other modifiers after.

This means that the user can no longer run into the issue of "moving" drawings away from the current frame where they can't be seen.
It also makes time offset modifier behave the same as they did in GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/118842
2024-02-28 11:30:43 +01:00
Sergey Sharybin 4bc1ba3c2d Cleanup: Address mypy errors and warnings
Pull Request: https://projects.blender.org/blender/blender/pulls/118844
2024-02-28 11:25:44 +01:00
Campbell Barton 6c78f79740 Cleanup: pass matrices by reference instead of value 2024-02-28 17:16:18 +11:00
Campbell Barton 12386e6809 Fix PLY import error caused by recent cleanup
Regression caused by [0]. Passing "Span" by value caused io_ply test to
fail. References were used so changes would be applied to arguments
passed in.

Revert these changes for "ply_import.cc".

[0]: d338261c55
2024-02-28 17:01:30 +11:00
Campbell Barton 4701879f52 Merge branch 'blender-v4.1-release' 2024-02-28 16:09:47 +11:00
Campbell Barton 7f8fcddba5 Merge branch 'blender-v4.1-release' 2024-02-28 16:09:42 +11:00
Campbell Barton 503de16353 Fix #117583: Inaccessible title bar buttons on GNOME/Wayland
New windows on GNOME with LIBDECOR windowing would sometimes have an
unusable title-bar with the whole title-bar acting as the edge-resize.

Would happen predictably when opening large windows which the window
manager would resize to fit the display.

The cause of this was Blender receiving a window configure event
without a window size for new windows. This configure event
would be ignored, causing the title bar not to work properly.

This is a regression from [0] which removed logic to calculate the
window size from the arguments passed to GHOST for window creation.
This wasn't correct either as the it could temporarily set the
window size before the requested size configuration was received.

Resolve the problem by queuing configuration requests,
handling them then the requested window size is known.

[0]: 1455315111
2024-02-28 16:07:10 +11:00
Campbell Barton cec6d57107 Fix memory leak with Wayland & LIBDECOR
The configuration was cleared before freeing.
2024-02-28 16:05:05 +11:00
Hans Goudey d338261c55 Cleanup: Pass Span by value
Also pass Span instead of `const Array &`
and use parantheses for BLI includes.
2024-02-27 23:09:54 -05:00
Hans Goudey 5c5089d651 Fix: Small changes to USD and Alembic curves import
Make both importers work the same way: first building an array
of the new offsets, then comparing the offsets to check if the
topology changed. Previously the USD importer incorrectly
compared curve offsets to USD point counts.

Also:
- Don't unnecessarily set the resolution to the incorrect default.
  The default for the curves system is 12. But it's unnecessary to
  fill the attribute to the default value anyway.
- Use some helper methods to iterate over all curves.
- Use float literal instead of integer.
- Use cast and `copy_from` for positions copy
- Pass Span by value

Pull Request: https://projects.blender.org/blender/blender/pulls/118829
2024-02-28 05:05:53 +01:00
Hans Goudey 5ed9c8c9dd Cleanup: Standardize CurvesGeometry naming in Alembic and USD
- Curves data-block is called "curves_id"
- CurvesGeometry is called "curves"
2024-02-27 21:32:40 -05:00
Hans Goudey c783b172e5 Cleanup: Else after return 2024-02-27 21:27:44 -05:00
Hans Goudey c409b14797 Cleanup: Resolve missing declaration warning in Alembic mesh reader 2024-02-27 21:27:13 -05:00
Kévin Dietrich ea256346a8 Alembic/USD: Use GeometrySets to import data
This rewrites the Alembic and USD data importers to work with and
output GeometrySets instead of Meshes.

The main motivation for this change is to be able to import properly
point clouds, which are currently imported as Meshes, and curves
data, which suffer from a lot of issues due to limitations of
legacy curves structures (fixed by the new curves data-block) and are
also converted to Meshes. Further, for Curves, it will allow importing
arbitrary attributes.

This patch was primarily meant for Alembic, but changes to USD import
were necessary as they share the same modifier.

For Alembic:
There should be no behavioral changes for Meshes
Curves are imported as the new Curves object type
Points are imported as PointClouds

For USD:
There should be no behavioral changes for Meshes
Curves are imported as the new Curves object type
Note that the current USD importer does not support loading PointClouds,
so this patch does not add support for it.

For both Alembic and USD, knots arrays are not read anymore, as the new
Curves object does not expose the ability to set them. Improvements can
be made in the future if and when example assets are provided.

This fixes at least the following:
#58704: Animated Alembic curves don't update on render
#112308: Curves have offset animations (alembic / USD)
#118261: wrong motion blur from usd in cycles and reverting to the first
frame when disabeling motion blur

Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/115623
2024-02-28 03:02:38 +01:00
Campbell Barton 7db790c4b7 Cleanup: spelling in comments 2024-02-28 12:13:20 +11:00
Campbell Barton a9803765dc Cleanup: remove colon after "return" doxy command 2024-02-28 12:13:17 +11:00
Campbell Barton 976cd8c211 Cleanup: follow RNA naming conventions for boolean types
- Use `use_*_interpolate` matching sequencers use_frame_interpolate.
- Use `use_uniform_scale` matching sequencers use_uniform_scale.
2024-02-28 12:13:15 +11:00
Campbell Barton 59abe4a757 Cleanup: use const for the source argument of IMB_metadata_copy
Also use more meaningful argument names.
2024-02-28 11:02:56 +11:00
Campbell Barton 2e6739967e Cleanup: reduce right-shift in Python scripts
Also place the return type on it's own line as it's easier to identify
when it's in a predictable location instead of the line ending.
2024-02-28 11:02:54 +11:00
Campbell Barton 44e64b8f29 Cleanup: correct type hints for Python scripts 2024-02-28 11:02:53 +11:00
Campbell Barton 79cf4e58e4 Cleanup: type check scripts in tools/triage 2024-02-28 11:02:51 +11:00
Campbell Barton 4f8db2ee67 Cleanup: use static sets for contains checks, remove f-string use 2024-02-28 11:02:49 +11:00
Harley Acheson f04bd961fd UI: Manage Unused Data Operator
An operator that brings up a window with Outliner in "Unused Data" mode
to allow users fine-grained control over protecting and purging.

Pull Request: https://projects.blender.org/blender/blender/pulls/118435
2024-02-27 23:47:40 +01:00
Iliya Katueshenock 6872963e4f Fix #118748: Geometry Nodes: Skip any processing of string attributes
String attributes are not handled correctly (or at all) by geometry nodes
currently because their storage is very inefficient and will likely have to
change in the future anyway. Elsewhere processing string attributes was
explicitly disabled. That was missing in these cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/118802
2024-02-27 23:33:04 +01:00
Hans Goudey 96dc7a48ef Cleanup: Use C++ style cast, use standard variable name 2024-02-27 16:35:30 -05:00
Hans Goudey d6f76c0889 Fix: Add versioning for recently added curves sculpt radius interpolation
- Turn on radius interpolation by default for old files.
- Set the fallback radius to 0.01 for old files.
2024-02-27 16:35:30 -05:00
Iliya Katueshenock 849279b8f1 Cleanup: Collapsible brackets in macros
Fix of collapsible brackets in Notepad++.
2024-02-27 21:51:41 +01:00
Hans Goudey c3f1bacc80 Fix #118798: Weight paint overlay broken
The normal VBO is necessary but not requested after it was split
from the old pos_nor VBO from before bace4c9a29.
2024-02-27 14:42:12 -05:00
Hans Goudey 5e96934ef6 Cleanup: Tweaks in add_curves_on_mesh.cc
- Use standard (copy & pasted) linear interpolation utility
- Use helper variable for attributes
- Make some other names a bit simpler
- Remove unnecessary variable
2024-02-27 14:42:12 -05:00
Jacques Lucke 086b808671 Merge branch 'blender-v4.1-release' 2024-02-27 20:40:29 +01:00
Jacques Lucke f65e6da101 Fix #118073: show exact integer representation in some cases in socket inspection
Without the extra precision, `fmt::format` rounds the resulting float to one with
fewer significant digits. This is generally nice, but not desired in this specific
case for consistency with the value stored in the socket.

Pull Request: https://projects.blender.org/blender/blender/pulls/118797
2024-02-27 20:38:41 +01:00
Jacques Lucke 64febcf155 Fix #116820: make sure that simulation runs when it contains an active viewer
Previously, the viewer node would work, but since the simulation output node
was never evaluated, the new simulation state was never stored. Now make
sure that the simulation output node is executed when there is an active viewer
inside the simulation.

Pull Request: https://projects.blender.org/blender/blender/pulls/118804
2024-02-27 20:37:52 +01:00
Jacques Lucke c96e0a24bf Fix #116598: disable color overlay for rotation values
Currently, we don't support this. Depending on the geometry type, the rotations
are either displayed as black, magenta or there is a crash. Better disable this for
now until we have a proper implementation. It's not quite obvious how rotation
values should be converted to a color, so this also needs some design work.

Pull Request: https://projects.blender.org/blender/blender/pulls/118808
2024-02-27 20:30:01 +01:00
Jacques Lucke 103fda89f4 Fix #116380: disable pinning when switching to tool mode
It might be nice to keep the pinning but that's a bit more tricky technically
currently because the pinned node tree is overridden by the tool node tree.
Just disabling pinning solves the main issue right now which is that the
node editor shows the wrong node tree.

Pull Request: https://projects.blender.org/blender/blender/pulls/118811
2024-02-27 20:25:02 +01:00
Miguel Pozo edbf01d232 Merge branch 'blender-v4.1-release' 2024-02-27 20:23:35 +01:00
Miguel Pozo 71fffa57fd Fix #116232: EEVEE: NaN reflection normals
Same fix as #114960.
2024-02-27 20:22:28 +01:00
Harley Acheson 72be662af4 UI: Change UI Name of Outliner "Orphan Data" mode to "Unused Data"
Change of name and tooltip for Outliner display mode "Orphan Data" to
"Unused Data"

Pull Request: https://projects.blender.org/blender/blender/pulls/118758
2024-02-27 20:21:00 +01:00
Harley Acheson da378e4d30 UI: Changes to Props Dialogs
Improved titles and confirm button text for 15 props dialogs.

Pull Request: https://projects.blender.org/blender/blender/pulls/118640
2024-02-27 20:19:33 +01:00
Sergey Sharybin 05b465f02d Merge branch 'blender-v4.1-release' 2024-02-27 20:02:45 +01:00
Sergey Sharybin 468e4b0e3b Make update: Bring behavior closer to what it used to be
The `make update` will now always update all initialized submodules,
including the library ones.

The `make_update.py --no-libraries` will neither initialize nor update
pre-compiled libraries or tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/118812
2024-02-27 20:02:15 +01:00
Sean Kim b5f76620e4 Fix: Disable symmetrize on invisible objects
This PR disables the `SCULPT_OT_symmetrize` operator on invisible objects

Addresses part of #112371
2024-02-27 19:13:26 +01:00
Miguel Pozo 3560f7ec41 EEVEE-Next: Reduce volume probe blending and remove remapping
See 118342
2024-02-27 18:54:08 +01:00
Jeroen Bakker eb0590dbbe EEVEE-Next: Viewport not redrawn after removing light bake cache
When `Delete Light Bake` operation was executed, the light bake got deleted,
but visible viewports didn't update and required a tweak to be redrawn.
The reason is that it an event was fired, where the viewport didn't listen to.

This PR fixes this by using the `ND_DRAW` event.

Pull Request: https://projects.blender.org/blender/blender/pulls/118803
2024-02-27 18:48:23 +01:00
Jacques Lucke ee179e2749 Fix #116368: missing redraw after baking in geometry nodes
This tag indirectly calls `ED_render_view3d_update` on the main thread,
which will cause the 3D view to redraw without evaluating any objects again.
2024-02-27 18:31:27 +01:00
XDzZyq 999dfce736 Sculpt: Add interpolate radius option for curve radius
Add the option to interpolate the radius from nearby curves and
add a fallback radius for when interpolation is turned off or when
there are no neighbors.

Resolves #117101

Pull Request: https://projects.blender.org/blender/blender/pulls/118339
2024-02-27 18:22:03 +01:00