Commit Graph

103472 Commits

Author SHA1 Message Date
Dalai Felinto
2d7ccae528 Fix #114015: Search filter removes panel header checkboxes
Caused by 1eb90ee519.

Co-authored by: Hans Goudey <hans@blender.org>
2023-10-24 16:09:26 +02:00
Charles Wardlaw
8caee74a11 Fix #112294: USD import: Fix spammy prints for unsupported and non-array attributes.
- Added support for Point3* and Normal3* attributes as CD_PROP_FLOAT3.
- Caught the last two quaternion formats.
- Silenced prints on quaternion and string formats, as they are known unsupported attributes.

This pull addresses https://projects.blender.org/blender/blender/issues/112294.
The test file provided for that issue now only generates one error, which I believe
is important to keep.

Co-authored-by: Charles Wardlaw <kattkieru@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112298
2023-10-24 15:31:09 +02:00
Jeroen Bakker
ea2746d468 Fix #113235: Voronoi GLSL Shaders On Legacy Intel
When using Voronoi shader nodes on legacy Intel platforms (HD4400) Blender would crash
due to a driver bug. The bug is related to generating the `fractal_voronoi_x_fx` functions.
It doesn't effect all drivers, but mainly from vendors that don't allow installing the official
intel drivers.

We have tried several approaches including using unique function names and unroll only the
function of the body. But none worked on the failing platform.

In the future we could solve this by including our own GLSL compiler, but that is still very
experimental and requires a lot of testing.#113938

Pull Request: https://projects.blender.org/blender/blender/pulls/113834
2023-10-24 14:49:09 +02:00
Campbell Barton
cdbde7d941 Fix #113603: User modified key-map preferences for add-ons don't load
Regression from [0] where the key-map was attempting to load preferences
for key-map items for add-on operators which were not yet defined.
Resolve by postponing keymap updating until after loading add-ons.

[0]: 6de294a191
2023-10-24 23:32:16 +11:00
Jacques Lucke
e4ad58114b Nodes: support looking up node sockets by identifier and name
The main goal of this patch is to turn `node.inputs[...]` and `node.outputs[...]` into
the main way to lookup sockets on a node. Currently, it's used for that sometimes,
but often it is not, because it does not work in all cases. More specifically, it does
 not work when a node has multiple sockets with the same name but different
identifiers, which is relatively common.

This patch proposes to make the string lookup more convenient, more useful and
less prone to breaking after changes in Blender.

This is achieved by changing how the lookup works:
* First, it tries to find an available socket with an identifier that matches the given
  key. This is checked first, it makes sure that every socket can be accessed by its
  identifier. The identifier matching is currently disabled in some nodes where we
  want to change identifiers soonish.
* If that didn't work, it tries to find an available socket with a matching name. This
  is often convenient because it generally matches what can be seen in the UI.
  Furthermore, it's also necessary to avoid breakage with old usages of this lookup
  function.
* If both options above didn't work, it checks whether the given key matches any
  socket name/identifier that the node used to have in the past, but has been
  renamed for whatever reason. This mainly exists to avoid breaking scripts by certain
  kinds of changes in the future. This is not included in this patch.

Note, previously, string lookup would also find unavailable sockets. This is disabled
now, because the way we handle unavailable sockets internally is likely to change.
Therefor, any use of unavailable sockets might break (unavailable != hidden). For
the time being, it's still possible to find unavailable sockets by iterating over all sockets.

This change has a small chance to break existing scripts because the behavior
changes for some inputs in some nodes. However, for the cases where the function
is used in practice, I don't really expect any breakage.

This patch also allows us to give a better answer to reports like #113106.

Pull Request: https://projects.blender.org/blender/blender/pulls/113984
2023-10-24 14:04:18 +02:00
Philipp Oeser
a48d4184b5 Fix #114094: Mask by Color brush has stopped working
Caused by 97f2b01ea9.

Above commit refactored code in a way that it was always early out
(always comparing the current mask value to itself and not the new mask
value).

Pull Request: https://projects.blender.org/blender/blender/pulls/114101
2023-10-24 13:11:27 +02:00
Julian Eisel
489d07de69 Fix memory leak when renaming node group sockets/panels
Steps to reproduce:
- Download .blend from #114059
- Edit name of socket or panel in the node interface tree view
- Close Blender

Pull Request: https://projects.blender.org/blender/blender/pulls/114083
2023-10-24 11:48:08 +02:00
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