Commit Graph

104467 Commits

Author SHA1 Message Date
Gilberto Rodrigues
3fddfb48be Fix #114571: Retopology Overlay Face Color Regression
Fix #114571: Retopology Overlay Face Color Regression

Missed in dfd1b63cc7

Pull Request: https://projects.blender.org/blender/blender/pulls/114589
2023-11-07 21:43:01 +01:00
Brecht Van Lommel
fd60a0be38 Merge branch 'blender-v4.0-release' into main 2023-11-07 21:15:42 +01:00
Brecht Van Lommel
13b1d8d5e1 Fix build failure when WITH_USD=OFF and WITH_MATERIALX=ON 2023-11-07 20:57:35 +01:00
Brecht Van Lommel
7618d4a0ac Merge branch 'blender-v4.0-release' into main 2023-11-07 20:32:33 +01:00
Aras Pranckevicius
a70b42d1cd Cleanup: remove unused spherical harmonics functions
Looks like these were only used for CPU-based viewport shading
in pre-2.80 Blender. Which no longer exists.
2023-11-07 21:16:47 +02:00
Brecht Van Lommel
fb2f77d088 Fix macOS Python SSL still not using bundled certificate
The code from 5ac392ca4 did not work on macOS since WITH_INSTALL_PORTABLE
is not set there. This issue was hidden before, but now happens due to
the changes in #114569 to avoid using /etc/ssl.
2023-11-07 20:13:20 +01:00
Aras Pranckevicius
bdddb3b14e Cleanup: remove unused form_factor_ functions
Looks like these were only used for CPU-based ambient occlusion effect
in pre-2.80 Blender. Which no longer exists.
2023-11-07 21:11:25 +02:00
Aras Pranckevicius
13dbeac13c cleanup: remove "sa" acos/asin/sqrt functions and use "safe_" variants
Cleanup talked about in the previous semi-related PR, #114501

- saacos, saasin, sasqrt have been 100% identical to saacosf,
  saasinf, sasqrtf since 2012.
- For all the above, there exist more intuitively named safe_acosf,
  safe_asinf, safe_sqrtf that do the same thing, so switch all code to those.

Pull Request: https://projects.blender.org/blender/blender/pulls/114593
2023-11-07 19:49:01 +01:00
Miguel Pozo
7c68e9a94c Fix #114524: EEVEE-Next: Wrong normal map node result
The new draw manager stores the object scale as a regular flag.
Update `node_normal_map` to read it correctly.

Pull Request: https://projects.blender.org/blender/blender/pulls/114587
2023-11-07 18:58:31 +01:00
Omar Emara
ae739a6173 Fix #114530: Cryptomatte node not link drag searchable
The Cryptomatte node is not searchable in the link drag search operator.
That's because it still uses socket templates, which are no longer
supported for search since f5e6d4e4b0.

This patch fixes that by using the declare method instead of socket
templates.

Pull Request: https://projects.blender.org/blender/blender/pulls/114537
2023-11-07 18:44:56 +01:00
Aras Pranckevicius
b1c7b573c0 mesh: use faster acos() variant in normals calculation
Function                         Module   Inclusive Time  Exclusive Time
--------------------------------------------------------------------------
  mesh_render_data_update_normals  blender  297.51          0.00

  315 -> 297

acos() usage in all places related to normal calculations shows up in the
profiler. Given that "angle between faces" is only additional heuristic
weight in there (the effect of it at all is very subtle), approximate but
faster version of acos() might be just fine. Especially since some other
parts of Blender (e.g. mikktspace) use approximate acos in a conceptually
the same part.

- Adds safe_acos_approx() to BLI_math_base.hh. Implementation the same
  as already exists in Cycles; max error 0.00258 degrees. Between 2x and 4x
  faster in my tests.
- Changes all normals related calculations to use the function above instead
  of saacos.

Computing normals on a Stanford Lucy (14m verts) mesh:
- Mac (arm64, M1 Max): 247ms -> 229ms
- Win (x64, Ryzen 5950X): 276ms -> 250ms

All places that are about "normal calculation" were changed, including e.g.
Corrective Smooth modifier. Applying that one to the same 14m vertices mesh,
Mac M1 Max: 9.96s -> 9.76s

Tiny changes in several test output expectations w.r.t. normals are
observed, these were reviewed and updated expectations checked in svn.

Pull Request: https://projects.blender.org/blender/blender/pulls/114501
2023-11-07 18:22:17 +01:00
Damien Picard
7231ac0a52 I18n: extract and disambiguate a few messages
Extract:
- "Attribute", when creating a new attribute with
  `GEOMETRY_OT_attribute_add()`: make the default name in the operator
  a null string, and set it to "Attribute" translated inside an invoke
  method instead.
- Also for new attributes, from `BKE_id_attribute_calc_unique_name()`,
  for instance to create a default vertex color layer when going into
  Vertex Paint mode: use `DATA_()` instead of `IFACE_()`, since it
  represents user data.

Disambiguate:
- "Weight" can be the thickness of font glyphs.
- "Mark as Asset" and "Clear Asset" are operator names already
  extracted using the Operator context. They were recently added to a
  manual translation in the UI, but the existing one can be reused.
- "Second" as a time unit in the context of frame snapping.

Some messages reported by Satoshi Yamasaki in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/114159
2023-11-07 18:08:58 +01:00
Damien Picard
f48f901b3b I18n: translate socket properties in the Modifier Properties editor
Each node group asset exposes various properties through sockets.
Although they can generally be considered user-created data, for
built-in assets they are also part of the UI and should be
translated--especially since more modifiers should be migrated to
Geometry Nodes in the future.

This commit enables the translation of those properties in the
Modifier Properties editor.

Pull Request: https://projects.blender.org/blender/blender/pulls/114256
2023-11-07 18:08:35 +01:00
Christoph Lendenfeld
1b95e74b8a Cleanup: comment style in animrig
No functional changes.

Functions moved to animrig recently did not adhere to
the comment style guidelines

Pull Request: https://projects.blender.org/blender/blender/pulls/114586
2023-11-07 17:24:36 +01:00
Christoph Lendenfeld
c8ccd3d58a Refactor: Rename functions in ANIM_animdata.hh
No functional changes.

Renaming the following functions
`ANIM_remove_empty_action_from_animdata` and
`ANIM_fcurve_delete_from_animdata`
to
`animdata_remove_empty_action` and
`animdata_fcurve_delete`

The `ANIM` prefix was no longer needed since the code is now in
a namespace. In order to make the function name consistent with
the functions in `fcurve.cc` the thing it modifies is now at the
start of the function name

Pull Request: https://projects.blender.org/blender/blender/pulls/114584
2023-11-07 17:03:29 +01:00
Christoph Lendenfeld
fc74f341a5 Refactor: Move code related to animdata to animrig
No functional changes.

Move the following functions
`ANIM_fcurve_delete_from_animdata` and
`ANIM_remove_empty_action_from_animdata`
to
`ANIM_animdata.hh` / `animdata.cc`
in animrig

This removes some includes to `ED_anim_api.hh`
from animrig

Pull Request: https://projects.blender.org/blender/blender/pulls/114581
2023-11-07 16:46:38 +01:00
Miguel Pozo
d64e9759ef Fix #114377: Workbench: Support None and Channel Packed alpha modes 2023-11-07 15:51:45 +01:00
Jason Fielder
05c56603a9 Fix #114192: Resolve animation player greying out on resize in Metal
Standalone animation player has inconsistent GPU context activation
paradigm compared with standard rendering paths. The Metal backend
utilises the context activation step to refresh target window swapchains
from within the GHOST module.

This PR adds activation and deactivation calls, and also aims to clean up
GPU_render_begin/end setup to ensure all paths are covered.

Also resolves a bug upon shutdown wherein GPU resources which may
be tied to a GPU context are released during IMB_exit(), which is called
after GPU context destruction.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/114573
2023-11-07 15:35:42 +01:00
Miguel Pozo
b4316445a8 EEVEE-Next: Add Max Displacement option
Add a Max Displacement option to Material settings, so frustum culling
can work correctly with vertex displacement.

Pull Request: https://projects.blender.org/blender/blender/pulls/114200
2023-11-07 15:28:07 +01:00
Christoph Lendenfeld
b2bdfe946e Fix: broken regression test fcurve_test.cc 2023-11-07 15:08:20 +01:00
Jeroen Bakker
73b15f341e Fix: Enable Vulkan Workarounds
Vulkan workarounds could not be enabled by using the
`--debug-gpu-force-workarounds` command line argument. This PR fixes
this.

Pull Request: https://projects.blender.org/blender/blender/pulls/114579
2023-11-07 14:59:28 +01:00
Jeroen Bakker
adb2164191 Draw: Add Region Info Debug Group
Adding a deug group for draw manager region info so it is easier
to find inside tools like renderdoc.

Pull Request: https://projects.blender.org/blender/blender/pulls/114578
2023-11-07 14:53:48 +01:00
Christoph Lendenfeld
69a3c5c7fc Refactor: move code related to fcurve keyframe insertion
No functional changes.

Move the functions
`insert_vert_fcurve` and
`insert_bezt_fcurve`
from `ED_keyframing.hh` / `keyframing.cc`
to `ANIM_fcurve.hh` / `fcurve.cc`
in animrig

Pull Request: https://projects.blender.org/blender/blender/pulls/114570
2023-11-07 14:33:52 +01:00
Campbell Barton
160111c318 Merge branch 'blender-v4.0-release' 2023-11-07 23:59:24 +11:00
Alexander Wilms
93278b55d4 Linux: Improve metainfo file
- Add OARS info, <url/> tags and screenshot captions
- Change metainfo file extension from the deprecated ".appdata.xml" to.
- Update bugtracker and help URL tags in metainfo file.
- The metainfo file is now installed.
- The file now passes flatpak validation.

Ref !114115
2023-11-07 23:56:55 +11:00
Christoph Lendenfeld
d08582c4d6 Cleanup: Remove unused declaration and include
No functional changes.
2023-11-07 13:20:46 +01:00
Christoph Lendenfeld
02b41a5d23 Refactor: Move code for actions into its own file
No functional changes.

Moving the following functions
`action_fcurve_ensure` and
`action_fcurve_find`
from
`ANIM_fcurve.hh`/`fcurve.cc`
to
`ANIM_action.hh`/`action.cc`

This is an effort to ensure that the fcurve files don't need to know
about the container they are stored in so we can swap out
the container more easily.

Pull Request: https://projects.blender.org/blender/blender/pulls/114575
2023-11-07 13:17:43 +01:00
Bastien Montagne
869372ffc3 Fix (studio-reported) VSE crash when deleting strips.
Caused by 3fccfe0bc6 again, no idea why these two VertorSet were defined
as static variables in the functions generating them... But this was for
sure calling for _lots_ of problem. There are almost never good cases
for a function to return a static variable, and if it's done, it has to
be done extremely carefully.
2023-11-07 12:49:09 +01:00
Bastien Montagne
67dda08dea VSE: Cleanup: Simplify code in iterator by de-duplicating logic.
No reason to do the same exact thing in two different functions.
2023-11-07 12:22:11 +01:00
Bastien Montagne
9ecd106307 Fix (unreported) VSE crash when duplicating 4 or more strips.
Regression caused by typo in 3fccfe0bc637...
2023-11-07 11:35:44 +01:00
Hans Goudey
17b875fccf Fix: Windows build error from missing template argument deduction 2023-11-07 11:19:43 +01:00
Bastien Montagne
2f8499415b Fix (studio-reported) VSE crash when Text strips use missing fonts.
BLF code is not threadsafe, yet font loading gets called over and over
by text strips when the font file is missing, including e.g. from
depsgraph evaluation code when duplicating the strip for evaluation.

WARNING: This is a quick fix for deblocking the Blender studio, proper
fix (and report) still needs to be worked on.
2023-11-07 11:06:13 +01:00
Julian Eisel
ecbb77c558 UI: Support dragging over node panel headers to batch (un)collapse
Makes it possible to swipe over panel header to batch open/collapse all
panels the mouse draged over. Normal panels and sub-panels support this
too.

Two changes were needed:
- Support "drag toggle" feature for `UI_BTYPE_BUT_TOGGLE` - all toggle
  buttons should/can support this.
- Allow querying the pushed state from the button used for the
  collapsing. Multiple ways to do this, in this case simply using the
  pushed state query callback seemed simplest.

Pull Request: https://projects.blender.org/blender/blender/pulls/114560
2023-11-07 10:59:33 +01:00
Christoph Lendenfeld
a338ecb9cb Refactor: fcurve.cc
No functional changes.

Improve the readability of the code by

* returning early where possible
* moving variables closer to where they are used
* renaming variables

Pull Request: https://projects.blender.org/blender/blender/pulls/114568
2023-11-07 10:53:43 +01:00
Philipp Oeser
1699163feb Merge branch 'blender-v4.0-release' 2023-11-07 10:12:07 +01:00
Philipp Oeser
0eb279de54 Fix #66286: DblClick to rename UIList items within a popover not working
Looks like most of `ui_apply_but_XXX` or `ui_do_but_XXX` functions rely
on `uiHandleButtonData` (and not necessarily context).

Now the problem from a popover in `ui_but_list_row_text_activate` was
that the label button to be set in BUTTON_ACTIVATE_TEXT_EDITING for
renaming could not be found because it was using the "wrong" region from
context (`CTX_wm_region` - which still seem to point to the region the
popover was spawned from). The correct region is available in
`uiHandleButtonData` though, so now use this instead.

Not totally sure if `CTX_wm_region` should actually be correct in all
cases - which would hint at an underlying problem of not setting it
right - but since other functions rely on `uiHandleButtonData` as well,
this fix seems to make sense.

Fix should go into LTS I think.

Pull Request: https://projects.blender.org/blender/blender/pulls/114363
2023-11-07 10:11:30 +01:00
Hans Goudey
ae1b4a6a28 Cleanup: Consolidate draw attribute extraction
Use the same attribute conversion class for PBVH and regular
mesh attribute extraction. This makes the GPU formats we use
for each attribute type more explicit and centralizes the conversions
from the attribute types to the GPU types. It's also a bit more aligned
to how we could use implicit sharing for GPU vertex buffer data.

Unfortunately it isn't possible to use this same code for curves
and point clouds because they use textures for their evaluated data,
and 3-wide vectors (e.g. `float3`) aren't supported on GPUs with our
current texture abstraction. For generic attributes, the long term
approach will probably be to use an SSBO instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/114340
2023-11-07 10:05:13 +01:00
Hans Goudey
15f1fe5ddb Cleanup: Add missing includes to node anonymous attribute header 2023-11-07 09:50:51 +01:00
Jeroen Bakker
b56382b38a Cleanup: Make format 2023-11-07 08:04:17 +01:00
Jason Fielder
bbb71f0859 Metal: Ensure pending MTLSafeFreeList is released on shutdown
Ensure that on closing of the application, all pending
SafeFreeLists are released. A new change to ensure
release of SafeFreeLists was always deferred until
full completion of GPU buffers meant that a pending
MTLSafeFreeList container may not be released on
shutdown.

This change ensures that the container is fully
destructed on final shutdown.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/114532
2023-11-07 07:53:20 +01:00
Alaska
d6cafda3bb Fix #114491: Incorrect HDR tooltip
Mention that AgX also doesn't produce HDR information for the
HDR display feature on macOS.

Pull Request: https://projects.blender.org/blender/blender/pulls/114502
2023-11-07 07:45:36 +01:00
Campbell Barton
611930e5a8 Cleanup: use std::min/max instead of MIN2/MAX2 macros 2023-11-07 16:33:19 +11:00
Campbell Barton
6297bbe931 License headers: attribute copyright to "Blender Authors"
See #110784, it seems that merging functionality reintroduced the old
convention.
2023-11-07 15:42:52 +11:00
Richard Antalik
9463135fed Fix incorrect assumption when handling overlap
In `shuffle_seq_time_offset_get()` code tried to check whether
`strips_to_shuffle` would overlap with each other, but this was done
incorrectly. This check relied on result of `shuffle_seq_test_overlap()`
but that function assumes, that only 1 strip of its input is transformed
by `offset`. This means, that if 2 strips are moved by same offset and
overlap is checked against each other it could result in true return
value. However this is checked in the code already by
`strips_to_shuffle.contains(seq_other)`, in which case loop continues.
This resulted in emmision of warning which was incorrect.

The issue is fixed by continuing loop if `strips_to_shuffle` contains
`seq_other` as first precondition to signify, that this is expected and
in fact inevitable case. `shuffle_seq_test_overlap()` does not check
whether 2 passed strips are equal, rather `BLI_assert` is used to
signify, that this is not valid use-case.

Since the warning can not happen, the logging was removed.
2023-11-07 05:06:33 +01:00
Richard Antalik
570799374f Fix #114542: VSE overlap not handled correctly
Caused bu mistake in refactoring - tested `seq` instead of `seq_other`.
2023-11-07 05:06:32 +01:00
Campbell Barton
aaf05c2497 Cleanup: various C++ changes (use nullptr, function style casts) 2023-11-07 11:35:16 +11:00
Campbell Barton
1e66938d7a Cleanup: spelling in comments, format 2023-11-07 11:35:16 +11:00
Campbell Barton
c450b5f2b8 Cleanup: use full sentences in writefile.cc, minor clarifications
Also correct doxy-sections.
2023-11-07 11:31:02 +11:00
Campbell Barton
79840a9ec6 Cleanup: early returns in BLF, use full scentences 2023-11-07 11:31:01 +11:00
Julian Eisel
480dceab12 Asset shelf: Drag over checkboxes to enable/disable catalogs in selector
Makes it possible to swipe over the checkboxes used to enable or disable
catalogs in the asset catalog selector popup, to batch enable or disable
the ones dragged over.

Might also enable this feature for other cases where checkboxes are
displayed.
2023-11-06 22:22:54 +01:00