Commit Graph

103465 Commits

Author SHA1 Message Date
Philipp Oeser
dcdafaa9f5 Fix #114082: Disabling Geometry Nodes is_tool also disables is_modifier
fd9d22ba57 introduced `GeometryNodeAssetTraitFlag` (at that time
`GEO_NODE_ASSET_POINT_CLOUD` was the max enum value), then 6da4b87661
added `GEO_NODE_ASSET_MODIFIER` (but the max enum value was not changed
accordingly).

Pull Request: https://projects.blender.org/blender/blender/pulls/114092
2023-10-24 10:40:28 +02:00
Jesse Yurkovich
10eb1ac8e4 Fix #111442: Correctly handle 1-channel image formats during save
It's possible to encounter a true 1-channel image if it's coming
directly from, say, a float-value AOV or similar.

This was not accounted for and would cause issues when saving the image
out to a 3 or 4 channel format (wrong values) or when saving out to
another 1 channel format (unnecessary usage of luminance weight values).

Pull Request: https://projects.blender.org/blender/blender/pulls/111577
2023-10-24 06:50:13 +02:00
Richard Antalik
dadbb5c5f7 Fix VSE retiming last key position incorrect
Last key is drawn on the right edge of the strip, but that is end of
the frame, which it should be bound to. Because of this, drawing code
and operators must consider, that this key is always displaced.

This was not done in 86a0d0015a and caused issues like #113755 that was
fixed incorrectly.
2023-10-24 04:57:00 +02:00
Richard Antalik
79b1eacba9 Fix #113890: Buffer overread when rendering after strip content range
Caused by incorrect frame index clamping in `SEQ_give_frame_index()`.
2023-10-24 04:37:34 +02:00
Jacques Lucke
312d8b1d66 Fix #114041: freeze connecting capture attribute to repeat output node
The issue was that a node was supposed to propagate an anonymous
attribute that is only created further to the right in the tree. This does not
during inferencing, where uses of fields can only come to the right of its
creation. Note, all fields coming out of the repeat input/output node are
new field sources during inferencing.

Now, only field sources that are passed from the outside into the repeat zone
can be propagated from the repeat output to the repeat input node.

Solving this also showed another issue where anonymous attributes are
not properly propagated through a repeat zone where there is no link between
the repeat input and output node. In such cases, data is still propagated between
those two nodes when the number of iterations is zero.
2023-10-23 21:29:00 +02:00
Julian Eisel
009c4b819c Fix #114055: Tree item collapse icon doesn't respond to multiple clicks
The way we handled activation of view item buttons (which are placed
underneath other buttons) would leave that button in an active state,
giving it priority on the next event handler run. Instead we want to
cleanly exit the button after activation, so that the overlapped chevron
icon can be recognized as hovered again.

Also limit this to mouse press events, since otherwise the tree view
item would toggle the collapsed state on both the press and the release
event.
2023-10-23 21:19:05 +02:00
Julian Eisel
ad71b77f25 Fix #114024: "Mark as Asset" doesn't work in 3D View sidebar ID selector
Choosing "Mark as Asset" from the context menu of the ID selector (ID
template) would always use the selected objects instead of the ID set in
the ID selector. This is because since f22e2bab72, multiple selected IDs
have priority over a single active ID (to give batch editing priority),
and the 3D view context exposes both.

Adds variants of the mark and clear asset operators that only work on a
single ID ("id" context member). Context menus for buttons representing
an ID use this instead. Using an operator property resulted in too
complicated code. Plus the poll function would succeed in cases where
the operator wouldn't be able to succeed. Separate operators keep things
simple and more reliable.
2023-10-23 19:18:31 +02:00
georgiy.m.markelov@gmail.com
be477f069c Fix #113954: Hydra crash if output node for world light is not found
Also improve update handling of world data.

Pull Request: https://projects.blender.org/blender/blender/pulls/113974
2023-10-23 17:25:11 +02:00
Brecht Van Lommel
34a11f962f Fix Cycles time limit not showing unit when scene units are set to none 2023-10-23 17:12:38 +02:00
Clément Foucault
d91da78b35 Fix #113266: Viewport: Color banding in viewport image render
This was caused by the framebuffer incorrectly being recreated
using a byte buffer. From now on, always use the input format
or guess the format based on the output bitdepth.

Pull Request: https://projects.blender.org/blender/blender/pulls/114061
2023-10-23 13:09:59 +02:00
Pratik Borhade
b8705d342f Fix #113112: Loop Cut and Slide from menu is waiting for cursor input
This is because `TRANSFORM_OT_edge_slide` has `OPTYPE_DEPENDS_ON_CURSOR`
flag set. Due to this, invoke call to loop-cut operator was not sent
from function `WM_operator_name_call_ptr_with_depends_on_cursor`.
Since `edge slide` operator does not depend on actual cusor position, we
can remove this operator flag to fix the problem.

Pull Request: https://projects.blender.org/blender/blender/pulls/113140
2023-10-23 13:05:45 +02:00
Damien Picard
c7a6ede996 Fix #113981: ID plural names using spaces instead of underscores
Translation markers `N_()` were added to IDs' plural names in !113912.
I also renamed some of those because I thought there were only display
names.

This commit reverts the renaming, leaving only the addition of the
markers.

Pull Request: https://projects.blender.org/blender/blender/pulls/114030
2023-10-23 12:05:28 +02:00
Julian Eisel
3817c31e82 Fix crash when opening new asset shelf by dragging
Steps to recreate were:
- Open factory startup
- Add armature, switch to Pose Mode
- Drag upwards the little triangle/chevron tab in the lower right of the
  3D View

If the asset shelf would be displayed the first time for an editor, the
asset shelf data isn't valid yet and can't be accessed.
2023-10-23 11:59:03 +02:00
Campbell Barton
d2b86610f0 Fix animation player continuing to playback audio when paused
Using arrow keys for frame stepping would keep playing back audio.
Also move play/pause to utility functions.
2023-10-23 12:20:44 +11:00
Richard Antalik
86778d4554 Fix VSE retiming speed transition can not be moved
In earlier design, retiming selection was managed outside of retiming
keys struct. This was changed to a flag of the retiming key struct.

Since moving of the transition deletes and re-creates keys, the
selection was lost. Selection is now re-established in
`seq_retiming_transition_offset()`.
2023-10-23 02:38:11 +02:00
Richard Antalik
14827de2a9 Fix #112267: Multiply doesn't multiply alpha channel
After eda58d6419, multiply operation does not affect alpha channel, but
Some users do expect this feature present.

This adds option `multiply_alpha`, so that multiplication (in strip
color panel) will affect alpha channel as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/113791
2023-10-23 02:37:41 +02:00
Campbell Barton
4b1d185887 Fix crash when the animation player fails to create a texture (take 2)
Alternate fix for [0], a crash when a texture fails to load since this
seems to cause animation playback to fail on WIN32, see #113849.

While I can't redo the error, the main change was setting up
`immVertexFormat` before calling `ocio_transform_ibuf`.

[0]: 34899ec13d.
2023-10-23 11:26:55 +11:00
Campbell Barton
a65f806658 Revert "Fix crash when the animation player fails to create a texture"
This reverts commit 34899ec13d.

This causes issues on WIN32 which I'm unable to reproduce.
Resolving the error with textures failing to load can be done with
fewer changes.
2023-10-23 11:25:13 +11:00
Milan Davidović
19b112b11c Fix #112683: Removing the last Annotations layer produces a warning.
After removing the last Annotations layer, the current GPencil block
needs to be freed.

Pull Request: https://projects.blender.org/blender/blender/pulls/113274
2023-10-22 07:39:32 +02:00
Campbell Barton
b592e5c69a Fix error in animation player arguments (font_id & frame_step swapped)
Regression in [0], even though this doesn't seem to cause problems,
the arguments were obviously wrong.

[0]: 4f3e2ee857
2023-10-21 20:34:15 +11:00
Jacques Lucke
0e9f472726 Fix #113773: repeat zone does not propagate anonymous attributes sometimes
The repeat zone needs some special treatment during anonymous attribute
inferencing, because it propagates those attributes directly  from the repeat
input to the repeat output node and vice versa.

Now the algorithm uses multiple passes if necessary to reach a stable
inferencing result.

Pull Request: https://projects.blender.org/blender/blender/pulls/113970
2023-10-20 21:21:40 +02:00
Dalai Felinto
b6108c5cef Cleanup: make format 2023-10-20 19:11:42 +02:00
Anthony Roberts
4e69e49e7e Add check for Qualcomm devices on Windows
Some of these devices are not capable of running >=4.0, due to issues
with Mesa's Compute Shaders and their D3D drivers.

This PR marks those GPUs as unsupported, and prints info to stdout.

A driver update will be available for 8cx Gen3 on the 17th October
from here:
https://www.qualcomm.com/products/mobile/snapdragon/pcs-and-tablets/snapdragon-8-series-mobile-compute-platforms/snapdragon-8cx-gen-3-compute-platform#Software

It will take longer via the standard MS Windows Update channels,
as there is certification, testing, etc required, but it is possible
to get the drivers, at least.

This issue applies even when using emulated x64.

If this does not get merged, all WoA devices will break with 4.0,
where older ones will just launch a grey screen and crash, and newer
ones will open, but scenes will not render correctly in Workbench.

These devices work by using Mesa's D3D12 Gallium driver ("GLOn12"),
which is why we have to read the DirectX driver version - the version
reported by OpenGL is the mesa version, which is independent of the
driver (which is the part with the bug).

Pull Request: https://projects.blender.org/blender/blender/pulls/113674
2023-10-20 17:18:35 +02:00
Jacques Lucke
051b02ed11 Fix #113851: viscoelastic springs do not work
Caused by 425b871607.

The root issue was that these two states of the hash table were
mixed up in 425b871607: (1) the hash table exists and (2) the hash
table is empty.

The use of `std::optional` restores these two different states again.
2023-10-20 16:47:41 +02:00
Germano Cavalcante
b657a35e8f Fix #113936: Extrude to cursor operations not snapping with Face Project
These are not `transform` operations, and use their own method to
detect snapping.

It is important to keep in sync when an enum varies.

In this case, `SCE_SNAP_INDIVIDUAL_PROJECT` was missing to check snap.
2023-10-20 09:55:37 -03:00
Germano Cavalcante
6ce31d173d Fix #113505: Scale strips in nla with snap active seems broken
Caused by bd305c8d18

`snap_transform_data` adds an offset to each element being transformed.

However, this seems to only work for Move and Extend transformations.

Therefore, the solution is to make the NLA snapping system more generic.

Pull Request: https://projects.blender.org/blender/blender/pulls/113554
2023-10-20 14:24:50 +02:00
Philipp Oeser
bb8cb4e56f Fix #113810: Frame Range Metadata missing when burned into image
Probably an oversight in 6c3110a661 ?

Now added the necessary bits to make it work in `BKE_image_stamp_buf` as
well.

Pull Request: https://projects.blender.org/blender/blender/pulls/113840
2023-10-20 14:22:57 +02:00
Philipp Oeser
eed4f950d8 Fix #113798: Weight paint gradient tool paints over hidden vertices
Note 0a0a29887d / 4c99043a85 were supposed to fix this.
This was mostly working, but verts could still obtain wrong weights
(most notably "outside" the gradient range).

Code from above commits would correctly skip hidden verts in
`gradientVertUpdate__mapFunc`.
However, `gradientVertInit__mapFunc` (called prior) already does
`gradientVert_update` once [not entirely sure why it does this, but
wouldnt want to remove the call there due to unforseen behavioral
changes] and we dont early out there.

So now move the check for hidden verts from
`gradientVertUpdate__mapFunc` to `gradientVertInit__mapFunc` and early
out (also saves us from doing other unneccessary stuff there).

Pull Request: https://projects.blender.org/blender/blender/pulls/113825
2023-10-20 14:21:23 +02:00
Philipp Oeser
3cb659faa8 Fix #107920: Weight gradient tool auto normalizes over locked groups
Locking wasnt respected, now use `BKE_defvert_normalize_lock_map`
instead (and only use `BKE_defvert_normalize_lock_single` in case no
groups are locked).

Pull Request: https://projects.blender.org/blender/blender/pulls/113853
2023-10-20 14:14:49 +02:00
Jacques Lucke
09e6ebb5f0 UI: support different main word heuristics in string search
Currently, we always prioritize the words in the last section of a search item
(the words that are highlighted). This generally works well, but the situation
is a bit different for link-drag-search, because there the last part is the socket
name, which is usually less descriptive than the node name.

This patch allows us to use different heuristics to select the prioritized section
per search.

Unfortunately, the link-drag-search is not fully consistent with itself. Sometimes
the last group is a socket name, but sometimes it's also the mode of a node
(`Math > Add`). Therefore, the patch currently simply prioritizes all words in the
same instead of prioritizing only the first part. This seems to work much better
than before even if not perfect in all cases yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/113648
2023-10-20 13:50:10 +02:00
Alaska
686aece797 Shader: Adjust Coat Tint Color intensity based on Coat Weight
The previous formula for adjusting Coat Tint intensity resulted
in strong tints and sudden colour changes when using a low coat weight.

This commit fixes these issues by mixing between a white tint (no tint)
and the chosen tint based on the Coat Weight.

Pull Request: https://projects.blender.org/blender/blender/pulls/113468
2023-10-20 00:34:24 +02:00
Damien Picard
e3fc935349 I18n: disambiguate and extract a few messages
Extract:
- Sculpt filter types from the Sculpt menu. Some of these types use a
  custom label, different  from those defined in the operator RNA,
  which was never extracted.
- "Today" and "Yesterday" from the file browser modification date.
- All name_plural from IDs, as these are used in the UI to list which
  data block is to be removed, when calling outliner.orphans_purge.

Disambiguate:
- "Area", meaning the measurement of a surface as opposed to a place.

Some messages reported by Satoshi Yamasaki in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/113912
2023-10-19 21:39:58 +02:00
Hans Goudey
b6b17ee5f9 Fix: Missing node tool menu update after moving asset to catalog
Moving an asset from "Unassigned" to a catalog needs to clear the node tool
asset tree caches and redraw the editor. That's solved here by emitting
an asset-specific notifier rather than the less clear "file list" one.

Pull Request: https://projects.blender.org/blender/blender/pulls/112980
2023-10-19 16:55:58 +02:00
Philipp Oeser
cdd122cd74 Fix #113885 : Drag and Drop colors misses an undo push
Since the operator can also act on e.g theme colors [and changes to these shouldnt send undo pushes], dont do a general `OPTYPE_UNDO`, but instead be a bit more specific and only do an undo push for buttons with `UI_BUT_UNDO`.

Probably good for LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/113887
2023-10-19 16:02:34 +02:00
Julian Eisel
e7abced86e Fix #113726: Unable to open N panel for the first time with click drag
View2D isn't initialized in these regions yet, which is a valid state
for hidden regions. So consider that when calculating the region zoom
factor in the region scale operator.
2023-10-19 15:44:16 +02:00
georgiy.m.markelov@gmail.com
d6b8422193 Fix #113880: Vector Curve node crashes Hydra render
Fix incorrect input name.

Pull Request: https://projects.blender.org/blender/blender/pulls/113928
2023-10-19 14:35:46 +02:00
Alaska
37ab9bb1ed Fix unnecessary mix nodes for Principled BSDF specular tint
If the specular tint is 0 in a 3.6 file, and the base color has a
node input, then don't add a mix node in versioning.

Pull Request: https://projects.blender.org/blender/blender/pulls/113893
2023-10-19 13:36:34 +02:00
Lukas Tönne
52e6106d28 Fix #113860: Incorrect conditionals for node group socket names
Nested conditions broken by #113924.

Pull Request: https://projects.blender.org/blender/blender/pulls/113929
2023-10-19 12:21:47 +02:00
Julian Eisel
838aca5f18 Fix #102856: Too small draggable area of asset view template items
For historic reasons buttons don't use the full button size as draggable
area by default, only a small part of it that is assumed to contain the
icon (e.g. of a label button). This isn't what we want for the big
preview buttons used here, their entire surface should be draggable.
We already have a workaround in place for this historic behavior, so we
can just enable that.
2023-10-19 12:09:55 +02:00
Lukas Tönne
dfc3f75e77 Fix #113860: Nullptr checks for node socket and panel name pointers
In 3.6 the names of node group sockets were using char arrays, but now
use allocated strings. The RNA system assigns nullptr to such strings
when assigning an empty string through python (UI assignment appears to
always generate a valid string). This creates issues with many STL
functions, in particular assigning nullptr to `std::string` will crash.

We have to check for valid pointers before using them in places that
don't handle nullptrs.

Pull Request: https://projects.blender.org/blender/blender/pulls/113924
2023-10-19 11:48:08 +02:00
Sergey Sharybin
78b2e9071f Fix #113875: 2D Animation template's view transform set to AgX
Pull Request: https://projects.blender.org/blender/blender/pulls/113903
2023-10-19 11:02:01 +02:00
Iliya Katueshenock
e6a0b4404c Fix #110415: Crash with single point curves in Interpolate Curves node
Single point curves should be handled separately, because they don't
have any curve segments.

Pull Request: https://projects.blender.org/blender/blender/pulls/110477
2023-10-19 10:41:33 +02:00
Hans Goudey
f6d45d248c Fix #113894: Node tool crash with deleted group output node 2023-10-19 10:02:30 +02:00
Jason Fielder
62219f8da9 Metal: Re-enable workbench NEXT shadows
With the shift to GPU-driven rendering pipeline,
the SSBO vertex fetch paradigm used to
implement workbench shadows on Metal
instead of utilising the geometry shader
path no longer worked correctly.

This is because the draw submission
required vertex amplification up-front,
based on the expected output geometry
amount for a given input geometry.

This patch aims to resolve this
issue through addition of API to
enable the features within the
GPU driven pipeline.

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113498
2023-10-19 08:01:17 +02:00
Richard Antalik
c7384ba6f3 Fix #110878 VSE duplicating first frame and offsetting rest.
Conversion from timeline frame to frame index was done by casting to
integer, which followed logic of ffmpeg seeking. However this is not
best approach in some cases - for example when FPS of scene and movie
differs by a very small amount. In this case the first frame could be
duplicated and all other frames will appear as offset by one frame.

In particular this may happen scene is set to 29.97 fps and movie is
encoded at 30000/1001 fps. A frame will still have to be duplicated, but
it should be frame where decimal of frame index crosses 0.5 to keep
audio and video in sync as best as possible.

Pull Request: https://projects.blender.org/blender/blender/pulls/113870
2023-10-19 02:08:20 +02:00
Richard Antalik
d4fd65ffc9 Fix issues when adding retiming key outside of strip boundary
When retiming key is added to frame before strip starts, this causes
crash on null dereference. After adding null check, this creates
retiming data, even though operation is not valid. To prevent creating
empty retiming data, `SEQ_retiming_data_ensure()` is only executed, when
operator actually adds a keyframe.
2023-10-19 02:02:52 +02:00
Brecht Van Lommel
b867f16e27 Cleanup: compiler warnings 2023-10-18 16:57:08 +02:00
Julian Eisel
f622b4ce96 Fix #113201: Assets in same folder as current file ignored in All library
Note: Initially committed as 7705e49bcd, but got reverted with
1f0520034a. Note includes fixes for unit tests.

If an asset library was pointing to the same path as the current file is saved
in, the assets from this library wouldn't be loaded. This is because the asset
library service assumed the absolute library root path is a way to uniquely
identify an asset library.

Instead, identify the asset library using both the root path and the library
type.
2023-10-18 16:10:42 +02:00
Michael B Johnson
686487ca17 Fix: USD: Use color3f for color nodes
Blender was writing out color attributes on USDPreviewSurface as
float3 instead of the more accurate color3f.  While this is somewhat
technically okay, since color3f is a role alias for float3, it does cause
issues in applications that are correctly expecting color3f.

The material writer code actually expects color3f in other
sections, but was using float3 in this section erroneously.

Co-authored-by: Dhruv Govil <dgovil2@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113695
2023-10-18 14:52:06 +02:00
Hans Goudey
b2fe1bf624 Fix #113824: Setting curves select mode changes active attribute
Currently the active attribute is stored as an index. This should be
changed to a string, but until then, adding or removing an attribute
changes the indeices. The workaround is to store the name and fix
the active attribute after the change.
2023-10-18 11:31:34 +02:00