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-18Cleanup: Move weld modifier to C++Hans Goudey
This moves `MOD_weld.cc` to C++, fixing compiler warnings coming from the change. It also goes a little bit further and converts the code to use C++ data structures: `Span`, `Array`, and `Vector`. This makes the code more shorter and easier to reason about, and makes memory maneagement more automatic. Differential Revision: https://developer.blender.org/D13618
2021-12-17Cleanup: Use signed integers in the weld modifierHans Goudey
The style guide mentions that unsigned integers shouldn't be used to show that a value won't be negative. Many places don't follow this properly yet. The modifier used to cast an array of `uint` to `int` in order to pass it to `BLI_kdtree_3d_calc_duplicates_fast`. That is no longer necessary. Differential Revision: https://developer.blender.org/D13613
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-09-15Cleanup: Use function to mark mesh normals dirtyHans Goudey
2021-07-24Weld Modifier: add "loose_edges" optionFredrik Hansson
This improve the cloth modeling workflow by allowing you to weld only the edges that are used for the sewing forces. Reviewed By: mano-wii, weasel Differential Revision: https://developer.blender.org/D10710
2021-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-04-26Cleanup: Replace modifyVolume with modifyGeometrySetHans Goudey
This allows us to remove a callback from the modifier type info struct. In the future the these modifiers might just be replaced by nodes internally anyway, but in the meantime it's nice to unify the handling of evaluated geometry a bit. Differential Revision: https://developer.blender.org/D11080
2020-12-10Geometry Nodes: rename modifyPointCloud to modifyGeometrySetJacques Lucke
Since the initial merge of the geometry nodes project, the modifyPointCloud function already was already modifying a geometry set. The function wasn't renamed back then, because then the merge would have touched many more files. Ref T83357.
2020-12-09Cleanup: use common 'MOD_WELD_MODE_' prefixCampbell Barton
2020-12-09Modifier: Add "Connected" mode to the weld modifierHenrik Dick
Implement improvement from T73139 for merging along edges. It is now called "Connected" mode, while the default is called "All". With the recent performance improvement, the Connected Mode is in some cases only double the speed than the usual merge all strategy but in other cases it may be even faster. The bottleneck is somewhere further down the line of merging geometry. The motivation for this patch came from T80897, because the merging in complex solidify is making it very slow. Now merging can be removed from solidify without greater consequences, as this is just a quicker and more advanced algorithm to do the same thing that solidify currently does slowly. Reviewed by: mano-wii, campbellbarton Ref D8966
2020-10-13Fix T81467: Crash with KD-Tree Weld ModifierGermano Cavalcante
The problem is related to the `use_index_order` option of `BLI_kdtree_3d_calc_duplicates_fast`. With this option, the higher index is expected to be less than `tree->nodes_len`.
2020-10-01remove foreachObjectLink callbackJacques Lucke
This removes `foreachObjectLink` from `ModifierTypeInfo`, `GpencilModifierTypeInfo` and `ShaderFxTypeInfo`. There is no need to have both, `foreachObjectLink` and `foreachIDLink`. There is not code that actually depends on `foreachObjectLink`. Reviewers: brecht Differential Revision: https://developer.blender.org/D9078
2020-10-01Use DNA defaults system for modifiersHans Goudey
As noted in T80164, there are quite a few area of Blender where the "Reset to Default Value" operator in button context menus doesn't work. Modifiers are one of them, because the DNA defaults system was never set up for them. Additionally, this should make modifier versioning easier. Whenever a new field is added it should be automatically initialized to the default value. I had to make some ordering changes in the following modifiers to work around an error with `-Wsign-conversion` in the macros: - Solidify Modifier - Corrective Smooth Modifier - Screw Modifier Some modifiers are special cases and are skipped in this commit: - Data Transfer Modifier - Cloth Modifier - Fluid Modifier - Softbody Modifier Differential Revision: https://developer.blender.org/D8747
2020-09-25Fix Tests for Weld Modifier with KD-TreeHenrik Dick
Fixes the failing tests and reintroduces the KD-Tree solution. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D9013
2020-09-25Cleanup: silence [-Wshadow] warningsGermano Cavalcante
Introduced in rBd5a6b3b18c5d.
2020-09-25Weld Modifier: Disable the KD Tree solutionGermano Cavalcante
This solution is causing the modifier regression test to fail. Also fix a mistake to allocate `vert_dest_map` twice.
2020-09-25Modifiers: add StructRNA pointer field to ModifierTypeInfoJacques Lucke
This reduces the number of places that have to be modified when a new modifier is added. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D9000
2020-09-25Modifiers: add icon field to ModifierTypeInfoJacques Lucke
With this change `outliner_draw.c` does not have to be edited anymore when a new modifier is added. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8998
2020-09-24Weld Modifier: Use KD Tree in detecting the geometry to be weldedHenrik Dick
This commit replaces the BVH Tree currently used by the Weld Modifier with the KD Tree used by `Merge > By Distance`. This changes the result of the Weld Modifier to more closely match `Merge > By Distance`. There is also a big performance advantage. Here is an overview (models in D8995): | 2.90 (Duplicate Limit = 0) | 2.90 (Duplicate Limit = 1) | master (BVH) (Duplicate Limit = 1) | patch (KD) | | 1.69s| 0.17s | 0.12s | 0.029s | Differential Revision: https://developer.blender.org/D8995
2020-09-21Weld Modifier: Performance improvementHenrik Dick
This commit contains the Performance improvement, that was originally proposed in D8966. It improves the performance of the Weld Modifier by a lot. It had a loop with execution time O(N^2) which is now O(N*log(N)) at a bare maximum.
2020-09-02UI: Use instanced panel custom data instead of list indexHans Goudey
For modifier shortcuts we added a "custom_data" field to panels. This commit uses the same system for accessing the list data that corresponds to each panel. This way the context is only used once and the modifier for each panel can be accessed more easily later. This ends up being mostly a cleanup commit with a few small changes in interface_panel.c. The large changes in the UI functions are due to the fact that the panel custom data is now passed around as a single pointer instead of being created again for every panel. The list_index variable in Panel.runtime is removed as it's now unnecessary. Differential Revision: https://developer.blender.org/D8559
2020-08-07Cleanup: Modifiers, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/modifiers` module. No functional changes.
2020-07-15Revert "Cleanup: simplify Weld Modifier logic"Germano Cavalcante
This reverts commit 98b1a716d65f187a2499eba2475e4d456f8ed107. That commit broke a few modifiers.py tests (Screw+Weld and a weld merge threshold). And some pairs may be lost in the first loop.
2020-07-14Cleanup: simplify Weld Modifier logicGermano Cavalcante
The original code to rearrange the weld vertices map was confusing. It traverses the overlap result multiple times within a loop. This part of the code has therefore been rethought, simplified and commented. This also results in a slight improvement in the performance of the modifier.
2020-06-15Modifiers: New callbacks for reading and writing .blend filesJacques Lucke
This is part of a greater blenloader decentralization effort (T76372). For modifiers the goal is that fewer files have to be modified when a new modifier is added. This patch just adds the `blendWrite` and `blendRead` callbacks to `ModifierTypeInfo` but does not change any other code yet. In the next steps, modifier specific code will be moved from `writefile.c` and `readfile.c` into their corresponding `MOD_*` files.
2020-06-05UI: Drag and Drop Modifiers, Layout UpdatesHans Goudey
This patch implements the list panel system D7490 for modifiers. It also moves modifier drawing to a callback in ModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This adds a PanelRegister callback and utilities for registering panels and subpanels. It also adds the callbacks for expansion saving and drag and drop reordering described in D7490. These utilities, callbacks, and other common UI elements shared between modifiers live in MOD_ui_common.c. Because modifier buttons are now in panels, we can make use of subpanels for organization. The UI layouts also use the single column layout style consistently used elsewhere in Blender. Additionally, the mode-setting buttons are aligned and ordered consistently with the outliner. However, the large number of UI changes in this patch may mean that additional polishing is required in master. Thanks to William Reynish (@billreynish) who did a fair amount of the layout work and to Julian Eisel (@Severin) for consistent help. Differential Revision: https://developer.blender.org/D7498
2020-06-02BVHCache: PerformanceJeroen Bakker
This patch changes the BVHCache implementation. It will use a primitive array in stead of the ListBase. The locking is also changed from a global lock to a per cache instance lock. The performance of `gabby.blend` available on the cloud increased from 9.7 fps to 10.5 fps. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D7817
2020-05-09Cleanup: double-spaces in commentsCampbell Barton
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-04-22Objects: add infrastructure for hair, pointcloud, volume modifiersBrecht Van Lommel
There is no user visible difference in standard builds, as there are no volume modifiers yet. When using WITH_NEW_OBJECT_TYPES some deform only modifiers are now available for hair and pointcloud objects. Differential Revision: https://developer.blender.org/D7141
2020-04-03fix (unreported): Weld Modifier: possible use of uninitialized variableGermano Cavalcante
2020-04-01Fix customdata interpolation being done multiple times in Weld ModifierGermano Cavalcante
2020-04-01Fix T74588: Weld Modifier: Vertex colors and UVs get incorrect valuesGermano Cavalcante
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2020-03-06Cleanup: use 'BKE_' prefix for BKE_deform API callsCampbell Barton
- Use 'BKE_object_defgroup' prefix for object functions. - Rename 'defvert_verify_index' to 'defvert_ensure_index' since this adds the group if it isn't found.
2020-03-03Fix T74377: Weld Modifier destroys vertex groupsGermano Cavalcante
Differential Revision: https://developer.blender.org/D6997
2020-02-12Modifiers: Weld Modifier - simplify invert_vgroup codemano-wii
No functional change
2020-02-12Modifiers: Weld Modifier add invert vgroup optionCody Winchester
Adds the invert vgroup option to the weld modifier. Differential Revision: https://developer.blender.org/D6818
2020-02-11Cleanup: extra semicolons, comma use, undeclared varsCampbell Barton
2020-01-18Weld Modifier: Reduce size of the leaf nodes to halfmano-wii
This improves performance by reducing the amount of false positives. A self overlap is made, so the distance from the vertices in the overlap nodes is actually added.
2019-12-30Fix T72792: Crash with Vertex Groups + Weld Modifier after generative modifiersmano-wii
Some generative modifiers remove the `CD_MDEFORMVERT` custom layer. So make sure it exists in the mesh.
2019-12-14Fix T72412: Weld Modifier: Merged edges not displayed in wireframemano-wii
2019-12-12Cleanup: Rename variables (_tot -> _len)mano-wii
2019-12-12Fix T72380: New Weld Modifier is crashing when used after a Vertex Weight ↵mano-wii
Modifier It happened when the vertex group was empty.
2019-12-12Modifier: New Weld Modifiermano-wii
Part of T70240 This is the initial implementation of Weld Modifier. New features will be added later. ToDo: - Seams: restrict welding to vertices along boundary edges. - Edge Collapse: collapse edges below the length threshold. - New icon. - Some customdata are not being correctly interpolated. Differential Revision: https://developer.blender.org/D6383