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
2020-07-21Drivers: add lerp and clamp functions to namespace.Alexander Gavrilov
Implementation of lerp without a function requires repeating one of the arguments, which is not ideal. To avoid that, add a new function to the driver namespace. In addition, provide a function for clamping between 0 and 1 to support easy clamped lerp, and a smoothstep function from GLSL that is somewhat related. The function implementations are added to a new bl_math module. As an aside, add the round function and two-argument log to the pylike expression subset. Differential Revision: https://developer.blender.org/D8205
2020-07-21UI: Add an outer boundary for edge panning, use in outlinerHans Goudey
Currently if you drag and drop an item from the outliner elsewhere in the Blender window, the outliner will scroll the entire time, even if the mouse is far away. This commit adds optional behavior for the edge pan operator that makes it only act if the mouse is close enough to the region. Differential Revision: https://developer.blender.org/D8193
2020-07-21Cleanup: convert unsigned to signed comparison in assertJacques Lucke
Thanks to Campbell for pointing this out.
2020-07-21Cleanup: spellingCampbell Barton
2020-07-20BLI: add typedefs for containers that use raw allocatorsJacques Lucke
Those are useful when you have to create containers with static storage duration. If those would use Blender's guarded allocator, it would report memory leaks, that are not actually leaks.
2020-07-20Particles: support removing particles during the simulationJacques Lucke
This still cannot be controlled by the user. Currently, all particles are killed after two seconds
2020-07-20Fix signed/unsigned comparisonJacques Lucke
2020-07-20BLI: add Vector/Array.fill methodsJacques Lucke
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-19Fix T66937: Blank view on navigation with auto-deph & large clip-endCampbell Barton
2020-07-19Cleanup: spellingCampbell Barton
2020-07-17BLI: add StringRefNull.c_str() methodJacques Lucke
This should be used whenever you rely on the fact, that the returned pointer points to the beginning of a null-terminated array.
2020-07-16BLI: move inline include to the bottom to avoid redeclaration warningJacques Lucke
2020-07-16BLI: move safe math functions to separate headerJacques Lucke
2020-07-16BLI: add safe_divide, safe_modf and safe_logfJacques Lucke
Those are defined exactly as their corresponding functions in Cycles.
2020-07-16BLI: add safe_powf functionJacques Lucke
The same function is also used by cycles.
2020-07-16Cleanup: missing CMake headers from source listsCampbell Barton
2020-07-15Cleanup: spellingCampbell Barton
2020-07-14BLI: remove static assert noexcept move constructorsJacques Lucke
The move constructor of `mpq_class` from GMP currently allocates when it is moved. So, it cannot be noexcept. Since we want to use this type, this static assert cannot stay there.
2020-07-14Cleanup: sort header, cmake pathsCampbell Barton
2020-07-13Cleanup: remove some incorrectly placed constsJacques Lucke
Clang-tidy reported that those parameters could be const, but that is not true on windows.
2020-07-13MSVC: Fix build error with the 8.1 SDKRay Molenkamp
shobjidl_core.h only exists in the windows 10 SDK in the 8.1 SDK ShObjIdl.h will have the definitions we need, which still exists in the 10 SDK and implicitly includes shobjidl_core.h. so ShObjIdl.h will work on both SDK versions.
2020-07-13Fix T78855: Knife tool crashes when the geometry has no faceGermano Cavalcante
I don't see the need for a BVH Tree to have root but not have leafs. But apparently this case is possible.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-13BLI: fix constructor regression for Vector and ArrayJacques Lucke
This was introduced in rB403384998a6bb5f428e15ced5.
2020-07-13BLI: don't allow mutable span of initializer listJacques Lucke
2020-07-10BLI: add C++ random number generatorJacques Lucke
This adds `blender::RandomNumberGenerator` in `BLI_rand.hh`. Furthermore, `RNG` is now implemented in terms of this new generator. No functional changes are expected, the generated random numbers are not changed by this commit. Reviewers: campbellbarton, brecht Differential Revision: https://developer.blender.org/D8259
2020-07-10Fix for building on systems besides apple/windows/linuxCampbell Barton
2020-07-10BLI: initial hash function for Color4b and float4x4Jacques Lucke
2020-07-10Cleanup: spellingCampbell Barton
2020-07-10Cleanup: add BLI_linklist_find_lastCampbell Barton
This makes adding to the end of a linked list simpler, In most cases we avoid this in favor of BLI_linklist_append. For one off operations it's OK.
2020-07-10Cleanup: spellingCampbell Barton
2020-07-09BLI: add more operator overloads for float2Jacques Lucke
2020-07-09Fix: add missing extern "C"Jacques Lucke
2020-07-09BLI: rename rand.c to rand.ccJacques Lucke
2020-07-08BLI: improve constructors and conversions to spanJacques Lucke
This allows us to avoid many calls to `as_span()` methods. I will remove those in the next commit. Furthermore, constructors of Vector and Array can convert from one type to another now. I tested these changes on Linux with gcc and on Windows.
2020-07-08Cleanup: remove unused functionJacques Lucke
This is not necessary in C++17 anymore.
2020-07-08Cleanup: use c++17 helper variable templatesJacques Lucke
2020-07-08BLI: add disjoint set data structureJacques Lucke
This can be used to find separate islands in meshes efficiently (as is done in cycles already). Furthermore, this helps to implement some algorithms on node trees more efficiently.
2020-07-08BLI: add comparison operators and hash functions for float3, etc.Jacques Lucke
2020-07-07BLI: simplify copy constructor of ArrayJacques Lucke
2020-07-07BLI: simplify copy constructor of vectorJacques Lucke
2020-07-07BLI: provide access to underlying node in dot exporterJacques Lucke
2020-07-07Nodes: Generate multi-function network from node treeJacques Lucke
This adds new callbacks to `bNodeSocketType` and `bNodeType`. Those are used to generate a multi-function network from a node tree. Later, this network is evaluated on e.g. particle data. Reviewers: brecht Differential Revision: https://developer.blender.org/D8169
2020-07-07BLI: Correct spin lock definitionSergey Sharybin
The MSVC atomic function is defined for an unsigned type. Not sure why this became an issue after switch to TBB by default, maybe some CFLAGS changed to be more strict after that.
2020-07-07BLI: Fix mistake in SpinLock TBB migrationSergey Sharybin
Copy-paste mistake.
2020-07-07Optimization: use `BLI_bvhtree_intersect_plane` to detect faces that will be ↵Germano Cavalcante
affected by the knife tool The knife code currently calls the `BLI_bvhtree_overlap` function that tests the overlap between the mesh tree and an AABB that encompasses the points projected in the clip_start, clip_end and or clip_planes of the view. This resulted in many false positives since the AABB is very large. Often all the triangles "overlapped". The solution was to create a new function that actually tests the intersection of AABB with a plane. Even not considering the clip_planes of the view, this solution is more appropriate than using overlap. Differential Revision: https://developer.blender.org/D8229
2020-07-07Cleanup: remove redundant commentsJacques Lucke
Searching in these files for "_as" will reveal a comment at the top, that explains what these methods are for. There is no need to duplicate that knowledge all over the place.
2020-07-07Cleanup: spellingCampbell Barton
2020-07-06Cleanup: Use the BLI_edgehash API in the sewing simulation of clothsGermano Cavalcante
Also remove the code in the ghash that is no longer used. This change simplifies the existing code. Differential Revision: https://developer.blender.org/D8219