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-10-15Geometry Nodes: Add Voronoi TextureCharlie Jolly
Port shader Voronoi to GN Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12725
2021-10-14Geometry Nodes: Add White Noise textureCharlie Jolly
Port White Noise shader to geometry nodes. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12719
2021-10-14Cleanup: silence Clang missing-braces warning.Ankit Meel
2021-10-14Cleanup: pass the sizeof(..) as the second arg for array allocationCampbell Barton
By argument naming and convention this is the intended argument order.
2021-10-13BLI: Overload float4x4 multiplication-assignment operatorErik Abrahamsson
This looks a lot nicer than writing `mul_m4_m4_post` instead. Differential Revision: https://developer.blender.org/D12844
2021-10-12Fix T92103: Update BLI hash_float_to_float functions to be shader compatibleCharlie Jolly
Previously the functions called `hash_float` instead of `uint_to_float_01`. This meant that the float was hashed twice instead of once. The new functions are also compatible with Cycles/Eevee. Differential Revision: https://developer.blender.org/D12832
2021-10-11Fix T91889 Exact boolean sometimes drops triangles.Howard Trickey
The problem is that the fast triangulator (based on polyfill) sometimes makes degenerate triangles. Commit 8115f0c5bd91f had a check for degenerate triangles but it wasn't thorough enough. This commit uses a more thorough (and pessimistic) test for degenerate triangles, using the exact triangulator in those cases.
2021-10-08Cleanup: spellingCampbell Barton
2021-10-06Cleanup: spelling in commentsCampbell Barton
2021-10-06Cleanup: clang-format, correct doxy groupsCampbell Barton
2021-10-06Cleanup: rename BKE_font.h -> BKE_vfont.hCampbell Barton
Match API naming prefix (BKE_vfont_*) and DNA_vfont_types.h.
2021-10-06Cleanup: move BLI_vfontdata.h to BKE_vfontdata.hCampbell Barton
This didn't belong on blenlib since it uses DNA data types and included a bad-level call to BKE_curve.h. It also meant linking in blenlib would depend on the freetype library, noticeable for thumbnail extraction (see D6408).
2021-10-05Cleanup: use doxygen sectionsCampbell Barton
2021-10-04Fix T91911: error in image dithering code after recent changesBrecht Van Lommel
Thanks to Patrik Olsson for spotting this.
2021-10-04Fix session uuid ghash comparison return valueSebastian Parborg
Because of legacy reasons (C string compare function returning 0 when strings are equal), the ghash compare function is expected to return false when hashes are equal.
2021-10-04Cleanup: pass arguments as constCampbell Barton
2021-10-04Cleanup: use system includesCampbell Barton
2021-10-03Cleanup: move resource scope method definitions out of classJacques Lucke
2021-10-03Cleanup: move StringRef method definitions out of classJacques Lucke
This makes the classes more appealing to look at and makes it easier to see what different methods are available.
2021-10-03Cleanup: remove unused functionsJacques Lucke
2021-10-03Cleanup: spelling in commentsCampbell Barton
2021-09-29Cleanup: spelling in commentsCampbell Barton
2021-09-28Cleanup: remove incorrect assertJacques Lucke
The method works perfectly fine when `resource` is empty.
2021-09-28Path util: BLI_path_contains() case-insensitive on WindowsSybren A. Stüvel
Make `BLI_path_contains()` case-insensitive on Windows. This behaviour is dependent on the platform Blender is running on, like the rest of BLI_path, and not on the style of paths (Windows-style paths will be treated case-sensitively when Blender is running on Linux/macOS).
2021-09-27BLI Path: add function `BLI_path_contains()`Sybren A. Stüvel
Add function `BLI_path_contains(container, containee)` that returns true if and only `container` contains `containee`. Paths are normalised and converted to native path separators before comparing. Relative paths are *not* made absolute, to simplify the function call; if this is necessary the caller has to do this conversion first.
2021-09-24Geometry Nodes: String to Curves NodeErik Abrahamsson
This commit adds a node that generates a text paragraph as curve instances. The inputs on the node control the overall shape of the paragraph, and other nodes can be used to move the individual instances afterwards. To output more than one line, the "Special Characters" node can be used. The node outputs instances instead of real geometry so that it doesn't have to duplicate work for every character afterwards. This is much more efficient, because all of the curve evaluation and nodes like fill curve don't have to repeat the same calculation for every instance of the same character. In the future, the instances component will support attributes, and the node can output attribute fields like "Word Index" and "Line Index". Differential Revision: https://developer.blender.org/D11522
2021-09-24UUID: add less-than operatorSybren A. Stüvel
Add `operator<` to C++ class to allow lexicographic ordering of UUIDs. This will be necessary when writing asset catalogs to disk in a predictable (i.e. ordered) manner.
2021-09-24BLI: expose more noise hash functions in headerJacques Lucke
This is a follow up of the previous commit. These functions are useful for other areas of Blender as well.
2021-09-24BLI: make noise hash functions available in headerJacques Lucke
2021-09-24Cleanup: spelling in commentsCampbell Barton
2021-09-23bUUID: make it explicit the default constructor produces the nil valueSybren A. Stüvel
The implicit default constructor zeroes all plain data fields, and now this behaviour is explicit & tested for in a unit test.
2021-09-23Cleanup: UUID, fix clang-tidy warningsSybren A. Stüvel
Use explicit `uint32_t` instead of `uint`, add a missing end-of-namespace comment, and change `auto` to `const auto *`. No functional changes.
2021-09-23UUID: add `!=` operator for comparing UUIDsSybren A. Stüvel
Make it possible to unit test with `EXPECT_NE(uuid1, uuid2)`.
2021-09-23UUID: place C++ code in correct namespaceSybren A. Stüvel
Put the `bUUID` class in the `blender` namespace, instead of the `blender::bke` namespace. As a result, some C++ code now correctly uses the C++ class, where previously it would use the C struct and use implicit casting where necessary. As a result, support for initializer lists had to be explicitly coded and in another place an explicit `::bUUID` was necessary to avoid ambiguity.
2021-09-23Cleanup: bUUID, document the constructorsSybren A. Stüvel
No functional changes.
2021-09-23Assets: add Asset Catalog systemSybren A. Stüvel
Catalogs work like directories on disk (without hard-/symlinks), in that an asset is only contained in one catalog. See T90066 for design considerations. #### Known Limitations Only a single catalog definition file (CDF), is supported, at `${ASSET_LIBRARY_ROOT}/blender_assets.cats.txt`. In the future this is to be expanded to support arbitrary CDFs (like one per blend file, one per subdirectory, etc.). The current implementation is based on the asset browser, which in practice means that the asset browser owns the `AssetCatalogService` instance for the selected asset library. In the future these instances will be accessible via a less UI-bound asset system. The UI is still very rudimentary, only showing the catalog ID for the currently selected asset. Most notably, the loaded catalogs are not shown yet. The UI is being implemented and will be merged soon. #### Catalog Identifiers Catalogs are internally identified by UUID. In older designs this was a human-readable name, which has the problem that it has to be kept in sync with its semantics (so when renaming a catalog from X to Y, the UUID can be kept the same). Since UUIDs don't communicate any human-readable information, the mapping from catalog UUID to its path (stored in the Catalog Definition File, CDF) is critical for understanding which asset is stored in which human-readable catalog. To make this less critical, and to allow manual data reconstruction after a CDF is lost/corrupted, each catalog also has a "simple name" that's stored along with the UUID. This is also stored on each asset, next to the catalog UUID. #### Writing to Disk Before saving asset catalogs to disk, the to-be-overwritten file gets inspected. Any new catalogs that are found thre are loaded to memory before writing the catalogs back to disk: - Changed catalog path: in-memory data wins - Catalogs deleted on disk: they are recreated based on in-memory data - Catalogs deleted in memory: deleted on disk as well - New catalogs on disk: are loaded and thus survive the overwriting #### Tree Design This implements the initial tree structure to load catalogs into. See T90608, and the basic design in T90066. Reviewed By: Severin Maniphest Tasks: T91552 Differential Revision: https://developer.blender.org/D12589
2021-09-23Fileops: call `BLI_path_slash_native()` in `BLI_dir_create_recursive()`Sybren A. Stüvel
Make the Windows version of `BLI_dir_create_recursive()` call `BLI_path_slash_native()` before it tries to handle the path. This should make it possible to call it with non-native path separators. This change was provided by our Windows platform maintainer @LazyDodo in P2414, so I assume he agrees with this change.
2021-09-23Cleanup: spelling in commentsCampbell Barton
2021-09-22BLI: support initializing empty FunctionRef with nullptrJacques Lucke
This may sometimes be desired because it is more explicitely shows that the `FunctionRef` will be empty.
2021-09-22BLI: avoid warning when copying empty StringRefJacques Lucke
2021-09-22BLI: initialize MutableSpan in default constructorJacques Lucke
2021-09-21UUIDs: rename UUID to bUUIDSybren A. Stüvel
Rename the `UUID` struct to `bUUID`. This avoids a symbol clash on Windows, which also defines `UUID`. This only pops up when a `UUID` field is used in the DNA code, which is why it wasn't a problem before (it will be once D12589 lands). No functional changes.
2021-09-21Cleanup: mention `UUID_STRING_LEN` in commentSybren A. Stüvel
Mention that `UUID_STRING_LEN` exists in the documentation of `BLI_uuid_format()`. No functional changes.
2021-09-21Geometry Nodes: Attribute Statistic NodeVictor-Louis De Gusseme
This nodes evaluates a field on a geometry and outputs various statistics about the entire data set, like min, max, or even the standard deviation. It works for float and vector types currently, though more types could be supported in the future. - All statistics are calculated element-wise for vectors. - "Product" was not added since the result could very easily overflow. - The "Size" output was not added since it isn't specific to an attribute and would fit better in another node. The implementation shares work as much as possible when multiple statistics are needed. This node has been in development since the beginning of this year, with additions from Johnny Matthews and Hans Goudey. Differential Revision: https://developer.blender.org/D10202
2021-09-20Cleanup: spelling (correct c5c8c68eec93e57ed46be4371d8831e2f0fe3fe2)Campbell Barton
"iff" was intended as "if and only if". while exact use of abbreviations isn't clear cut, I assumed this was a typo & it's not used anywhere else in source/, expand to "only if" (suggested by Sybren).
2021-09-20UUID: add nil value for UUIDsSybren A. Stüvel
Add `BLI_uuid_nil()` that returns the nil UUID (used to indicate "not set") and `BLI_uuid_is_nil(uuid)` to do an equality test with the nil value.
2021-09-20UUID: fix seeding the RNG clock on macOSSybren A. Stüvel
On Apple machines, call `clock_gettime()` instead of `timespec_get()`. macOS only introduced `timespec_get()` in version 10.15 (introduced approx two years ago, so in 2019), even though the function is from C11.
2021-09-20Cleanup: UUID, prevent "missing braces" warning on macOSSybren A. Stüvel
Add braces around initialization of sub-objects, as per the warning suggestion on macOS. No functional changes.
2021-09-20UUID: include 'seconds' field of current time in RNG seedSybren A. Stüvel
XOR the 'seconds' and 'nanoseconds' fields of the current time to seed the RNG used for generating random UUIDs. This ensures a better seed just in case the clock as no sub-second resolution.
2021-09-20Cleanup: spellingCampbell Barton