Commit Graph

126688 Commits

Author SHA1 Message Date
Bastien Montagne
f3537d4154 I18N: Updated UI translations from svn trunk (r6659). 2023-08-07 11:27:41 +02:00
Nathan Vegdahl
d4d0daa934 Fix #110169: nearly flat normalized fcurves jump around in editor
The root cause was a classic fixed-size epsilon issue.  The code that
checked if an fcurve was effectively flat, and thus shouldn't be
normalized, used a fixed-size epsilon that was reasonable for values
close-ish to zero, but didn't work well for values >= 1.0.

This patch addresses the issue by introducing a new function
`ulp_diff_ff()` that robustly computes the number of floating point
steps between two floats, and using that to ensure that a minimum
number of representable floats exist between the min/max values
of the curve.  This approach scales appropriately up and down to
both huge and tiny values.

This patch also updates the existing `compare_ff_relative()` function
to use the new robust ulps code for the ulps-based part of its
comparison, resolving an issue documented in its unit tests where
it behaved poorly for values close to zero.

Pull Request: https://projects.blender.org/blender/blender/pulls/110796
2023-08-07 10:53:01 +02:00
Lukas Tönne
14bc097015 Nodes: Remove the experimental "node panels" feature
This feature is going to be replaced with a more thorough refactoring
of the node group interface UI, which has actual node drawing support
and a new API for integration of panels into nodes.

Design task: #109135
Implementation: #110272

Pull Request: https://projects.blender.org/blender/blender/pulls/110803
2023-08-07 10:40:29 +02:00
Jeroen Bakker
8c0591459e Cleanup: Make Format 2023-08-07 09:20:26 +02:00
Alaska
52ed6a216f Fix #110255: Cover up CPU/GPU differences with small suns in light tree
This pull request covers up a subtle difference between the CPU and GPU
when rendering with a light tree. Specifically a case where the user
has a sun light with a small angle.

The difference was caused by the dot() function being different between
CPU and GPU backends, with the GPU showing more meaningful
floating-point precision losses when working with small suns.

Pull Request: https://projects.blender.org/blender/blender/pulls/110307
2023-08-07 07:29:14 +02:00
Campbell Barton
58e4a7ae2b Cleanup: minor changes for add-on & module listing
Use list-comprehension for addon_utils.paths and other minor changes.
2023-08-07 10:46:45 +10:00
Bastien Montagne
93728fee53 LibOverride: Extend unittest to cover more advanced/complex cases.
These tests now have basic coverage of:
* Linking data and creating liboverride hierarchy from it.
* Linking that liboverride again.
* Creating liboverride of liboverride.
* Modifying data hierarchy in the library, and testing (recursive)
  resync of it.
* ID name collision handling (between modified linked data and
  existing overrides).
2023-08-06 23:11:19 +02:00
Bastien Montagne
f32f775e5b Fix (unreported) missing 'need resync' detection in overrides of overrides.
In case the reference data of a liboverride is aslo a liboverride, and
is already tagged for resync, the override of the override also needs to
be resynced.

Note that linked overrides are guaranteed to be processed by apply code
(and hence get checked for needed resync) before the liboverrides using
them.
2023-08-06 23:11:18 +02:00
Clément Foucault
cc34a0ae2e EEVEE-Next: Irradiance Volume: Allow object copy
This copies the baked lighting data during object
duplication. This allows library overrides to
work as expected on irradiance volumes.
2023-08-06 21:30:30 +02:00
Clément Foucault
453cc9b84a EEVEE-Next: Irradiance Pool Size
Add pool size to allow predictable memory
footprint.
2023-08-06 20:30:08 +02:00
Clément Foucault
5d2e351baf EEVEE-Next: Irradiance Grid Compositing
This allows irradiance volume that have less priority to
transfer lighting to the ones with higher priority.
Meaning interactive relighting from the world or
lookdev HDRI is now supported if the world isn't baked
inside the volume data.

This should improve workflow with larger scenes and
interactivity with light setups.

To help setup with dynamic objects, this patch introduce
3 new parameter to remove some components from the
irradiance grids.

Pull Request: https://projects.blender.org/blender/blender/pulls/110838
2023-08-06 16:30:12 +02:00
Clément Foucault
5ac026c23a EEVEE-Next: Irradiance Volume validity weighting
This avoid samples inside walls to contribute to
the interpolated lighting. This help preventing
light leaking.

Pull Request: https://projects.blender.org/blender/blender/pulls/110851
2023-08-06 13:43:17 +02:00
Campbell Barton
8b8fe49d34 License headers: add SPDX-FileCopyrightText 2023-08-06 18:59:05 +10:00
Campbell Barton
845a5146e7 Cleanup: avoid term '_len' for buffer size 2023-08-06 16:09:04 +10:00
Campbell Barton
9e3dc02bed Cleanup: naming consistency for find functions
- find_from_name -> find_by_name.
- find_from_index -> find_index.

This matches naming used elsewhere in Blender API's.
2023-08-06 15:57:24 +10:00
Campbell Barton
0701c65d93 Cleanup: use DNA_struct_default_alloc utility function, doxy section 2023-08-06 15:47:50 +10:00
Clément Foucault
d870f9e841 EEVEE-Next: Add back visibility group for irradiance volumes 2023-08-05 20:23:38 +02:00
Clément Foucault
46a17df415 Fix EEVEE-Next: Incorrect Irradiance Volume sorting
`world_to_grid_transposed` contains the resolution of
the grid and is also transposed which isn't what we
need for computing the volume.
2023-08-05 19:47:16 +02:00
Campbell Barton
b879a4f2d8 Cleanup: replace MEM_callocN with MEM_mallocN when overwritten afterward
Also pair allocation with memcpy calls.
2023-08-05 20:06:42 +10:00
Jacques Lucke
9150f6d1a9 BLI: refactor string search to use C++ API
The API becomes much simpler by using C++. Also, it removes the need
for manual memory management.

Pull Request: https://projects.blender.org/blender/blender/pulls/110826
2023-08-05 10:54:23 +02:00
Jacques Lucke
b41c6489bc Cleanup: set node struct ui names at run-time
The goal is to get to closer to removing `NOD_static_types.h` and to define all/most
aspects of a node in the node file itself instead. Data defined in node files is not
available when rna structs are created currently, because that happens in a preprocessing
step. This patch moves part of what was defined in `rna_nodetree.cc` to `node.cc` which
makes it easier to replace when `NOD_static_types.h` is removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/110824
2023-08-05 09:12:27 +02:00
Jacques Lucke
4719caf660 Cleanup: move BLI_string_search.h to C++ 2023-08-05 08:52:29 +02:00
Jacques Lucke
607d203b98 Cleanup: fix compilation errors and warnings 2023-08-05 08:31:31 +02:00
Campbell Barton
19c3d7ee7d Tools: add use_listbase_foreach_macro edit to code_clean utility
Replaces loops on list bases with LISTBASE_FOREACH &
LISTBASE_FOREACH_BACKWARD.
2023-08-05 14:42:42 +10:00
Campbell Barton
a81063e4a1 Cleanup: use const mtex for TexCallData & multitex_* functions 2023-08-05 14:26:29 +10:00
Campbell Barton
bf2b1f7e01 Cleanup: simplify enum typedefs 2023-08-05 14:22:48 +10:00
Campbell Barton
a86ef5d3f6 Cleanup: minor changes to logic that shows render window
- Rename find_area_showing_r_result -> *find_area_showing_render_result.
- Only set the return window argument when the render area is found
  instead of leaving this value set to the last window.
- Use doxygen sections.
2023-08-05 14:05:43 +10:00
Campbell Barton
9ea8477c23 Cleanup: various non-functional C++ changes 2023-08-05 13:57:29 +10:00
Campbell Barton
7f34ad736a Cleanup: spelling in comments 2023-08-05 13:54:25 +10:00
Hans Goudey
07019e7ef5 Cleanup: Remove more struct keywords from C++ headers 2023-08-04 22:47:29 -04:00
Campbell Barton
7e06454663 Fix build error from references to unknown types 2023-08-05 12:23:01 +10:00
Hans Goudey
88de2f25ed Cleanup: Remove unnecessary struct keyword from editors includes 2023-08-04 22:15:25 -04:00
Hans Goudey
ffe4fbe832 Cleanup: Move editors headers to C++
See #103343

Pull Request: https://projects.blender.org/blender/blender/pulls/110820
2023-08-05 02:57:52 +02:00
Hans Goudey
c15d391e86 Cleanup: Various cleanups in newly C++ headers
Mostly remove unnecessary struct and typedef keywords.
Move a few more small wm headers to C++ as well.
2023-08-04 17:55:14 -04:00
Hans Goudey
bc8c892c65 Cleanup: Move WM headers to C++
Also move a few more headers that included WM headers.

Pull Request: https://projects.blender.org/blender/blender/pulls/110815
2023-08-04 23:11:22 +02:00
Hans Goudey
aa5b142e98 Cleanup: Move fsmenu.c to C++
See #103343

Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/110797
2023-08-04 22:15:03 +02:00
Jacques Lucke
f18c45eb69 Cleanup: avoid using NOD_static_types.h for creating the node.type enum
The overall goal is to get rid of `NOD_static_types.h`. This patch removes
one usage of it to generate the `node.type` rna enum. Not all of the data
was available on `bNodeType` already, so I had to add the missing data there.

Pull Request: https://projects.blender.org/blender/blender/pulls/110810
2023-08-04 21:43:54 +02:00
Hans Goudey
9909bf60c9 Fix: Missing updates for geometry node group tool properties
Mistake in fd9d22ba57d75b278a0350492c5eab2d39d39070
2023-08-04 15:30:04 -04:00
Germano Cavalcante
b31ccdcf4a Fix undefined variable usage
Error in b6ed70cd92
2023-08-04 16:28:15 -03:00
Hans Goudey
e3e6fb8ecf Geometry Nodes: Initial tool-specific nodes
Add three new nodes for operations and inputs specific to
node group operators.
- **Selection** Whether elements are selected in the viewport
- **Set Selection** Sets the edit/sculpt selection, on the point,
  face, or curve domains
- **3D Cursor** Gives the location and rotation of the 3D cursor,
  in the local space of the modified object.
- **Face Set** The face set value from mesh sculpt mode,
  and whether the attribute exists.
- **Set Face Set** Set sculpt face set values.

In the add menu and search, the nodes are only visible in the
"Tool" context of the geometry node editor. They also give
errors when executed by a modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/109517
2023-08-04 20:59:04 +02:00
Alexander Gavrilov
9921c3532c Custom Data: make get_layer_index_n always safely handle n overrun.
This function is used to retrieve the index of the n'th layer of
the specified type, if it exists. Currently the way it handles
an n value that is too big is inconsistent: if there are more
layers of different types following the ones of the correct type,
and n isn't too big, it will safely detect that the corresponding
layer is of a different type and return -1. However, if the value
results in a buffer overrun, it causes an assertion or crash.

This means that safe code should currently ensure n is always
correct, making the type check in this function pointless.
Moreover, checking the range in the caller may incur more
overhead than making this code safe.

This changes the assert into a check to ensure consistent behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/110812
2023-08-04 20:40:05 +02:00
Hans Goudey
85bac9d292 Fix: Node group operators reset mesh select mode 2023-08-04 14:30:26 -04:00
Hans Goudey
e0efc234c8 Cleanup: Small improvements to Hydra mesh and curves export
- Use threadsafe normal computation (will be improved more in #93551)
- Copy data directly instead of loops when format is the same
- Use bke::CurvesGeometry wrapper and attribute API
- Avoid `push_back` when size is known ahead of time
2023-08-04 13:59:22 -04:00
Hans Goudey
66dd1657b8 Cleanup: Use const for Blender data in Hydra exporter
As a render engine, this code generally shouldn't modify Blender data.
const helps to use the type system to enforce that.
2023-08-04 13:42:51 -04:00
Hans Goudey
39c3a86d8e Cleanup: Make object material count function take a const pointer 2023-08-04 13:42:51 -04:00
Hans Goudey
f97a51350d Cleanup: Make mesh normal calculation function const
Since this outputs to a separate array and not a custom data layer,
it actually doesn't change the mesh (after 580833165ca105016af5 anyway).
2023-08-04 13:42:51 -04:00
Jacques Lucke
81096abe2a Fix: simulation outputs empty geometry when going to frame zero
Previously, simulation nodes would output default values when there is no
current simulation state and nothing should be computed. Now, the data is
just passed through which is usually less confusing.

Pull Request: https://projects.blender.org/blender/blender/pulls/110800
2023-08-04 19:34:35 +02:00
Germano Cavalcante
b6ed70cd92 Triage: Add 'weekly_report' and 'issues_needing_info' tools
This commit adds 2 tools for triaging:
- /tools/triage/weekly_report.py
- /tools/triage/issues_needing_info.py

These tools automatically detect the username to list activities related to the user.

Pull Request: https://projects.blender.org/blender/blender/pulls/110652
2023-08-04 19:32:25 +02:00
Jacques Lucke
9c72199258 Cleanup: simplify usage of NOD_static_types.h in rna
There were a bunch of duplicated usages of `NOD_static_types.h` in
`rna_nodetree.cc`. This patch reduces the duplication, making it easier
to reason about what is going on.

Pull Request: https://projects.blender.org/blender/blender/pulls/110805
2023-08-04 18:48:16 +02:00
Jacques Lucke
ab39386aec Cleanup: remove dead node tree rna code
This code seems to be dead since forever (wasn't used
in 4638e5f99a9ba59ad0b8a1fd52b12e876480b9e8 either.
2023-08-04 18:35:40 +02:00