Commit Graph

103406 Commits

Author SHA1 Message Date
Pratik Borhade
8867cfc563 Fix #113778: Skip unlinking a linked collection if parent is linked
Similar to 197f3d75d1, do not unlink a linked collection from a linked parent

Pull Request: https://projects.blender.org/blender/blender/pulls/113805
2023-10-17 12:39:01 +02:00
Campbell Barton
5ac392ca40 Fix #102300: SSL/HTTPS Request Unable to Get Local Issuer Certificate
Resolve an error with SSL using a hard coded path to certificates on
Linux causing HTTPS access to fail.
request.urlopen(..) couldn't access any HTTPS URL's.
2023-10-17 19:58:34 +11:00
Hans Goudey
d7e501ce3b Fix #112448: Leading deform modifiers skip adding original coordinates
Previously the first group of deform modifiers didn't need to access
original coordinates explicitly because the deformation wasn't included
in the mesh positions. After d20f992322 the mesh is deformed
directly though, so the original coordinates need to be added first.

In the case of this report, the particle system (which is a "deform"
modifier for reasons) didn't have original coordinates to work with, so
it created the child particles at the deformed positions from the shape
keys every time. Though for some reason it only did that for renders.

Pull Request: https://projects.blender.org/blender/blender/pulls/113679
2023-10-17 10:28:19 +02:00
Hans Goudey
bd4c310a19 Fix: Missing edge domain in node tool set selection node
This wasn't implemented in the initial commit because we didn't have
a function to flush edge selections to vertices and faces. But using the
existing domain interpolations makes that trivial, so it may as well be
added now to avoid the arbitrary limitation from the user perspective.

See https://devtalk.blender.org/t/node-tools-feedback/31388/5

Pull Request: https://projects.blender.org/blender/blender/pulls/113367
2023-10-17 09:56:24 +02:00
Hans Goudey
3d236bc858 Mesh: Add operator to select elements based on boolean attribute
Adds a "Select by Attribute" operator as mentioned in the discussion in
#105317. This is done in 4.0 to limit the breaking aspect of the removal
of face maps. The selection storage functionality is replaced by boolean
attributes. We already have a way to control the data in the boolean
attribute with the "Set Attribute" operator, but we didn't have a way to
convert the attribute into a selection.

This operator works on the active attribute if is a boolean attribute
and isn't on the face corner domain. It adds to the existing selection
similar to other existing operators.

While this behavior can be recreated as a node tool, we add it as a
builtin operator here to avoid limitations of the new node-based
tool system and to make the late-in-the-release-cycle change safer.

Pull Request: https://projects.blender.org/blender/blender/pulls/113772
2023-10-17 09:24:51 +02:00
Hans Goudey
820f0c24c4 Mesh: Add versioning to convert old face maps to boolean attributes
See #105317

In 46cf093270, face maps were just converted to an integer
attribute. While the internal data remains the same that way, we lose
the names and some convenient methods of interaction. This commit
additionally converts each face map to a separate boolean attribute
using the old name. This does require that no attributes were using that
name already.

Each boolean attribute can be thought of as a selection, accessible in
geometry nodes and properly interpolated by mesh processing
algorithms. The selections no longer have to be unique, meaning
one face can be part of multiple selections.

Pull Request: https://projects.blender.org/blender/blender/pulls/113769
2023-10-17 09:17:07 +02:00
Germano Cavalcante
bbf87ee78c Fix #113786: Snapping to vertex is broken, when instances are used in GN
Missed in ff4f14b21.

For GN instances, we should use `DupliObject::ob_data`.
2023-10-16 17:26:02 -03:00
Harley Acheson
ffe980afad Fix #113766: Incorrect Cursor With Offset Position
Next character left edge position incorrect when string has
an offset positioning (scrolled within the input box).

Pull Request: https://projects.blender.org/blender/blender/pulls/113784
2023-10-16 19:17:28 +02:00
Germano Cavalcante
88a6df24aa Fix #113552: NLA Markers do not reset when length reaches 0.0
Before bd00324c26, strip lengths were changed in
`rna_NlaStrip_frame_start_ui_set` and `rna_NlaStrip_frame_end_ui_set`
so as not to be shorter than NLASTRIP_MIN_LEN_THRESH.

This prevented `BKE_nlameta_flush_transforms` from working with
zero-length strips.

But now, in some cases, strip can be zero length.

Therefore, consider this case and avoid division by zero.

Pull Request: https://projects.blender.org/blender/blender/pulls/110121
2023-10-16 16:46:47 +02:00
Germano Cavalcante
6dda18269c Fix #113650: Vertex Creasing is using Mirror
`Vertex Crease`, like `Edge Crease`, is not supposed to use transform
symmetry.

So remove it.

(`Skin Resize` remains using symmetry since that case seems desirable.
See #84376)
2023-10-16 10:39:31 -03:00
Damien Picard
9c0c9789cc I18n: fix Vector Math and Mix node sockets search
When searching for a new node by dragging from a socket, some results
were untranslated. This is because they did not use a translation
context matching other occurrences, from which the strings were
extracted to the translation files.

Three nodes using operations were affected: Mix and Vector Math.
- Vector Math used the default context when it should have used
  NodeTree.
- Mix and Mix RGB used NodeTree when they should have used the default
  context.

Pull Request: https://projects.blender.org/blender/blender/pulls/113485
2023-10-16 14:45:47 +02:00
Miguel Pozo
e3014ffc27 Fix #113741: Workbench: Reset TAA on overlay toggle
Reset TAA when enabling overlays,
since we won't have valid sample0 depth textures.
2023-10-16 13:49:12 +02:00
Miguel Pozo
f2ba12a053 Fix: Workbench: Volume compositing
Regression after fe39456ba5
2023-10-16 13:24:35 +02:00
Thomas Dinges
1f0520034a Revert "Fix #113201: Assets in same folder as current file ignored in All library"
This reverts commit 7705e49bcd.

It broke the bf_asset_system_tests test and this cannot be fixed now so reverting.
2023-10-16 12:32:42 +02:00
Jesse Yurkovich
49e4923384 Fix #113697: Fix timer leak from panel drag/animate processing
When clicking or dragging a Panel's drag handle, a PANEL_STATE_DRAG
state transition is followed immediately by a PANEL_STATE_ANIMATE
transition.  Both transitions start a timer.

Unfortunately, a subtle change introduced in
f3ab698951 meant the first timer would no
longer be destroyed before starting the second one.

The fix is to just reuse the timer if it's already present so that a
second one is not created in the first place.

Pull Request: https://projects.blender.org/blender/blender/pulls/113711
2023-10-16 04:00:15 +02:00
Iliya Katueshenock
4d91c50b62 Fix #113429: Dirty evaluated curve
Tag curve topology as dirty after changing of types of handles.

Pull Request: https://projects.blender.org/blender/blender/pulls/113717
2023-10-15 20:59:21 +02:00
Jacques Lucke
c584b6434f Fix #113691: crash when Interpolate Curves input has zero curves
The crash happened only when there was a `Curves` geometry, but
it was empty.
2023-10-15 20:49:48 +02:00
Hans Goudey
601fba20a6 Fix #113619: Incorrect nested group assets in compositor add menu
The menu structure currently needs to be duplicated in the code to avoid
adding assets to more than one menu. This was done for geometry nodes
in b49c84276c but was missed for the compositor and shader
nodes. Also remove an unnecessary separator.
2023-10-15 19:52:38 +02:00
Hans Goudey
e083be6a9c Fix #113737: Missing UI text for geometry nodes handle type properties 2023-10-15 19:19:42 +02:00
Harley Acheson
d578170131 Cleanup: Make format
Format changes resulting from Make Format
2023-10-15 09:09:30 -07:00
Harley Acheson
03655189d7 Fix #113735: Space Characters in UI Text Entry #113749
With #113707 text cursor position is set using the character's visible
bounds, so special care is needed for those without bounds like space.
Forgot this also applies to 4.0.
2023-10-15 09:06:44 -07:00
Harley Acheson
b772603843 Fix #113682: Improved Text Caret Position
For regular UI text entry, place the text caret exactly between
adjacent glyph bounds instead of just using partial text length to
position it.

Pull Request: https://projects.blender.org/blender/blender/pulls/113707
2023-10-14 20:58:50 +02:00
Iliya Katueshenock
690deeda18 Fix: Geometry Nodes: Create instance attribute of the right type
`attributes_to_propagate` is map of all attributes to propagate from different
components. For attribute propagation three different components is taken.
Each one can have named attribute with specific type. Current implementation
of propagation: Try to make implicit share attribute. Or create/copy.
This doesn't takes into account `attributes_to_propagate`' data type info.
So, this cause crash for case, there multiple component have same name attribute
with different type.
Fix: Try to make implicit share attribute with correct type. Or create, copy typed version.

Pull Request: https://projects.blender.org/blender/blender/pulls/110146
2023-10-14 10:54:32 +02:00
Leon Schittek
b93dbaba1d Fix: Node Editor: Improve info panel drawing
Fix papercuts with the info panel:
1. Make the panel extend behind hidden nodes
2. Don't let it become smaller than the node itself, when resizing

Pull Request: https://projects.blender.org/blender/blender/pulls/113411
2023-10-14 09:37:03 +02:00
Germano Cavalcante
c634a15e85 Fix crash when canceling Vertex Crease with Mirror
Crash due to variables not initialized.
2023-10-13 19:14:42 -03:00
Harley Acheson
da2902120e UI: Remove Menu Search Console Warning
Menu Search is showing a console warning whenever it can't find a menu
to search. WM_menutype_find should be set to silent.

Pull Request: https://projects.blender.org/blender/blender/pulls/113701
2023-10-13 23:51:18 +02:00
Harley Acheson
d625feadd8 Fix #113689: Improved BLF_width_to_strlen Measurement
BLF_width_to_strlen measures text with reduced accuracy with Hinting or
subpixel anti-aliasing enabled. blf_font_width_to_strlen_glyph_process
does not take into account these changes when iterating through glyphs.

Pull Request: https://projects.blender.org/blender/blender/pulls/113698
2023-10-13 22:31:08 +02:00
Miguel Pozo
9e7a576cee Workbench: Fix: depth_in_front not being copied after the first sample 2023-10-13 19:18:46 +02:00
Leon Schittek
7017a9880e Fix: UI: Scale list item highlight with zoom
Fix the row highlight in list views not scaling properly by taking
the zoom into account.

Pull Request: https://projects.blender.org/blender/blender/pulls/113645
2023-10-13 19:04:42 +02:00
Julian Eisel
7705e49bcd Fix #113201: Assets in same folder as current file ignored in All library
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-13 18:52:38 +02:00
Harley Acheson
a9dc7a4719 Cleanup: Comment for Assert in UI_text_clip_middle_ex
Just an added detailed comment for the reason for the assert in
UI_text_clip_middle_ex and why it has wriggle room.
2023-10-13 08:35:04 -07:00
Miguel Pozo
42aa97a080 Fix #113580: Workbench: Always setup in_front_depth_tx
Always setup in-front depth, since Overlays can be updated without causing a Workbench re-sync.
2023-10-13 17:12:40 +02:00
Brecht Van Lommel
5e67e44963 Shaders: don't unnecessarily set subsurface scale to zero in old files
When the subsurface weight is zero, keep the scale to its default value.
2023-10-13 16:32:19 +02:00
Julian Eisel
b8673bfbe2 Fix spreadsheet tree-view icons too close to collapse icon
There was a little hack to remove padding from buttons following the collapse
icon by setting the `UI_BUT_NO_TEXT_PADDING` flag, since that added excessive,
weird looking spacing. This shouldn't be done for buttons with icons, as it
moves the icons too close to the collapse chevron, and is visibly inconsistent
with other icon labels in the tree.

Turns out, that the entire hack to set the `UI_BUT_NO_TEXT_PADDING` flag is
unnecessary since 5c2330203e, which sets the flag everywhere for comparable
situations. So the hack can be removed.
2023-10-13 16:09:56 +02:00
Jacques Lucke
75c333ee5c UI: use dash and underscore as word separators in string search
Sometimes, those are used instead of spaces, but there should be
no functional difference to using spaces.
2023-10-13 15:42:10 +02:00
Jacques Lucke
0ea193bdb3 Nodes: add forward compatibility for dynamic node declarations
The goal of this patch is to allow us to use dynamic node declarations
for various nodes in a future version without breaking forward compatibility.
The same kind of change should be added to Blender 3.6.

The code added here is not supposed to end up in `main`, so it has to be
removed when merging the release branch.

Pull Request: https://projects.blender.org/blender/blender/pulls/113497
2023-10-13 14:39:51 +02:00
Jacques Lucke
a9bf212de0 Fix #113563: prioritize main group length in string search
For node search that means that shorter matching node names
are moved further to the top, even if the entire search result is longer
because it is in a deeper menu.

This also more closely resembles how the search worked in Blender 3.6
where the menu path was not included in the search.
2023-10-13 09:59:21 +02:00
Campbell Barton
51467b0611 Fix crash dragging images into the animation player
Resolve issues with the animation player drag & drop.

- IMB_exit ran before attempting to load the dropped image,
  crashing when the image was loaded.
- The old event consumer wasn't removed from the system
  causing events to be processed that accessed freed stack memory.
2023-10-13 17:49:36 +11:00
Jeroen Bakker
4cedbb9cb7 Fix #113310: Python gpu.state.scissor_test_set Not Updating State
When using scissor_test_set the framebuffer wasn't marked dirty and
would not always translate the start to actual driver commands.

Pull Request: https://projects.blender.org/blender/blender/pulls/113642
2023-10-13 07:44:11 +02:00
Campbell Barton
63586d0f6b Fix #113309: Broken key-map after "Reload Scripts"
Regression caused by [0]. Resolve by adding a 'keep_properties' argument
to KeyConfig.update so the key-map items can be restored after the
operators have been reloaded.

[0]: 88a875ec3a
2023-10-13 14:37:07 +11:00
Campbell Barton
60a17fae47 Cleanup: add "_data" suffix to wm_keymap_item_free
Clarify that the wmKeyMapItem it's self isn't freed.
2023-10-13 14:20:29 +11:00
Campbell Barton
aebb32748e Fix UB issue calculating the frame duration for images with FFMPEG
AVFormatContext::duration was used without checking it was set,
calculations for the frame-rate cast -INT64_MAX to a double,
scaled it then cast to an integer - overflowing.
On my system the result was a negative number so the duration was never
usable in practice.

Add an explicit check for this so the duration is left at zero instead.
2023-10-13 10:55:47 +11:00
Campbell Barton
df108825c0 Fix subtle path handling bugs caused by recent changes to the title
Resolve issues with corner-cases introduced by [0].

- Comparing the filename & filepath was no longer a valid way to check
  for a directory component since the extension was stripped.
- Use BLI_path_extension_or_end which doesn't confuse extensions with
  the dot from hidden files.

The variable name include_directory was also misleading.

[0]: 1a648f5b22
2023-10-13 10:29:55 +11:00
Campbell Barton
fb58aa5900 Cleanup: typos, duplicate words 2023-10-13 10:21:06 +11:00
Harley Acheson
1c4b2ad17f Fix #113352: UI: Round Pen When Subpixel AA is Off
Testing to see if rounding the advancing pen seems to give slightly
nicer spacing when subpixel anti-aliasing is turned off.

Pull Request: https://projects.blender.org/blender/blender/pulls/113399
2023-10-12 20:54:54 +02:00
Harley Acheson
70af02e0dd Cleanup: Make format
Changes resulting from Make Format
2023-10-12 10:38:12 -07:00
Bastien Montagne
5cf3654d9d Fix USD Export crash with complex scenes, due to race condition during depsgraph building.
Building the depsgraph from non-main thread is unsafe currently, as it
may trigger some deferred processing on the Main data itself (here, the
update/resync of viewlayer collections).

So this commit moves the building of the export depsgraph back into the
main thread for the USD exporter, while keeping the depsgraph evaluation
code (which is typically the heavy part with complex scenes) into the
threaded job worker code.

Issue was randomly (but fairly commonly) reproducible when trying to export
most of the Pets project production files (on linux debug build with ASAN).

Root issue has been reported and is being discussed in #112534, ideally a
better solution can be designed at depsgraph level in the future.

NOTE: Should likely also be back-ported to 3.6 and 3.3 LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/113537
2023-10-12 19:10:37 +02:00
Harley Acheson
b688414223 UI: Type To Search And Space Bar Search
Continue allowing spacebar search for all dropdown and context menus,
but also add the ability to allow some menus to have type to search,
like Add Modifiers, Objects, Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/113520
2023-10-12 17:54:59 +02:00
Damien Picard
2d703e9200 I18n: add label declaration to node sockets so they can be shortened
In !112591, nodes got the ability to group sockets into panels. The
labels for these sockets are automatically shortened if they begin
with the same text as their parent labels. For instance, "Transmission
Weight" will be shortened to just "Weight" because it is under the
"Transmission" panel.

While this is a good heuristic for English, it breaks down in
languages which do not have the same word order.

This commit adds a `.short_label()` callback to socket declarations so
that a shortened label can be explicitly declared.

It also adds two regexps to the translation script so that these new
fields can be extracted to the .po translation files. One extracts the
label with a translation context, the other without. Only the one
without context is currently in use.

The current automatic shortening logic is kept and will be used only
if a shortened label is not manually provided.

Fixes #112970: Node socket labels under panels are not shortened when
translated.

Pull Request: https://projects.blender.org/blender/blender/pulls/113070
2023-10-12 17:51:37 +02:00
Harley Acheson
1a648f5b22 UI: Window Title Blender Path Changes
Do not show extension of initial name, and include full file name
in the path section.

Pull Request: https://projects.blender.org/blender/blender/pulls/113560
2023-10-12 16:56:56 +02:00