Commit Graph

120055 Commits

Author SHA1 Message Date
Laurynas Duburas
d4ce2dfe60 Overlay-Next Camera
Overlay-Next version of Camera.

Rel #102179

#109059 was used as a reference.

Pull Request: https://projects.blender.org/blender/blender/pulls/124122
2024-07-30 20:00:30 +02:00
Omar Emara
4d85c03815 Fix #125232: EEVEE writes wrong Cryptomatte meta data
EEVEE writes wrong Cryptomatte meta data layer name. The view layer name
is always prepended to the Cryptomatte layer name, which can cause the
view layer name to be duplicated or the existence of view layer name
where it shouldn't be.

Old: cryptomatte/{hash}/name: string 'ViewLayer.ViewLayer.CryptoObject'
New: cryptomatte/{hash}/name: string 'ViewLayer.CryptoObject'

Pull Request: https://projects.blender.org/blender/blender/pulls/125515
2024-07-30 18:51:20 +02:00
Laurynas Duburas
e356737451 Overlay-Next: Object Bounds
Overlay-Next version of bounds and collisions.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/124654
2024-07-30 18:17:28 +02:00
Lukas Tönne
00335fa46b Fix crash when loading GPv2 file, add back missing modifier info
Loading GPv2 files was crashing after modifiers were removed in #125102.
The modifier type info structs were still used for some internal
purposes (`struct_name`, `free_data`, `foreach_ID_link`), but the info
was not registered any more.

Since we only need a small portion of the typeinfo and because GPv2
modifiers will never change, using simple functions with switch
statements makes more sense here than bringing back fully fledged
typeinfo struct registration.

Pull Request: https://projects.blender.org/blender/blender/pulls/125663
2024-07-30 17:47:39 +02:00
Laurynas Duburas
94ea25ba09 Overlay-Next: Light
Overlay-Next version of light.

Rel #102179

#109059 was used as a reference.

Pull Request: https://projects.blender.org/blender/blender/pulls/123848
2024-07-30 17:37:42 +02:00
Alaska
be50c96c00 Fix #125643: Mismatch between Cycles EEVEE Vector Math Refract
Fixes a mismatch between Cycles and EEVEE when rendering a
Vector Math node in Refract mode with a normal vector of 0,0,0.

This mismatch first appeared after 8650068f0c which changed the
behaviour in Cycles, but not EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/125644
2024-07-30 17:33:39 +02:00
zhanghe9702
23ee950aa4 Fix: Build fails when WITH_DRAW_DEBUG=ON
Regression from #125099.
2024-07-30 15:59:15 +02:00
Julian Eisel
00a8690637 Fix: UI: Python info shown in quick label tooltip for operator buttons
When a button had an operator attached and was using quick label
tooltips, the quick tooltip would include the Python path after the
label. In other cases like toolshelf buttons or buttons representing RNA
properties only the label would be shown, as expected.

Was visible in the tooltips of asset shelf items.

Rather than relying on subtle and rather implicit logic, use explicit
early exiting after the label fields are handled.
2024-07-30 15:40:38 +02:00
Sybren A. Stüvel
69e8e4c023 Refactor: Anim, rename getname_anim_fcurve_bound to ..._for_slot
Rename `getname_anim_fcurve_bound` to `getname_anim_fcurve_for_slot`.

No functional changes.
2024-07-30 15:26:12 +02:00
Guillermo Venegas
95d8b9096a Fix poll functions success on Python error or no return value
Having a default True return value in poll functions makes this
functions to succeed when they encounter errors or do not return any
value.

Ref !125628
2024-07-30 21:36:47 +10:00
Sybren A. Stüvel
6e9731cb47 Anim: implement 'only show selected' filter on slotted Actions
Implement the 'Only Show Selected' filter option of the Dope Sheet for
slotted Actions.

Pull Request: https://projects.blender.org/blender/blender/pulls/125656
2024-07-30 13:07:12 +02:00
Sybren A. Stüvel
c5c5383701 Anim: add RNA path function to AnimData struct
Add an RNA path function to `AnimData`, so that
`repr(some_object.animation_data)` actually shows
`bpy.data["some_object"].animation_data`.

Previously it would only show the path of the owner ID, so
`bpy.data["some_object"]`, which is quite misleading.

Pull Request: https://projects.blender.org/blender/blender/pulls/125655
2024-07-30 13:05:48 +02:00
Sebastian Parborg
a1338312af UI: Add scroll padding for the redo panel in the VSE, action and NLA editors
Without this scroll padding, the end user could not scroll to make the collapsed redo panel not occlude data in these editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/125237
2024-07-30 11:45:16 +02:00
Lukas Tönne
0cf688401b Fix #125607: Double imports due to duplicate IO paths
`paths_from_operator_properties` can return paths for both the explicit
operator `filepath` property as well as the `directory` content.
16129d6a attempted to fix this, but fails because one instance of a path
can be absolute and the other negative.

This patch makes sure to only compare absolute paths. Comparison uses
a separate list so that the final output can still mix absolute and
relative paths, but should only include each path once.

Pull Request: https://projects.blender.org/blender/blender/pulls/125608
2024-07-30 11:18:01 +02:00
Julian Eisel
7fcd4e2429 Fix #123327: Crash when operator with properties opens render window
Essentially, the issue is that the Adjust Last Operation popup is
created in the new image editor window, before region polling was
executed for the new window. This region polling must be done first
because it can affect which regions are visible, and the
`ARegionType.on_poll_success()` callback may do additional set up.

Now make sure that region polling is always executed when a screen is
prepared for display, as part of the screen "refresh" code.

Note that the region polling is used for the asset shelf regions, which
are supported in the image editor since c60a1006e5.

Pull Request: https://projects.blender.org/blender/blender/pulls/123385
2024-07-30 11:17:12 +02:00
Falk David
ca0d7d3afc Fix: Curves: Crash in resize_curves
Introduced with 6fac4707d5.

The condition that checks if all the curves are resized is flipped.
Fix swaps the code in the `if` and the `else`.
2024-07-30 10:55:19 +02:00
Bastien Montagne
fc8341538a Fix #125636: Active camera not always valid after undo/redo.
There was already code to handle active scene pointer for the window.
Simply replace it by a call to `wm_data_consistency_ensure`, which will
ensure that all potentially missing pointers in UI data get reset.
2024-07-30 10:30:18 +02:00
Falk David
3a43493d85 Curves: Smooth bézier positions function
This adds a `geometry::smooth_curve_positions` function that
smoothes both bézier curves and all the other curve types.

Bézier curves are smoothed by joining the handle and control
points into a flat array, then using the 1D gaussian algorithm
and writing the resulting positions back into the left and right
handle positions as well as the control points. In general,
this works reasonably well and is similar to the results of the
other curve types.

Pull Request: https://projects.blender.org/blender/blender/pulls/125496
2024-07-30 10:25:19 +02:00
Hans Goudey
edf298b505 Cleanup: Formatting 2024-07-29 23:10:49 -04:00
Campbell Barton
99af19932e Cleanup: spelling in comments 2024-07-30 12:38:16 +10:00
Campbell Barton
d8c2301ee8 Cleanup: use const arguments 2024-07-30 12:23:09 +10:00
Campbell Barton
4dfd8e33e0 Cleanup: avoid variable shadowing 2024-07-30 12:23:07 +10:00
Campbell Barton
1d0d8cdab5 Unbreak building WITH_USD 2024-07-30 12:20:26 +10:00
Sean Kim
89a0bbe72f Cleanup: Remove usage of SculptSession for totvert access
Pull Request: https://projects.blender.org/blender/blender/pulls/125634
2024-07-30 03:09:01 +02:00
Hans Goudey
131d641816 Cleanup: Sculpt: Reuse code for enhance details filter initialization 2024-07-29 20:32:54 -04:00
Hans Goudey
eb10eefdcd Cleanup: Remove unused status bar string creation
Unused after 1076564070.
2024-07-29 20:32:54 -04:00
Jesse Yurkovich
67186ae8ac Fix: Error in builds without OCIO
The methods on the `OCIOColorSpaceConversionShader` expect
`shader_creator_` to be valid so, in case of a build without OCIO
support, ensure we have a valid GPUShaderCreator available.

In this case we use the "stub" implementation.

Pull Request: https://projects.blender.org/blender/blender/pulls/125631
2024-07-30 02:20:27 +02:00
Jesse Yurkovich
f638aca941 Cleanup: remove unused variable 2024-07-30 02:15:53 +02:00
Sean Kim
ed274e7a76 Fix #125621: Grow Face Set applies default value to entire empty mesh
This commit prevents the Grow Face Set and Shrink Face Set operations
from happening on a mesh without the face set attribute. In particular,
this prevents the entire mesh from getting a value of 0 for the face set
attribute if it is missing the '.sculpt_face_set' attribute entirely.

Pull Request: https://projects.blender.org/blender/blender/pulls/125632
2024-07-30 02:14:05 +02:00
Sean Kim
0c09d38774 Cleanup: Remove forward declarations in sculpt_boundary.cc
Pull Request: https://projects.blender.org/blender/blender/pulls/125630
2024-07-30 01:17:24 +02:00
Sean Kim
99c55bdbfb Sculpt: Partial refactor of boundary brush
Part of #118145

This commit tackles splitting up the cached, per element data that is
calculated prior to the first stroke of the boundary brush occuring. The
main entry point is the `data_init` function which handles the following
rough steps:

* Find the closest boundary vert to the current position.
* Check to see if the selected boundary is valid.
* Find all boundary vertices to affect with this task.
* For all vertices near each of the boundary vertices, populate various
  information to be used when actually performing the deformation into
  an array that is sized to the total number of elements in the backing
  data structure.

The result at the end of this is the `SculptBoundary` struct which has
remained unchanged and is populated for each of the symmetry passes.
Because the current algorithm is single threaded, this commit opts to
avoid making any major changes to this structure, as improving this
performance will likely require reevaluating the problem from the base
needs of this brush.

For each of the preceding four rough areas of computation, the methods
have been split into separate implementations per PBVH type to remove
most usage of `SculptSession` and `PBVHVertRef`.

Additionally, the method which is used to display the targeted boundary
and the pivot data has been updated as well to use this same code path.

Pull Request: https://projects.blender.org/blender/blender/pulls/125525
2024-07-30 00:05:14 +02:00
Leon Schittek
d30d8b4bfa UI: Add padding to items in ui lists and tree views
Add a utility function to add horizontal padding to the left and right
of items in UI lists and tree views to make them more consistent with
other buttons like menu entries.

Pull Request: https://projects.blender.org/blender/blender/pulls/125498
2024-07-29 23:52:38 +02:00
Hans Goudey
6d992ff071 Cleanup: Formatting 2024-07-29 17:48:11 -04:00
Hans Goudey
cbd1ac553d Sculpt: Refactor for enhance details mesh filter preprocess
Part of #118145.
The previously-single-threaded code is now parallelized.
2024-07-29 17:46:59 -04:00
Andrew Wason
42234e5a8e Fix #125194: Sequence.frame_duration returns incorrect value
`Sequence.frame_duration` returned number of frames in movie, but did
not consider "playback rate" factor (adapting to scene framerate), nor
user level retiming.

Pull Request: https://projects.blender.org/blender/blender/pulls/125243
2024-07-29 22:45:52 +02:00
Jesse Yurkovich
4b6ed00b3e Cleanup: Don't depend on ordering when setting USDExportParams
Access each parameter by name instead of depending on ordering.

Also reorder the parameters to better indicate their groupings, making
things a bit easier to see at a glance what is possible to be set.

Pull Request: https://projects.blender.org/blender/blender/pulls/125620
2024-07-29 22:38:40 +02:00
Bastien Montagne
11bdd3da5a Blendfile: Do not write 'DrawData'.
This list is already cleared on read, better to also write nullptr for
it then (reduces the risks of fake-changes detection in undo code
mainly).
2024-07-29 21:26:43 +02:00
Jacques Lucke
071b18a3cc Spreadsheet: support navigating instance trees
Previously, it was not possible to see detailed information about instances in
the spreadsheet. Only the attributes on the top level instances were shown. Now,
all nested instances can be inspected too.

Combined with #114910 this will make inspecting more complex geometry with the
spreadsheet much more feasible. It's also an important part of integrating
grease pencil into geometry nodes because it makes it more obvious how layers
are converted to curve instances.

The data-selection is split into two separate tree views now. One that selects
the geometry from the instance tree, and one that's used to select the geometry
component and domain within that geometry. We found that this works better than
combining both tree views into one (we tried that in #124186).

Pull Request: https://projects.blender.org/blender/blender/pulls/125293
2024-07-29 20:42:08 +02:00
Jacques Lucke
ae129da4f7 UI: new Geometry Set icon
This icon can be used when refering to a "geometry set" which can contain
potentially multiple geometries of different types (such as mesh, volume, etc.).

It was designed by Simon Thommes as part of #125293.
2024-07-29 20:37:21 +02:00
John Kiril Swenson
2314f59417 Refactor: Cleanup VSE retiming selection code
Retiming selection was way more complicated than it needed to be, with
lots of duplicate code between `sequencer_select_exec` and
`sequencer_retiming_key_select_exec` and logic scattered all over the
place.

This patch standardizes retiming selection so that all of its logic is
performed first. If it turns out that the cursor is not able to select
any keys, it continues with strip selection. This decreases linecount
and makes everything clearer.

There should be no regressions user-side, but this patch does fix a
couple bugs and makes retiming selection more robust:
- Prior to this patch, if no retiming keys were selected, attempting to
  toggle any key with the tweak tool would select and deselect the key
  immediately.
- Prior to this patch, retiming keys would still show if overlays were
  turned off, but "retiming display" was turned on.

This patch also renames/changes some functions to make them clearer:
- `retiming_keys_are_visible` -> `retiming_keys_can_be_displayed`, since
  having retiming keys on in the overlays does not guarantee that they
  are visible in any strips currently. Note that I've altered this
  function slightly too, this fixes the second bug mentioned above.
- `try_to_realize_virtual_keys` -> `try_to_realize_fake_keys`, to make
  naming more consistent with existing functions.
- Fix typo in `retiming_mousover_key_get`
- Remove `use_retiming_mode` helper function since new code doesn't need
  it -- was confusingly named anyways
- Add `key` and `key_owner` arguments to
  `sequencer_retiming_key_select_exec` and
  `sequencer_retiming_select_linked_time` to avoid having to recalculate
  the key at cursor position over and over again

Pull Request: https://projects.blender.org/blender/blender/pulls/125468
2024-07-29 20:25:26 +02:00
Hans Goudey
570ac3ebaa Fix: Build error in lite build without OCIO 2024-07-29 14:16:01 -04:00
Hans Goudey
c118d0fa2f Refactor: Sculpt: Use mask update abstraction in expand tool 2024-07-29 14:15:04 -04:00
Charles Wardlaw
8a97f31e76 USD: Use Asset Resolver to resolve texture paths
This patch uses the USD AssetResolver to deal with texture paths.
Functionally, adding this patch should make no functional differences in
the way textures are written.

If textures are specified as assets instead of file paths, at current
the file will error on load and the textures will not be assigned. These
should now be processed correctly.

See PR for example file and testing scenarios.

Co-authored-by: kiki <charles@skeletalstudios.com>
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Co-authored-by: Charles Wardlaw <cwardlaw@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/122747
2024-07-29 20:00:48 +02:00
Hans Goudey
8ea4d7ed89 Refactor: Sculpt: Split read/write of color attribute to separate loops
This makes things easier to optimize in the future and makes the code
easier to reuse, for example with colors stored on other domains.
2024-07-29 13:18:38 -04:00
Hans Goudey
de60594cfc Refactor: Sculpt: Avoid double auto mask calculation for paint brush 2024-07-29 13:18:38 -04:00
Jesse Yurkovich
69154a5e3b Fix #125402: Guard against missing OCIO data for realtime compositor
The newly added viewport compositor was missing a try-catch guard around
the OCIO `getProcessor` call. All prior call sites were protected except
this one.  Unhandled exceptions can occur if the user tries to use a
colorspace config that is not present in their OCIO configuration.

The surrounding code paths need some work in order to not crash at a
later point, which would also impact builds with no OCIO support at all.
In the case of no OCIO support at all, a warning label is placed on the
node as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/125526
2024-07-29 18:37:23 +02:00
Bastien Montagne
97982360de Refactor: DNA: Add util to access size of a truct.
Avoids reafile code having to access 'internals' specifics of DNA data.
2024-07-29 17:31:42 +02:00
Bastien Montagne
bae9a93d62 Cleanup: Readfile: Remove old disabled debug code for memory leaks tracking.
This was not working at all with ASAN builds, and has been superseded by the
new system introduced in recent commits 63016ad965 and add9553ad1.
2024-07-29 17:31:42 +02:00
Weizhen Huang
29fdddb0e9 Fix: Cycles camera keeps updating due to NaN in central cylindrical camera
`NaN != NaN` causes the camera to be tagged as needs update. To fix,
initialize radius to 1 and add hard limit.
2024-07-29 17:05:25 +02:00
Hans Goudey
a26819ad88 Fix #125400: Copy modifier to selected ignores modifier pinning
If we encounter this problem again it's probably worth extracting this
modifier addition to a helper function.
2024-07-29 10:19:18 -04:00