Commit Graph

150077 Commits

Author SHA1 Message Date
Omar Emara
c7fdd46e01 Cleanup: Missing BKE compositor include 2024-07-23 14:05:41 +03:00
Weizhen Huang
c816649d85 Cleanup: improve comment regarding Cycles spot light scaling
mentioning increase in noise is a bit misleading because it shouldn't be
noticeable at this scale.
2024-07-23 12:42:30 +02:00
Pratik Borhade
ec220c17f5 GPv3: Rename active_group to active
Follow the changes in 0a64785067
and e373625e73.

Pull Request: https://projects.blender.org/blender/blender/pulls/125297
2024-07-23 12:10:53 +02:00
Jacques Lucke
cb79ef2efc Cleanup: remove unused data member 2024-07-23 11:50:50 +02:00
Jacques Lucke
8755745a84 Cleanup: add missing override keyword 2024-07-23 11:50:50 +02:00
Falk David
1e5df156f7 Fix: GPv3: Uninitialized placement_plane_ in DrawingPlacement
When using the `DrawingPlacementDepth::Stroke` or
`DrawingPlacementDepth::Surface` the placement plane was
not initialized. This leads to wrong projection values for tools
that don't support either of these depth placements.

This fixes the issue by initializing the placement plane in all
cases except for `DrawingPlacementPlane::View` which will
use the view plane.

Pull Request: https://projects.blender.org/blender/blender/pulls/125284
2024-07-23 11:50:07 +02:00
Pratik Borhade
e373625e73 GPv3: Python error after active_layer renaming
Caused by 0a64785067
Remaining instances of `active_layer` wasn't renamed to `active`.

Pull Request: https://projects.blender.org/blender/blender/pulls/125296
2024-07-23 11:47:56 +02:00
Julien Duroure
0c836f7f1a glTF exporter: Fix row active UI and add tooltip 2024-07-23 11:42:19 +02:00
Julien Duroure
3d0db481f4 glTF exporter: avoid crash when animation + full collection hierarchy 2024-07-23 11:05:39 +02:00
Falk David
0a64785067 GPv3: Rename active_layer to active
This is consistent with the naming in GPv2.
It also makes more sense when writing it out
in python: `grease_pencil.layers.active`.
2024-07-23 10:59:53 +02:00
Omar Emara
cf032d6893 Fix #119313: Render layers in startup file are missing
The outputs of the Render Layers node in the compositor in the startup
file are missing. That's because add-ons are disabled when loading the
startup file, so Cycles will not be registered by the time the node tree
of the compositor is loaded, and its passes will not exist.

To fix this, we mark the compositor node tree as needing an update after
loading the startup file.

Pull Request: https://projects.blender.org/blender/blender/pulls/125053
2024-07-23 10:42:17 +02:00
Omar Emara
57ff2969b8 Compositor: Support multi-pass compositing for EEVEE
This patch adds support for multi-pass compositing for EEVEE. This is
done by copying the passes used by the compositor node tree to the DRW
view data, which can then be accessed by the viewport compositor.

The viewport compositor will fallback to the viewport texture or an
invalid output of the passes were not initialized, this is currently the
case for any render engine that is not EEVEE.

A future optimization that we can do is eliminate the film pass copy
shaders and only copy the data that EEVEE rendered, which can be a
subset of the viewport for border rendering. This is not done at the
moment because not all engines support passes at the moment, so the
compositor expects full viewport passes.

Depends on: #123685, #123817, #123815.

Pull Request: https://projects.blender.org/blender/blender/pulls/123378
2024-07-23 10:15:13 +02:00
Jacques Lucke
9ec3e0d681 Spreadsheet: undo accidental icon change
This was changed as part of 4e958617a9.
While we likely want to use a different icon in the future,
it still has to be choosen or designed.
2024-07-23 10:09:10 +02:00
Campbell Barton
1aa37c8df2 Extensions: require 3 numbers for blender_version_{min/max}
When validating the manifest, require 3 numbers to match the official
extensions web-site which expects this.

See #124885.
2024-07-23 17:06:57 +10:00
Sybren A. Stüvel
9155f2336b Anim: rebuild depsgraph relations when creating a new F-Curve
When a new F-Curve is created on a layered Action, tag the dependency
graph for rebuilding its relationships. This is necessary as the F-Curve
may be animating a depsgraph component that was previously not animated,
and thus that relation needs to be constructed.

This was already in place for legacy Actions, and simply overlooked for
the new layered ones.

Pull Request: https://projects.blender.org/blender/blender/pulls/125236
2024-07-23 08:10:19 +02:00
Campbell Barton
bc2e47622f Extensions: minor wording tweak (v -> version)
Consistent with other errors when the versions mismatch.
2024-07-23 15:59:01 +10:00
Campbell Barton
7639ec9dfd Cleanup: remove redundant theme color lookup, avoid shadowing 2024-07-23 15:58:21 +10:00
Campbell Barton
068bb052b2 Cleanup: use const variables in mallocn reporting 2024-07-23 15:58:21 +10:00
Campbell Barton
dc74a98b9e Cleanup: remove unused imports 2024-07-23 15:58:21 +10:00
Campbell Barton
f1febee83f Cleanup: use "num" as a variable suffix 2024-07-23 15:50:05 +10:00
Jesse Yurkovich
c46679c108 Fix #125112: UI notification for exporting all collections is confusing
If a user has multiple collections for which exporters are defined, then
during File->Export All Collections, multiple UI notifications will
occur, one for each collection. This is confusing because these
notifications contain a count of how many files were exported and only
the "last" notification is shown to the user. The others are still
present in the Info editor (and terminal) but users rarely look there.

The fix changes where we post the notification report. We tally up the
number of files and collections we process and only report them as a
final step in the appropriate Operator exec functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/125206
2024-07-23 07:37:13 +02:00
Campbell Barton
38766fd018 Extensions: tweak wording when dropping an unknown extension
When dropping an extension from extensions.blender.org which is
still in the review queue - an error was shown making it seem like
the extension was not compatible with the system.

Adjust wording to clarify that it was not found in the remote repo
which can be caused by it not being part of the repository or when
it's incompatible.

Resolves #125046.
2024-07-23 15:28:48 +10:00
Campbell Barton
f3a0ecb4e2 Fix #124885: unable to use manifest with "X.X" blender version
Allow `blender_version_{min/max}` to contain 1..3 numbers.
2024-07-23 14:30:15 +10:00
Harley Acheson
2c4a611be1 Fix: Incorrect Join/Docking Possible at Min Distance
If you start an action zone drag close to the edge it is possible to
leave the source area yet be under the minimum distance. If you release
at this particular pixel distance it is possible to have an invalid
or unwanted join. This PR just assumes you have dragged enough if you
manage to leave the source area.

Pull Request: https://projects.blender.org/blender/blender/pulls/125266
2024-07-23 02:30:05 +02:00
Pratik Borhade
0fe0c04d2a Fix #125074: MEM_new/MEM_freeN mismatch in selection pick code
This is due to the pointer free mismatch.

Pull Request: https://projects.blender.org/blender/blender/pulls/125163
2024-07-23 00:16:57 +02:00
Omar Emara
9f61ef74e7 EEVEE: Move Cryptomatte normalization to film shader
This patch moves the Cryptomatte weights normalization from The
Cryptomatte sorting shader to the film shader.

This is needed to support multi-pass viewport compositing because up
until now, Cryptomatte passes were only sorted and normalized for final
rendering after all samples were accumulated. So it assumed no further
accumulation of samples would take place. But for compositing, we need
to sort and normalize them for every sample, and applying normalization
multiple times will produce wrong results.

Needed by #123378.

Pull Request: https://projects.blender.org/blender/blender/pulls/123685
2024-07-22 21:14:03 +02:00
Omar Emara
aca7670569 Fix #125069: Texture properties missing
The Texture Properties tab is missing even if it is used in the
compositor. To fix this, we add a texture space user for texture nodes
in the compositor node tree.

Pull Request: https://projects.blender.org/blender/blender/pulls/125081
2024-07-22 20:23:50 +02:00
Jacques Lucke
4e958617a9 Spreadsheet: store original object pointer to access selection
This originally comes from #124186 and is necessary when the spreadsheet
can show data from instances.
2024-07-22 20:13:57 +02:00
Jacques Lucke
b69e6535d0 Spreadsheet: use fallback name when geometry has no name
We had this before, but it was accidentally removed.
2024-07-22 20:10:19 +02:00
Miguel Pozo
6d302ca7ca Fix #125134 #124971: EEVEE: Overlapping samplers in World shader 2024-07-22 18:31:43 +02:00
Jacques Lucke
9974ee71bd Spreadsheet: refactor data set drawing
This separates a single `GeometryDataSetTreeViewItem` into separate tree view
items for the individual parts of the tree view. While requiring a bit more boilerplate
overall, this simplifies the code quite a bit and makes it more extensible.

Pull Request: https://projects.blender.org/blender/blender/pulls/125239
2024-07-22 18:30:00 +02:00
Falk David
fc49a5928b Fix: GPv3: Duplicate previous key using auto key
When erasing, sculpting or tinting, the previous key was not being
duplicated.

The `ed::greasepencil::ensure_active_keyframe` didn't have a good
mechanism to make this work. This adds a parameter to the
`ensure_active_keyframe` function so that the caller can decide
what should be done.

For the sculpting tools, eraser, and tint tool, this will now duplicate
the previous key, when auto-key is on.

Resolves #124082.

Pull Request: https://projects.blender.org/blender/blender/pulls/125224
2024-07-22 18:09:17 +02:00
Falk David
d0ff8d89c9 Fix: GPv3: Use correct temporary eraser size
When holding CTRL using the draw tool to erase, the size of the cursor
was using the size of the eraser brush. This is not the expected behavior
when using the eraser from the draw tool. It should respect the size
of the brush used by the draw tool instead.

This fixes the issue by computing the right size when the eraser operation
is invoked. The size is then stored in a runtime field, so that the cursor
rendering callback can use the cached size.

Pull Request: https://projects.blender.org/blender/blender/pulls/125225
2024-07-22 18:08:51 +02:00
Julian Eisel
a1ac565315 Cleanup: Improve comments for UI related property flags
Previous comments were rather vague and misleading even. For example it
is often expected that `PROP_HIDDEN` would hide properties in the keymap
editor, which it wouldn't. The term "ghost" value was not defined thus
useless as documentation. Explained the behavior instead.

Also the "Inherits #PROP_SKIP_PRESET" note added in 0d7282e69b was
confusing, what does it mean to inherit a property? Clarified that too.

Lastly the API description of `WM_operator_properties_reset()` was not
updated for 1058006e03. Fixed now.
2024-07-22 17:53:25 +02:00
Julian Eisel
f5b46a66d1 Cleanup: Fix typo in comment 2024-07-22 17:49:56 +02:00
Philipp Oeser
b25e67189c Fix #125228: Image Editor Memory leaks showing image tooltip thumbnail
Looks like a simple oversight in 8937c0bcab

To resolve, just free the `ImBuf` (same as done in other places that use
`uiTooltipImage`)

Pull Request: https://projects.blender.org/blender/blender/pulls/125231
2024-07-22 17:37:43 +02:00
Alaska
90e83175eb Fix #125168: Cycles spot light theata_e can flip with a wide spread
When the spread of a spot light is at it's maximum (180 degrees),
then `atan(tan(theta_e))` could become quite unpredictable due to
a asymtote in the tan function when working with lights with this
spread (because theta_e is `spread * 0.5 = pi/2`).
This lead to issues like theta_e for the spotlight becoming negative,
which lead to rendering errors due to a malformed light tree.

This commit fixes this issue by adding a episilon region around the
troublesome values and sets theta_e to `pi/2` when in that region.

Candidate for backporting to 4.2 and potentially 3.6

Pull Request: https://projects.blender.org/blender/blender/pulls/125172
2024-07-22 17:09:43 +02:00
Miguel Pozo
f2c728468c Cleanup: Fix warnings 2024-07-22 16:55:25 +02:00
Sean Kim
07c613b485 Cleanup: Adjust GSpan and GArray asserts
Previously, 4e9e44ad made changes to allow GSpan and GMutableSpan to not
have a type when they are empty. This mirrors the same change in the
conversion from GArray to both span types and when converting to an
actual typed Span<> or MutableSpan<> via typed().

Fixes #125013

Pull Request: https://projects.blender.org/blender/blender/pulls/125018
2024-07-22 16:35:36 +02:00
Falk David
27c877f684 Fix: GPv3: Use of legacy object type in shaderfx_add 2024-07-22 16:29:19 +02:00
Falk David
ead43b6693 Fix: GPv3: Copy ShaderFX/Materials to selected
The operator was checking for the legacy object type.
2024-07-22 16:29:19 +02:00
Sebastian Parborg
b61d308d76 Fix: The position of the redo panel was inconsistent
If the redo panel wasn't initalized from scratch, it would not get the
scrollbar offset. Now always apply this runtime offset.

Pull Request: https://projects.blender.org/blender/blender/pulls/125092
2024-07-22 16:09:44 +02:00
Aras Pranckevicius
527e55239b Fix #125061: VSE timeline pixel rounding/snapping issues at large frames
VSE timeline widget drawing is done in "timeline space" (x: frames,
y: channels), but that can have precision issues at large frames,
when "pixel size features" (outlines, borders) need to get evaluated
inside a shader.

This can lead to inconsistent border sizes between neighboring strips,
e.g. sometimes it would be 2 pixels, but sometiems 3 pixels. I've seen
this mostly happen when frames get into 100'000+ range.

To address this, switch timeline widget drawing to be in window pixel
space. This avoids the issue since coordinates to draw the strip
widgets become "up to several thousand" range, not arbitrarily large.

Pull Request: https://projects.blender.org/blender/blender/pulls/125220
2024-07-22 16:08:07 +02:00
Clément Foucault
dcef32ec9b EEVEE: Fix broken cryptomatte shader compilation
Was caused by a missing resource.
2024-07-22 15:07:18 +02:00
Miguel Pozo
9d797b834e Fix #124876: EEVEE: Missing render frame progress in stdout
Print progression and `Instance::info` to stdout.
Add more context about missing support for canceling renders and progress reports.

Pull Request: https://projects.blender.org/blender/blender/pulls/125094
2024-07-22 13:18:33 +02:00
George Mavroeidis
8fc617d8e2 Cleanup: Animation: Remove pose library UI hint about the new asset shelf UI
Remove the 'Pose Library' panel from the Animation tab, which showed
the UI hint and toggle for the new asset shelf.

Reporting issue: blender/blender#121779

Co-authored-by: George Mavroeidis <gdmavroeidis@hotmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124839
2024-07-22 12:33:28 +02:00
Jacques Lucke
3c81984178 Geometry Nodes: add conversion nodes for Grease Pencil and Curves
This adds two new nodes:
* `Grease Pencil to Curves`: Converts each grease pencil layer into an instance
  that contains curves.
* `Curves to Grease Pencil`: Converts top-level curve instances into grease
  pencil layers.

This opens up many new opportunities:
* Use grease pencil as input to other procedural systems that don't necessarily
  output grease pencil.
* Generate grease pencil from scratch using geometry nodes.
* Temporarily convert grease pencil data to curves to use more powerful features
  for curves processing.

Some data on layers are not attributes yet unfortunately, so there is some
special case handling for the `opacity` attribute. This was previously discussed
at the geometry nodes workshop:
https://devtalk.blender.org/t/2024-05-13-geometry-nodes-workshop-notes/34760#grease-pencil-14

Pull Request: https://projects.blender.org/blender/blender/pulls/124279
2024-07-22 12:29:26 +02:00
Philipp Oeser
d5d64f4a9f Fix #125006: crash confirming specific operator popup dialog with ENTER
Crash was happening in this scenario:
- mouse was over a property in the dialog
- operator had a "check" callback that was accessing certain operator
stuff

In this case, the `UI_BUT_ACTIVE_DEFAULT` button was executed, operator
finished or canceled (but stuff was freed along the way), then code
kicked in to still handle ENTER over the property in the popup (e.g.
toggle a checkbox), the `uiAfterFunc` still had the `popup_op`, tried to
run `popup_check` again with the faulty data.

Simple way to fix this is to use `WM_UI_HANDLER_BREAK` to not handle
further buttons after executing the `UI_BUT_ACTIVE_DEFAULT`

Pull Request: https://projects.blender.org/blender/blender/pulls/125085
2024-07-22 11:43:06 +02:00
Casey Bianco-Davis
73338c1553 GPv3: Render evaluated geometry
This allows Grease Pencil to render all the different curve types.
The PR changes the batch cache creation to use the evaluated points.

Pull Request: https://projects.blender.org/blender/blender/pulls/122985
2024-07-22 11:10:07 +02:00
Bastien Montagne
a0799ac295 I18N: Updated UI translations from git/weblate repository (a2f7105e81bee8). 2024-07-22 10:30:10 +02:00