Commit Graph

102940 Commits

Author SHA1 Message Date
ChengduLittleA
4720fda1a7 Fix #112604: Add "tag" to the tool tip of asset search
Asset search will also filter tags alongside names, this patch makes the
description consistent with what it actually does.

Pull Request: https://projects.blender.org/blender/blender/pulls/112609
2023-09-21 16:00:14 +02:00
Christoph Lendenfeld
057de815ef Fix #97628: Clear and Keep Transformation not working when keyed
When clearing the parent of an object that has keys,
the object position jumped back to world space immediately.
This didn't allow for keying the current position
and was inconsistent with setting a parent.

This PR fixes it by not instantly re-evaluating the animation.

Pull Request: https://projects.blender.org/blender/blender/pulls/112670
2023-09-21 15:43:09 +02:00
Jeroen Bakker
dd3e23e812 Vulkan: Show Missing Implementations
This PR will print a message when a vulkan method isn't implemented.
So we can keep track of what still needs to be implemented.

Pull Request: https://projects.blender.org/blender/blender/pulls/112671
2023-09-21 15:21:32 +02:00
Christoph Lendenfeld
01927e1e45 Anim: Time Offset Slider
This patch has been originally authored by Ares Deveaux #106520
I am just finishing it up.

This is a new operator for the Graph Editor.
It shifts the value of the keys in time,
while keeping the actual key positions in the same place.
It supports wrapping, so when offsetting beyond the range
of the F-Curve it will take values from the other end,
but offset in y-value so there is no jump.

This works best with dense key data.

Co-authored-by: Ares Deveaux <aresdevo@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/110540
2023-09-21 15:11:16 +02:00
Julian Eisel
998e8d0ef6 Asset shelf: Improved region height snapping behavior
Rather than always snapping the region size to the closest multiple of
the row height, remember the amount of rows displayed after the user
resized the region, and try to preserve that. This gives a lot more
predictable behavior, especially when the "Show Names" option is toggled
on and off, and the region resizes in response. With the old method the
amount of visible rows could change multiple times while toggling.

This also enables us to clamp the amount of rows (e.g. while the preview
size is increased and the region becomes too large for the area; or,
when a catalog tab is activated with fewer assets and thus fewer rows)
but still restore the amount of rows the user chose earlier, as soon as
possible.

Part of #107881.

Pull Request: https://projects.blender.org/blender/blender/pulls/112637
2023-09-21 15:08:26 +02:00
Nathan Vegdahl
be5cf8f8a1 Anim: add graph editor key/handles selection operator
This adds an operator `graph.select_key_handles` to the graph editor
that changes the selection of the different parts of a bezier keyframe.  It
operates on all keys that are either themselves selected or have either of
their handles selected, and changes whether the key itself and/or its handles
are selected.

The operator has three options:

- `left_handle_action`
- `right_handle_action`
- `key_action`

Each of which can be set to:

- Select
- Deselect
- Keep (do nothing)

Co-authored-by: cgtinker <Denys.Hsu@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/111143
2023-09-21 15:05:30 +02:00
Julian Eisel
8b610723b6 Fix tooltip showing button label redundantly (regression)
With 9d0907560a, button tooltips would now often display the label even though
it's already visible in the button itself.

This fix brings back the old logic for displaying the label, but it's still
possible to override the label via the callback introduced in the earlier
commit.

Comments are updated/added here to make the behavior more clear.

Pull Request: https://projects.blender.org/blender/blender/pulls/110469
2023-09-21 14:49:53 +02:00
Jacques Lucke
710898a1ec Fix: segfault in geometry nodes with logging
The issue was that the `user_data` pointer in the local user data
is not necessarily valid, because a different user-data might be
passed in when a lazy-function is called a second time (it's semantically
the same user-data but, might have a different pointer).

The solution is to not keep around the dangling pointer but to pass
it in when it is actually needed. I still keep the old constructor of the
local-user-data, because more stuff might be added to it, that needs
the user-data, as was the case in the past already (before 142541c27).
2023-09-21 14:37:29 +02:00
Jeroen Bakker
ecb910a89f Cleanup: Make Format 2023-09-21 13:34:56 +02:00
Jeroen Bakker
6d91d36161 GPU: Remove GPU_shader_storage_buffer_objects_support
Blender 4.0 requires OpenGL 4.3 which always support SSBO's.
Platforms that don't support enough SSBO bind points will be marked
as unsupported.

Users who start Blender on those platforms will be informed via a
dialog. This PR also updates the `--debug-gpu-force-workarounds`
to match our minimum requirements. Note that some bugs are still
there that should be solved in other PRs:

* Workbench only renders the object using a unit matrix this is because
  there is a bug in the workaround for shader_draw_parameters
* Navigating with middle mouse button is not working. Unsure what the
  cause is, but might be a missing feature check in the OpenGL backend.

Related to #112224

Pull Request: https://projects.blender.org/blender/blender/pulls/112572
2023-09-21 12:55:51 +02:00
Christoph Lendenfeld
25031f8a86 Anim: Graph Editor Push/Pull operator
This finishes the work that Ares Deveaux started here #106527

Scales the selected keys from an imaginary line that
runs from the start to the end of the segment.

Co-authored-by: Ares Deveaux <aresdevo@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112388
2023-09-21 12:46:27 +02:00
Pratik Borhade
7e944b1b2c GPv3: Add statistics information
Like legacy Grease pencil, display strokes, points, frames information
for new grease pencil object

Pull Request: https://projects.blender.org/blender/blender/pulls/112573
2023-09-21 12:42:40 +02:00
Campbell Barton
fb5629adb3 Cleanup: reduce right shift in ui_litem_layout_radial 2023-09-21 20:15:09 +10:00
Campbell Barton
0c4932d3d9 Cleanup: avoid shadowing variables 2023-09-21 20:12:28 +10:00
Lukas Tönne
36b90acde1 Node drawing: fix uninitialized node color return value
Bug in #112658.
2023-09-21 12:07:18 +02:00
Lukas Tönne
fdf1040532 Fix #112462: Panel buttons remain active after redrawing
This seems to be an issue deep inside UI drawing code. The nodes render
the panel button in the correct place,
but it doesn't correctly update the button state after a redraw, unless
the mouse is moved. The button is still in a `BUTTON_STATE_HIGHLIGHT`
state after drawing, and a mouse press will trigger it regardless of
where the mouse cursor actually is.

A common hack to force a reset of the button state is to add a fake
mouse move event using `WM_event_add_mousemove`.

Pull Request: https://projects.blender.org/blender/blender/pulls/112503
2023-09-21 12:05:08 +02:00
Sergey Sharybin
12f51bd1c7 Fix crash when toggling link linking state in the list
The lambda passes to UI_but_func_set was capturing `this` of a
temporary object.

Likely caused by adb370e6ba.

Thanks Dalai for spotting the bug!

Pull Request: https://projects.blender.org/blender/blender/pulls/112660
2023-09-21 11:57:22 +02:00
Lukas Tönne
b00c2f9ac4 Fix #112622: draw_color_simple is optional for custom nodes
Use magenta fallback color for sockets without a `draw_color_simple`
callback. This is not ideal, but without a context or node instance
the older `draw_color` callback can't be used.

Pull Request: https://projects.blender.org/blender/blender/pulls/112658
2023-09-21 11:25:55 +02:00
Christoph Lendenfeld
faf8d9d8ba Anim: Multi Editing for FCurve modifiers
This patch adds multi editing support to
FCurve modifiers using the ALT key like in the rest of Blender.
Just like object modifiers they need to be named exactly
the same and be of the same type in order for the multi editing to work.

Pull Request: https://projects.blender.org/blender/blender/pulls/112419
2023-09-21 09:57:17 +02:00
ChengduLittleA
f6082a5042 Cleanup: Use intern/render_types.h for lineart_cpu.c
The `intern/` is needed for it to compile successfully on macos.
2023-09-21 10:08:46 +08:00
Harley Acheson
963c0ed5e7 UI: Custom Tooltips Image Field Correction
Two small corrections when using Image fields in custom tooltips.
Placement was incorrect for non-square images. And a width calculation
was incorrect.

Pull Request: https://projects.blender.org/blender/blender/pulls/112643
2023-09-21 02:11:46 +02:00
Jason Fielder
42ddeeadeb Metal: Add support for storage buffer copy_sub
Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/112638
2023-09-20 23:59:08 +02:00
Harley Acheson
2c6f08ab16 Cleanup: Make format
Formatting changes resulting from Make Format
2023-09-20 11:21:25 -07:00
Harley Acheson
9173c142d6 UI: File Loading Waiting Feedback
When loading a blend file remove any open menus and show a "waiting"
mouse cursor during the process.

Pull Request: https://projects.blender.org/blender/blender/pulls/112636
2023-09-20 20:15:38 +02:00
Julian Eisel
638881ed31 Fix incorrect preview tile button size label height
Mismatch between what drawing assumes and what the function to query the
full preview tile uses. This would cause previews to be scaled down
because the button wasn't tall enough. Only affected the asset shelf and
the asset view template.
2023-09-20 20:09:45 +02:00
Clément Foucault
89da0cf07d EEVEE-Next: Raytrace: Add Diffuse Ray
This implement the diffuse tracing as simple
screen-space ray trace. This is extremely inefficient
and should only be used for reference purpose.

The real screen space diffuse implementation will
be done in another PR.

Depends on #112507

![image](/attachments/a2c0a9d9-3206-4dc7-acf8-0c37851ad10b)

Pull Request: https://projects.blender.org/blender/blender/pulls/112539
2023-09-20 18:36:59 +02:00
Jacques Lucke
2638f30983 Nodes: deduplicate rna definition of zone input nodes 2023-09-20 18:23:40 +02:00
Jacques Lucke
dc91aa6908 Cleanup: remove empty comment section 2023-09-20 18:13:24 +02:00
Jacques Lucke
6d75649076 Fix: assert when inserting simulation or repeat zone 2023-09-20 18:03:48 +02:00
Jacques Lucke
f00c1ab658 Nodes: deduplicate code for pairing zone nodes 2023-09-20 18:03:48 +02:00
Clément Foucault
7c1cb4bd8b EEVEE-Next: Deferred: Add combine pass
This allow to move the light evaluation up in the deferred pipeline and
avoid coupling two different steps into one. This add more flexibility
in the implementation of deferred lighting and indirect lighting
algorithms.

This splits the reflection probe evaluation to its own
shader since it is quite different now.

Pull Request: https://projects.blender.org/blender/blender/pulls/112507
2023-09-20 17:52:55 +02:00
Jacques Lucke
2561d0038d Node: use new zone type to deduplicate code
This was missing from 3eb7e453e4.
2023-09-20 17:21:33 +02:00
Clément Foucault
e2cef1c713 EEVEE-Next: Port SSS profile to Pre-compute shader
This moves the pre-computation offline and store the pre-computed
table in the binary. The pre-computed tables are quite small and are
not a concern with respect to binary size increase.

This rewrites the precomputation to use manually fitted
approximations for both burley and random walk.
The approximations fix a discrepancy between cycles and EEVEE
SSS translucency look. The absolute maximum error is below 2%.
I believe better results could be achieved with automatic fitting
tools.

Note that Cycles Burley translucency profile has some issues as it
does not give a smooth profile. The profile is biased near the end
of the lower radii. For this reason, the fit was done on a white
diffuse with (1,1,1) radii which does not exhibit this artifact.

Note that while this adds the profile for random walk, it isn't
currently used because the profile type is not yet passed down
the deferred path.

The fitting data can be found attached to this PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/112512
2023-09-20 15:17:27 +02:00
Clément Foucault
e743b353cd GPU: Shader Builder: Guard OpenGL builder with flag 2023-09-20 15:05:41 +02:00
Clément Foucault
f079b653c1 EEVEE-Next: Deferred: Add combine pass
This allow to move the light evaluation up in
the deferred pipeline and avoid coupling two
different steps into one. This add more
flexibility in the implementation of
deferred lighting and indirect lighting
algorithms.

This splits the reflection probe evaluation
to its own shader since it is quite different
now.
2023-09-20 15:05:41 +02:00
Jacques Lucke
3eb7e453e4 Nodes: add internal node zone type
The goal is to reduce redundancy by abstracting over the different types of node
tree zones. This makes it easier to add new zone types and makes the intend of
code more clear. For example, now it is more obvious what code deals with zones
in general and what does simulation specific things.

Pull Request: https://projects.blender.org/blender/blender/pulls/112531
2023-09-20 14:40:56 +02:00
Hans Goudey
0fd0539f04 Cleanup: Rename grease pencil function to access layer at index
The plural was confusing when only one layer was returned.
2023-09-20 08:39:30 -04:00
Hans Goudey
774b9607c9 Cleanup: Resolve const correctness in grease pencil API
It was possible to access a mutable drawing from a const GreasePencil
object. This sort of mistake is possible because DNA requires using raw
pointers.
2023-09-20 08:28:08 -04:00
Pratik Borhade
8eb2d193c5 GPv3: Re-evaluate object after deleting keyframes
Missing tag for viewport update when keyframes are deleted

Pull Request: https://projects.blender.org/blender/blender/pulls/112621
2023-09-20 13:43:49 +02:00
Pablo Vazquez
817df98056 UI: Add tooltip to color picker modes
Also no need use title-case in "Gamma Corrected" since it is a
description, not a property label.
2023-09-20 12:39:05 +02:00
Brecht Van Lommel
0706cfeea0 UI: improve vertical spacing in node panels
There was too little in some places, especially at the top of panel headers.

Pull Request: https://projects.blender.org/blender/blender/pulls/112593
2023-09-20 11:56:40 +02:00
Campbell Barton
4f1079c35b Fix error comparing the ID property float sub-type
IDP_FLOAT was compared twice, missing the IDP_DOUBLE check.
2023-09-20 17:56:33 +10:00
Campbell Barton
70dff0670b Fix #112610: Nested pie menu items can't be selected
Regression in [0] caused pie menus that contain layouts with buttons
not to be selectable.

[0]: a8db828618
2023-09-20 17:29:06 +10:00
Campbell Barton
50fa5d348e BLI_string: 2nd attempt to resolve cast error for older versions of GCC 2023-09-20 16:38:56 +10:00
Campbell Barton
3df2856f2d BLI_string: attempt to resolve cast error for older versions of GCC
vdev-doc-api-coordinator gives an error relating to this cast.
2023-09-20 16:03:39 +10:00
Campbell Barton
9ed7d7cb03 UI: add extensions section (shown when extension repos are enabled)
This is a place-holder by default, the work-in-progress extensions
add-on makes use of this.
2023-09-20 15:14:07 +10:00
Campbell Barton
e3b77cf08a ImBuf: calculate the JPEG DPI with double precision
These were calculated as floats then converted to doubles,
loosing precision unnecessarily.
2023-09-20 12:12:49 +10:00
Campbell Barton
bdbf1871ec ImBuf: don't include null bytes for jpeg meta-data markers
JPEG strings aren't null terminated, there is no need to include the
null byte. For reference ImageMagick doesn't do this.
2023-09-20 12:12:40 +10:00
Campbell Barton
a0aed358fa BLI_string: assert the len argument to BLI_strdupn is valid
Ensure the string isn't null terminated before len, if this happens
it's likely an error calculating the length argument. Since the length
is passed to memcpy it could result in reading outside `str` bounds.

There was one case where the string was duplicated then grew by 1 byte
afterwards. Replace this with an allocation since it's an uncommon
operation, not especially useful to support.
2023-09-20 12:11:34 +10:00
Campbell Barton
fb81c37077 Cleanup: avoid redundant strlen calls 2023-09-20 12:11:33 +10:00