Commit Graph

107289 Commits

Author SHA1 Message Date
YimingWu
d296c66ab1 GPv3: Show Line Art options in Object > Add menu
The Object > Add > Grease Pencil menu will now show Scene/Collection/Object Line Art
options.

Pull Request: https://projects.blender.org/blender/blender/pulls/118833
2024-02-28 16:20:48 +01:00
Sergey Sharybin
64427b5344 Merge branch 'blender-v4.1-release' 2024-02-28 15:57:10 +01:00
Sergey Sharybin
e3a7d68baf Fix #118034: Cycles: Driven View Layer property not considered in realtime
The issue was caused by Cycles doing dependency tracking on its
side, relying on the fact that view layer needs to be tagged as
modified when its properties change.

This was not the case when custom property on the a view layer is
modified via a driver.

Now the dependency graph will tag IDs which generic properties did
change as ID_RECALC_PARAMETERS, giving it a chance to render engines
to react to it.

Since this is quite generic code which might have unforeseen side
effects the change is not targeted to the current release branch.

Note that this chaneg does not fix the #103140, as the issue there
is use of RNA path to another data-block, without the node tree
registering relation to that data-block.

Also fixes #118117: Compositor does not update image when path is changed via handler

Original Pull Request: https://projects.blender.org/blender/blender/pulls/118134

Pull Request: https://projects.blender.org/blender/blender/pulls/118846
2024-02-28 15:56:31 +01:00
Sergey Sharybin
87a98c361c Fix: Crash when parenting mesh to armature with automatic weights
There probably are more cases where crash will happen as it is
rooting into the issue with BKE_object_workob_calc_parent() which
is used in multiple places.

The issue is caused by the access to a runtime field of workob
outside of the BKE_object_workob_calc_parent(): the runtime field
is stack-allocated in the function, and can not be accessed outside
of the function.

The easiest way to reproduce is to use ASAN, and parent mesh to an
armature with automatic weights. Although, on macOS ASAN did not
report issues, so setting workob->runtime to nullptr at the end of
of the BKE_object_workob_calc_parent() was the easiest.

The solution is simple: make the function to return the matrix,
and take care of the working object inside of it, so all tricky
parts are hidden from the API.

The patch is targeting the main branch, as in 4.1 it is not
required to do such change because all uses of the function only
access object_to_world, which is stored in the object in 4.1.

A double-check in the what_does_obaction() might be needed as it
follows the similar pattern, but it does not seem that runtime
field of the workob is accessed in usages of the what_does_obaction().

Pull Request: https://projects.blender.org/blender/blender/pulls/118847
2024-02-28 15:06:02 +01:00
Sean Kim
329926e7d5 Fix: Disable dyntopo detail flood fill for invisible objects
This PR disables the `SCULPT_OT_detail_flood_fill` operator on invisible objects.

Addresses part of #112371
2024-02-28 14:45:41 +01:00
Sean Kim
89d073dafa Fix: Disable project line gesture on invisible objects
This PR disables the `SCULPT_OT_project_line_gesture` operator on invisible objects.

Addresses part of #112371
2024-02-28 14:44:50 +01:00
Sean Kim
aa75f841bf Fix: Disable set_persistent_base for invisible objects
This PR disables the `SCULPT_OT_set_persistent_base` operator for invisible objects.

Addresses part of #112371
2024-02-28 14:41:47 +01:00
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
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
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
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
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
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
Bastien Montagne
1f9f7a07af Merge branch 'blender-v4.1-release' 2024-02-27 17:43:52 +01:00
Bastien Montagne
40480fe226 Fix #118693: Crash on linking collection, then undoing and re-doing operation.
Do not blindly iterate on a ListBase when you add or remove items
to/from it...

Own mistake in readfile refactor in 06/2023 (ebb5643e59).
2024-02-27 17:28:29 +01:00
Sean Kim
91fd6748ad Fix #111574: Avoid asserts in BMLog with Dyntopo
This PR adds a new method to BMLog to explicitly make the intent of
searching for an entry clear and adjusts the calling code in `pbvh_bmesh`
to utilize it.

Pull Request: https://projects.blender.org/blender/blender/pulls/118543
2024-02-27 17:18:47 +01:00
Bastien Montagne
9fe3de2289 Cleanup: blo_read_file_internal: Use local bool flag instead of bitflag check. 2024-02-27 17:07:36 +01:00
Bastien Montagne
118caa7b45 Blendfile Reading: delay reporting missing linked data after liboverrides resync.
When an asset is heavily modified, all production files having
liboverrides of it will still try to link all their known linked
reference IDs, leading to potentially thousands of not-really-useful
warnings about missing IDs in the console.

Now that liboverrides resync cleans up better these left-over data, it's
better to report missing linked data _after_ the liboverride resync
process.

Note that the original place can still report all effectively missing
linked data if needed, but this is now a logging info, so it won't be
displayed anywhere unless explicitely requested.

Pull Request: https://projects.blender.org/blender/blender/pulls/118577
2024-02-27 16:43:37 +01:00