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-11-23Clean-up: Fix BLI_rect.h collision with windows.hRay Molenkamp
windows.h `#defines rct1` as a number which is problematic if we include `BLI_rect.h` after `windows.h` . by renaming `rct1/2` to `rct_a/b` we side step the collision and straighten up the naming with the functions directly above it.
2021-11-23Cleanup: Suppress clang-tidy warning.Jeroen Bakker
2021-11-19Merge branch 'blender-v3.0-release'Bastien Montagne
Conflicts: source/blender/blenkernel/BKE_blender_version.h source/blender/blenloader/intern/versioning_300.c
2021-11-19BLI_listbase: Add utils to search from string or index.Bastien Montagne
If a valid matching string is found, return that item, otherwise fallback to the item matching the given index, if any. This will be useful in RNA override code, and potentially other areas where data in lists can be referenced by their names or indices.
2021-11-19Cleanup: fix typos in comments and docsBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D13264
2021-11-16Geometry Nodes: refactor virtual array systemJacques Lucke
Goals of this refactor: * Simplify creating virtual arrays. * Simplify passing virtual arrays around. * Simplify converting between typed and generic virtual arrays. * Reduce memory allocations. As a quick reminder, a virtual arrays is a data structure that behaves like an array (i.e. it can be accessed using an index). However, it may not actually be stored as array internally. The two most important implementations of virtual arrays are those that correspond to an actual plain array and those that have the same value for every index. However, many more implementations exist for various reasons (interfacing with legacy attributes, unified iterator over all points in multiple splines, ...). With this refactor the core types (`VArray`, `GVArray`, `VMutableArray` and `GVMutableArray`) can be used like "normal values". They typically live on the stack. Before, they were usually inside a `std::unique_ptr`. This makes passing them around much easier. Creation of new virtual arrays is also much simpler now due to some constructors. Memory allocations are reduced by making use of small object optimization inside the core types. Previously, `VArray` was a class with virtual methods that had to be overridden to change the behavior of a the virtual array. Now,`VArray` has a fixed size and has no virtual methods. Instead it contains a `VArrayImpl` that is similar to the old `VArray`. `VArrayImpl` should rarely ever be used directly, unless a new virtual array implementation is added. To support the small object optimization for many `VArrayImpl` classes, a new `blender::Any` type is added. It is similar to `std::any` with two additional features. It has an adjustable inline buffer size and alignment. The inline buffer size of `std::any` can't be relied on and is usually too small for our use case here. Furthermore, `blender::Any` can store additional user-defined type information without increasing the stack size. Differential Revision: https://developer.blender.org/D12986
2021-11-12Cleanup: Improve commentHans Goudey
2021-11-03Cleanup: Remove effect-less constJulian Eisel
Using `const` on an enum type returned by value doesn't have an effect.
2021-11-03Cleanup: Avoid redundant template parameter in BLI serializing APIJulian Eisel
The `ContainerValue` template can obtain the type of the contained value via the given `Container` type, simply using `Container::value_type`. Use this as the default way to determine the value type which simplifies using the template. If necessary the value type can be passed explicitly still.
2021-11-02Fix T77681, T92634: noise texture artifacts with high detailBrecht Van Lommel
We run into float precision issues here, clamp the number of octaves to one less, which has little to no visual difference. This was empirically determined to work up to 16 before, but with additional inputs like roughness only 15 appears to work. Also adds misisng clamp for the geometry nodes implementation.
2021-11-02Fix T92736: Hole in mesh after Set PositionCharlie Jolly
The geometry node port of voronoi_smooth_f1 function has a division by zero when smoothness is set to zero. Using a safe_divide within the function causes issues and was noted in the original patch D12725. Solution in this case is to clamp zero smoothness to FLT_EPSILON. Reviewed By: JacquesLucke Maniphest Tasks: T92736 Differential Revision: https://developer.blender.org/D13069
2021-11-02BLI: avoid passing nullptr to strncmpJacques Lucke
This resulted in an ASAN warning.
2021-11-01Fix crash when "HOME" environment variable isn't definedCampbell Barton
Accessing the default directory in the file selector would crash if HOME was undefined. Add BKE_appdir_folder_default_or_root which never returns NULL.
2021-11-01BLI_path_util: assert to ensure BLI_join_dirfile is used correctlyCampbell Barton
2021-10-28Fix install paths for blender thumbnailer when not building a portable installSebastian Parborg
When doing a non portable build of blender, the executable blender-thumbnailer would be installed in two locations: /usr/bin/ /usr/ While cleaning up, also make the blender thumbnailer dll optional on windows to bring the logic in line with what it is on linux and mac. Reviewed By: Campbell Barton, Ray molenkamp Differential Revision: http://developer.blender.org/D13014
2021-10-27Cleanup: clang-format, clang-tidy, spellingCampbell Barton
2021-10-26Cleanup: clang-formatBrecht Van Lommel
2021-10-26Cleanup: spelling in commentsCampbell Barton
2021-10-26BlenLib: Add JSON Serialization/Deserialization Abstraction Layer.Jeroen Bakker
Adds an abstraction layer to switch between serialization formats. Currently only supports JSON. The abstraction layer supports `String`, `Int`, `Array`, `Null`, `Boolean`, `Float` and `Object`. This feature is only CPP complaint. To write from a stream, the structure can be built by creating a value (any subclass of `blender::io::serialize::Value` can do, and pass it to the `serialize` method of a `blender::io::serialize::Formatter`. The formatter is abstract and there is one implementation for JSON (`JsonFormatter`). To read from a stream use the `deserialize` method of the formatter. {D12693} uses this abstraction layer to read/write asset indexes. Reviewed By: Severin, sybren Maniphest Tasks: T91430 Differential Revision: https://developer.blender.org/D12544
2021-10-26Geometry Nodes: Optimise Voronoi texture nodeCharlie Jolly
This patch improves performance by only assigning or calculating data for connected sockets. It is recommended that artists use the lowest dimensions setting for noise based textures. E.g. Use 2D instead of 3D where possible. Using a scoped timer and single thread on 256,000 points. Smooth F1 3D : Debug build Timer 'Optimised' took 9.39991 s Timer 'Normal' took 16.1531 s This optimisation is only for GN and not shaders. Differential Revision: https://developer.blender.org/D12985
2021-10-24Cleanup: cross-reference right pointing arrow literalCampbell Barton
This value is defined in the UI module, but happens to be used in string_search.cc too. Note that these references need to be kept in sync. Use escaped utf-8 sequence since the literal can be avoided. Also replace BLI_str_utf8_as_unicode calls with constant assignments as these values are known there is no need to decode a utf-8 sequence.
2021-10-24Cleanup: spelling in commentsCampbell Barton
2021-10-22Cleanup: spelling in comments, use C style commentsCampbell Barton
2021-10-21Docs: note why BLI_string_join_arrayN needs to nil terminateCampbell Barton
2021-10-20Fix missing null-terminator in BLI_string_join_arrayNKévin Dietrich
Although the documentation says so, the null-terminator was missing. This could cause crashes when logging shader linking errors as shader sources are empty in this case.
2021-10-20Split and extend unit tests for vec_roll_to_mat3_normalized.Alexander Gavrilov
Separate the huge test into huge logical parts and add more cases to check. Also add a utility to check that the matrix is orthogonal, with arbitrary epsilon values and calculations in double. A couple of tests deliberately fail, to be fixed in following commits. Ref D9551
2021-10-20Cleanup: use elem macrosCampbell Barton
2021-10-20Cleanup: spelling in commentsCampbell Barton
2021-10-19Geometry Nodes: Add Wave texture nodeCharlie Jolly
Port shader wave texture node Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12733
2021-10-19Cleanup: use 'e' prefix for enum typesCampbell Barton
2021-10-19BLI: Support removing keys from a set during iterationHans Goudey
This adds the ability to mark slots as removed while iterating through a mutable set. Differential Revision: https://developer.blender.org/D12867
2021-10-19Fix: Build error with MSVCRay Molenkamp
noise.cc uses std::min and std::max without including the algorithm header required. Newer MSVC versions and GCC implicitly include it somewhere, which isn't something we should count on. Best to include what you use.
2021-10-18Geometry Nodes: Add shader Musgrave texture nodeCharlie Jolly
Port shader node musgrave texture Differential Revision: https://developer.blender.org/D12701
2021-10-18Cleanup: spelling in commentsCampbell Barton
2021-10-16Remove math for 2D affine transformRichard Antalik
Commit e1665c3d3190 added math to do 2D affine transformations with 3x3 matrices, but these matrices are also used for 3D transformations. Remove added functions and use 4x4 matrices for 2D transformation. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12510
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.