Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-29Geometry Nodes: Accumulate Fields NodeJohnny Matthews
This function node creates a running total of a given Vector, Float, or Int field. Inputs: - Value: The field to be accumulated - Group Index: The values of this input are used to aggregate the input into separate 'bins', creating multiple accumulations. Outputs: - Leading and Trailing: Returns the running totals starting at either the first value of each accumulations or 0 respectively. - Total: Returns the total accumulation at all positions of the field. There's currently plenty of duplicate work happening when multiple outputs are used that could be optimized by a future refactor to field inputs. Differential Revision: https://developer.blender.org/D12743
2021-09-06BLI: add default hash for shared_ptr and reference_wrapperJacques Lucke
This makes it easier to use these types as keys in Map, Set and VectorSet.
2021-05-13BLI: simplify supporting heterogeneous lookup for new typesJacques Lucke
Heterogeneous lookup is useful when constructing a key in a map/set is relatively expensive (e.g. `std::string`). When doing lookups in the map/set, one usually does not want to construct the type to avoid overhead. Instead, heterogeneous lookup allows for using a different type (such as `StringRef`) as key. This change makes it easier to implement heterogeneous lookup for custom types. Before, one had to specialize `blender::DefaultHash`. Now, one just has to implement a `static uint64_t hash_as(value)` on the type itself. One still has to provide the equality operator in addition to the hash function of course.
2021-03-25BLI: simplify using DefaultHashJacques Lucke
2021-03-17BLI: provide a default hash for enumsJacques Lucke
This avoids some boilerplate code that was necessary when using enums as keys in maps or sets.
2020-08-10BLI: improve StringRef for C++17Jacques Lucke
Since C++17 there is also std::string_view, which is similar to StringRef. This commit does a couple of things: * New implicit conversions between StringRef and std::string_view. * Support std::string_view in blender::DefaultHash. * Support most of the methods that std::string_view has. * Add StringRef::not_found which can be used instead of -1 in some places. * Improve/fix the description at the top of BLI_string_ref.hh.
2020-08-07Cleanup: use C++ style casts in various placesJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-07-20Refactor: Update integer type usageJacques Lucke
This updates the usage of integer types in code I wrote according to our new style guides. Major changes: * Use signed instead of unsigned integers in many places. * C++ containers in blenlib use `int64_t` for size and indices now (instead of `uint`). * Hash values for C++ containers are 64 bit wide now (instead of 32 bit). I do hope that I broke no builds, but it is quite likely that some compiler reports slightly different errors. Please let me know when there are any errors. If the fix is small, feel free to commit it yourself. I compiled successfully on linux with gcc and on windows.
2020-07-08BLI: add comparison operators and hash functions for float3, etc.Jacques Lucke
2020-07-01Cleanup: spellingCampbell Barton
2020-06-13Cleanup: spellingCampbell Barton
2020-06-11BLI: define default hash function for const typesJacques Lucke
2020-06-09BLI: put C++ data structures in "blender" namespace instead of "BLI"Jacques Lucke
We plan to use the "blender" namespace in other modules as well.
2020-06-09BLI: generally improve C++ data structuresJacques Lucke
The main focus here was to improve the docs significantly. Furthermore, I reimplemented `Set`, `Map` and `VectorSet`. They are now (usually) faster, simpler and more customizable. I also rewrote `Stack` to make it more efficient by avoiding unnecessary copies. Thanks to everyone who helped with constructive feedback. Approved by brecht and sybren. Differential Revision: https://developer.blender.org/D7931
2020-04-25BLI: add DefaultHash specializations for StringRef and StringRefNullJacques Lucke
2020-04-21BLI: Use .hh extension for C++ headers in blenlibJacques Lucke