Commit Graph

132428 Commits

Author SHA1 Message Date
Jacques Lucke
39ec00f985 Cleanup: improve method name 2024-02-02 17:03:14 +01:00
Jacques Lucke
da540a73de Geometry Nodes: split sharing utility for reading and writing
This makes it more obvious that the sharing information is actually
completely independent for reading and writing currently.
2024-02-02 17:01:20 +01:00
Brecht Van Lommel
deb4273565 Build: Bump OpenColorIO to 2.3.2
To fix issues with detection of AVX instruction support.

Ref #113157, #117435
2024-02-02 16:37:30 +01:00
Aras Pranckevicius
0bfffdaf82 VSE: bilinear upscaling no longer adds transparent border around the image
Part of overall "improve image filtering situation" (#116980), this PR addresses
two issues:
- Bilinear (default) image filtering makes half a source pixel wide transparent
  border around the image. This is very noticeable when scaling images/movies up
  in VSE. However, when there is no scaling up but you have slightly rotated
  image, this creates a "somewhat nice" anti-aliasing around the edge.
- The other filtering kinds (e.g. cubic) do not have this behavior. So they do
  not create unexpected transparency when scaling up (yay), however for slightly
  rotated images the edge is "jagged" (oh no).

More detail and images in PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/117717
2024-02-02 16:28:51 +01:00
Brecht Van Lommel
43bcd48ea6 Cleanup: make format 2024-02-02 16:11:40 +01:00
Clément Foucault
046f2ac206 Cleanup: EEVEE-Next: Shadow: Wrap loop condition in function 2024-02-02 15:38:48 +01:00
Clément Foucault
a682d12015 Fix: EEVEE-Next: Wrong lightcache bake command 2024-02-02 15:14:41 +01:00
Clément Foucault
18a04965fd Fix: EEVEE-Next: Artifacts with volume + motion blur
The root cause is still unknown. But replacing the
use of the depth texture by the hiz buffer fixes the
issue.

The issue was apparent on Linux + Mesa + AMD.
2024-02-02 15:14:41 +01:00
Sean Kim
c15d1b8ccb UI: Add visual indicator for automasking state
This adds a visual toggle for sculpt automasking in both regular and Grease Pencil modes.

If no automasking settings are used, use the icon `CLIPUV_DEHLT`, otherwise it is CLIPUV_HLT.
As it was agreed on in #117467

Addresses #102585

Pull Request: https://projects.blender.org/blender/blender/pulls/117649
2024-02-02 14:34:43 +01:00
Pratik Borhade
561363dbed GPv3: Dopesheet UI template
Includes add/remove layer, move up/down layer operators in dopesheet UI.

Part of #110056

Pull Request: https://projects.blender.org/blender/blender/pulls/117628
2024-02-02 13:11:55 +01:00
Sybren A. Stüvel
660867fa00 Anim: bone collections, store expanded/collapsed state in DNA
Store the 'expanded/collapsed' state of the bone collection tree view in
the DNA data of the bone collections themselves. This way the tree state
is restored when loading the file.

This commit also adds some code to the abstract tree view classes, for
supporting synchronisation of the extended/collapsed state between it
and external data. It follows the same approach as the handling of the
active element.

RNA wrappers have been added to make it possible for Python code to
expand/collapse parts of the tree.

Library overrides are supported for this property, so the
expanded/collapsed state of linked armatures can be locally saved. If
there is no override, the `is_expanded` property is still editable;
changes will not be saved to file in that case, though.

Pull Request: https://projects.blender.org/blender/blender/pulls/116940
2024-02-02 12:28:22 +01:00
Sergey Sharybin
e2b9ebd23c Cleanup: Remove unused capture
Pull Request: https://projects.blender.org/blender/blender/pulls/117750
2024-02-02 12:18:32 +01:00
Omar Emara
ce2a945dff Cleanup: Correctly name bokeh blur shaders
The bokeh blur shaders are incorrectly named as standard blur shaders,
while this isn't the case. Rename them to include the bokeh keyword.
2024-02-02 13:15:59 +02:00
Sybren A. Stüvel
f208a3719a Cleanup: document CTX_wm_operator_poll_msg_set
The function name "operator poll message set" is rather troublesome, as:

- the message is only used when the operator is disabled, and
- the message is shown if the operator is disabled by any means, and not
  just limited to the `poll()` function returning `false`.

A better name would be `CTX_wm_operator_disabled_msg_set`, but refactoring
that is for another time. Now at least the behaviour is documented.

No functional changes.
2024-02-02 12:04:37 +01:00
Philipp Oeser
79a7bdf33e Cleanup: remove empty statements 2024-02-02 11:57:51 +01:00
Dalai Felinto
fa5f1b3a9c Fix building errors 2024-02-02 11:24:08 +01:00
Campbell Barton
adb304f0ed Extensions: improve UI for adding/removing repositories
- Adding new repositories now differentiates between "Online" & "Local"
  where adding a local repository doesn't prompt for a URL.
- Support removing repositories and their files (uses confirmation
  defaulting to "Cancel" to avoid accidents).
- Show an error icon next to repositories that have invalid settings,
  these repositories are now ignored until the settings are corrected,
  required fields are highlighted red when they're unset & required.
- Rename "directory" to "custom_directory" since an automatic path is
  used when not set - created in the users scripts directory.
- Use toggles for custom-directory & remote URL instead of relying on
  the value to be left an empty string for alternative behavior.
2024-02-02 20:46:45 +11:00
Jacques Lucke
7d3003be4d Geometry Nodes: store bake item names on disk
Bake items are generally identified by their (generated) identifier.
This allows changing the name and reordering sockets without breaking
baked data.

In the future we want to have some kind of Import Bake node that
ideally automatically creates its output sockets and names them correctly.
For that to work, the baked data has to contain the user-defined names
for each socket. Those names are not used yet.
2024-02-02 10:02:25 +01:00
Harley Acheson
31df006b39 UI: Two Misc Prop Dialog Title Changes
IMAGE_OT_new getting a title of "Create a New Image" and confirm button
text of "New Image". TEXT_OT_jump gets a title of "Jump to Line Number"

Pull Request: https://projects.blender.org/blender/blender/pulls/117744
2024-02-02 03:43:21 +01:00
Campbell Barton
8b827a5bb5 Cleanup: spelling in comments 2024-02-02 10:48:22 +11:00
Campbell Barton
e72c9397f5 Cleanup: various non-functional changes for C++ 2024-02-02 10:43:18 +11:00
Campbell Barton
c4a2858975 Cleanup: strip trailing space 2024-02-02 10:43:17 +11:00
Harley Acheson
23faaac68b UI: Gizmo Button for Lock Camera to View
3DView 2D gizmo navigation button to toggle "Lock Camera to View".

Pull Request: https://projects.blender.org/blender/blender/pulls/111076
2024-02-01 21:47:50 +01:00
Brecht Van Lommel
c04a79622c Cleanup: make format 2024-02-01 21:33:05 +01:00
Brecht Van Lommel
1f142b3d44 Fix: Cycles MIS disabled unnecessarily with transparency, causing fireflies
This is a leftover from when there was a global option for transparent
shadows, but since it's now per material this makes no sense anymore.

Solution found by Olivier Maury.

Pull Request: https://projects.blender.org/blender/blender/pulls/117735
2024-02-01 21:23:28 +01:00
Sean Kim
f3c401ef6f UI: Update default mask icon
Based on the design of #102585, This PR replaces the MOD_MASK icon with
the CLIP_UVDEHLT icon to better communicate the intent of masking across
many areas of Blender. It also changes the Grease Pencil `invert` icons
to avoid conflicts with the CLIPUV_DEHLT & CLIPUV_HLT.

Pull Request: https://projects.blender.org/blender/blender/pulls/117467
2024-02-01 20:56:18 +01:00
Hans Goudey
266230dd88 Refactor: UI: Pass StringRef to more button definition functions
Similar to 9c3aa8b824. This time there is one null argument
that has to be changed. It was simple to just move the logic to that one
caller.
2024-02-01 14:40:40 -05:00
Hans Goudey
70832a8726 Fix: Missing translation in 3D view vertex group panel 2024-02-01 14:40:40 -05:00
Brecht Van Lommel
abf4c4d9ef Refactor: Change functions to retrieve GPU textures from images
* For materials with UDIM tiles support, get array and mapping in one call
* For viewers that can use render results, add a dedicated function
* Fix potential use of render results in stencil overlay and grease pencil

Pull Request: https://projects.blender.org/blender/blender/pulls/117563
2024-02-01 20:32:24 +01:00
Harley Acheson
e6acd167e9 UI: Spreadsheet Icons for Face Corner and Pointcloud Point
Spreadsheet Editor is currently using placeholder icons for face corner
and pointcloud points. This PR changes these to new versions.

Pull Request: https://projects.blender.org/blender/blender/pulls/117737
2024-02-01 20:22:03 +01:00
Harley Acheson
d7593c8845 UI: Multiple Interface Icon Additions and Changes
Additional icons for face corner, pointcloud points needed for general
usage. Unselected camera, view locked, and view unlocked for #111076.
Changes to mod_mask for #117467. pointcloud_data changed only for
alignment change. Running Update Icons also changed mod_explode.

Pull Request: https://projects.blender.org/blender/blender/pulls/117732
2024-02-01 20:08:26 +01:00
Hans Goudey
5155feeeb8 Cleanup: UI: Remove a1 and a2 unused arguments from uiDefButF function
These were removed in previous commits like e6f0b60c2e.
2024-02-01 13:09:09 -05:00
Hans Goudey
1a0214471b Fix: Missing translation for asset catalog tooltip
Also remove an unnecessary c_str() call.
2024-02-01 13:09:04 -05:00
Hans Goudey
809499a3d0 Refactor: UI: Use derived struct for number slider buttons
Similar to d204830107. This is the last real use of
the a1 and a2 arguments for many button definition functions.
2024-02-01 13:08:50 -05:00
Eugene Kuznetsov
4024614ecc Fix: correctly set active/render UV maps when realizing instances
As currently implemented, Blender sometimes incorrectly sets active/render
UV maps during the "realize instances" operation. This also comes into play
if you try to modify the mesh with geonodes: e.g., if you use geonodes to
split a mesh into two pieces, transform one of them, and then "join geometry",
join operation internally performs "realize instances", triggering the same bug.

The root cause is that "realize instances" copies both UV map layers and the
active/render layer index, but it reorders layers during this process, so the index
that was correct in the original mesh is now wrong in the modified mesh.

This patch corrects indexes by explicitly checking layer names.

Pull Request: https://projects.blender.org/blender/blender/pulls/116452
2024-02-01 19:07:43 +01:00
Philipp Oeser
3d60209d3d Add an optional "frame" & "tile_index" argument to Image.scale()
`BKE_image_scale` -- which is only used for the python API -- was
getting the `ImBuf` without providing an `ImageUser`.
This is fine, but always gets the first tile (and the current frame for sequences).

To resolve this, add an optional "frame" & "tile_index" argument so these can be specified explicitly (similar to layer_index and pass_index already used for some other API functions).

Fixes #117539 : Scaling UDIM images via Image.scale() only scales one tile

Pull Request: https://projects.blender.org/blender/blender/pulls/117549
2024-02-01 17:28:38 +01:00
Miguel Pozo
5d132ac0c6 GPU: Optimize OpenGL indirect drawing overhead
`GLBatch::draw_indirect` has additional overhead compared to
`GLBatch::draw`, and can become a bottleneck in scenes that require
many draw calls (ie. with too many unique meshes).

The performance difference is almost exclusively caused by the
`GL_COMMAND_BARRIER_BIT` barrier that happens on every call.

This PR adds a `GPU_storagebuf_sync_as_indirect_buffer` function that
can be used to place the barrier only once after filling the indirect
buffer content.
This function is a no-op in Vulkan and Metal since they don't need the
barrier.

Pull Request: https://projects.blender.org/blender/blender/pulls/117561
2024-02-01 17:26:08 +01:00
Jun Mizutani
8ecc654788 UI: Preferences: Sort widget label style settings
Sort Text Style settings hierarchically:

1. Panel Title
2. Widget Label
3. Widget

Pull Request: https://projects.blender.org/blender/blender/pulls/113990
2024-02-01 17:25:28 +01:00
Ray Molenkamp
cf4365e555 CMake: Disable unity builds on cmake 2.28.2
CMake 2.28.2 has a regression that breaks the combination of
precompiled headers and unity builds [1]. Disable unity builds
for this specific cmake version to sidestep the issue.

[1] https://gitlab.kitware.com/cmake/cmake/-/issues/25650
2024-02-01 09:09:20 -07:00
Hans Goudey
dccf0e8699 Cleanup: Move GPU_material.h to C++ 2024-02-01 10:40:30 -05:00
Aras Pranckevicius
691512b9ce Fix: build failure with WITH_UNITY_BUILD=OFF
Started with 1b6e3d46a
2024-02-01 17:33:28 +02:00
Falk David
898ff6ceee Revert "GPv3: Array modifier"
This reverts commit e1ce3c3cc7.
2024-02-01 16:18:13 +01:00
Christoph Lendenfeld
b2aa36485b Fix: Regression of Python API for anim.keyframe_insert
Caused by #113504

The `type` property has been removed from the operator,
but of course that is a breaking change in 4.1.
(e.g. reported here: #117547)

At the time of making the patch,
I wasn't sure how to handle all cases but it turns out its not complicated.
I've added back the property with the following logic.

* Try to get the `KeyingSet` from the `type`.

* `type` defaults to 0 which means the `ANIM_keyingset_get_from_enum_type`
will get it from the scene.

* If the scene doesn't have one, or a valid index isn't passed in the `KeyingSet`
will be a `nullptr` in which case it inserts from the user preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/117718
2024-02-01 16:14:05 +01:00
Jeroen Bakker
24bc2fef1d GPU: Disable Unsupported OpenGL test cases.
Some test cases are not support when used with the OpenGL backend. These
test cases are easier to support when using Vulkan as we do control the
GPU->CPU data conversion logic.

We remove the test cases that aren't working yet for any backend and
skip test cases where OpenGL support is failing.
2024-02-01 16:13:18 +01:00
YimingWu
e1ce3c3cc7 GPv3: Array modifier
Grease Pencil Array modifier migrated to GPv3.

All features now working as expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/117722
2024-02-01 15:58:53 +01:00
Ashley Ruglys
fcd10ee33a USD: PointInstancer import support
Added support for static point instancing import.

Added a new USDPointInstancerReader class to import UsdGeomPointInstancer
primitives as Point Clouds with geometry node modifiers that use
Instance on Points geometry nodes to instance collections containing
prototype geometry.

Added logic to the USDStageReader class to traverse the USD stage to
create readers for point instancer prototypes.

Extended USDStageReader::collect_readers() to take arguments to include
undefined prims and to exclude a set of specified prims when traversing
the stage.  Allowing traversing undefined prims is necessary because
prototype prims may be specified as "overs" in the USD stage.

Added a USDPrimReader::is_in_instancer_proto_ boolean flag which
identifies readers of prims that are in point instancer prototypes.
The flag simplifies management of collections and is used to
determine whether global transforms should be applied to root objects.

Limitation: point cloud animation is not yet supported.

This partially addresses https://projects.blender.org/blender/blender/issues/96747.

Co-authored-by: Michael Kowalski <makowalski@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113107
2024-02-01 15:37:43 +01:00
Jacques Lucke
153caeff4d Geometry Nodes: simplify default label in zone nodes
This removes the "Input" and "Output" part of the default label in the
simulation and repeat zone. The outline already makes it very obvious
which one is the input and which one the output. Simplifying the label
makes the zone look prettier. It might also simplify naming other zones
(like for-each zone) in the future, because the name is shorter.

Pull Request: https://projects.blender.org/blender/blender/pulls/117724
2024-02-01 15:20:05 +01:00
Sybren A. Stüvel
fd7fcb2cdc Fix #117720: Crash when selecting these two armatures
Properly wrap a returned `char *` that could be `nullptr` into an
`std::optional<std::string>`. `std::string` doesn't like `nullptr`.

Another problem was that the wrapped `char *` was actually allocated on
the heap, and not freed after conversion to a `std::string`, causing
memory leaks.
2024-02-01 14:53:35 +01:00
Sybren A. Stüvel
dc40d7b5d7 Cleanup: RNA, do early return in RNA_path_from_struct_to_idproperty
Having an early return makes the precondition check an actual precondition
check. This will make an upcoming change easier to implement.

No functional changes.
2024-02-01 14:49:08 +01:00
Sybren A. Stüvel
35317749e0 Depsgraph: add explanation to evaluated_get RNA function
Extend the `ID.evaluated_get()` docstring to explain that it does not
trigger a re-evaluation of the data-block.

No functional changes, just expansion of documentation.
2024-02-01 14:49:08 +01:00