Commit Graph

7 Commits

Author SHA1 Message Date
Hans Goudey edf8a776ac Cleanup: Use forward declarations to replace includes of BKE_attribute.hh
Remove most includes of this header inside other headers, to remove unnecessary
indirect includes which can have a impact on compile times. In the future we may
want more dedicated "_fwd.hh" headers, but until then, this sticks with the
solution in existing code.

Unfortunately it isn't yet possible to remove the include from `BKE_geometry_set.hh`.
2023-12-20 13:25:28 -05:00
Hans Goudey 19001c9e6c Cleanup: Move attribute domain enum to C++ header, use enum class
Each value is now out of the global namespace, so they can be shorter
and easier to read. Most of this commit just adds the necessary casting
and namespace specification. `enum class` can be forward declared since
it has a specified size. We will make use of that in the next commit.
2023-12-20 13:25:28 -05:00
Jacques Lucke bafc952f97 Cleanup: Geometry Nodes: pass selection by varray instead of field 2023-09-30 16:27:25 +02:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton ffdce441ee License headers: use SPDX-FileCopyrightText for source/
There are still some files that need to be manually updated due to
missing copyright dates.
2023-06-14 23:36:23 +10:00
Hans Goudey 9e9e0bf6d0 Geometry Nodes: Copy no loose vert/edge status in delete geometry node
When the loose edge and vertex status are cached in the source mesh and
the combination of selection domain and mode don't add loose elements,
copy the cache status to avoid recomputation. In a test with a 1 million
face grid:
- All: 23 -> 30 FPS
- Only faces: 22 -> 23.5 FPS
- Only edges and faces: 24 -> 27 FPS

Also remove unnecessary includes and fix a build error introduced in
the last commit to this area from an inconsistent forward declaration.
2023-06-01 10:02:37 -04:00
Hans Goudey 50bfe1dfe3 Geometry Nodes: Rewrite mesh delete geometry node
Replace the implementation of the separate and delete geometry nodes
for meshes. The new code makes more use of the `IndexMask` class, which
was recently optimized. The main goal is to make more of the work scale
with the size of the result mesh rather than the input. For example,
instead of keeping a map from input to output elements, the maps used
to copy attributes go from output to input elements.

The new implementation is generally 2-4x faster, depending on the mode
and the number of elements selected. The new code is also able to skip
more work when nothing is removed.

This also allows using more existing attribute interpolation code,
allowing the overall removal of over 300 lines. Some of the attribute
utilities from a similar change for curves (f63cfd8e28) are
reused directly.

The indices of the result changes, so the test file needs to be updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/108435
2023-06-01 14:55:21 +02:00