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-03Cleanup: move public doc-strings into headers for 'bmesh'Campbell Barton
Some minor improvements to doc-strings too. Ref T92709
2021-12-03Fix T93574: Asset triangulating a meshCampbell Barton
Correct assert for edit-mesh normal calculation.
2021-12-02Fix T93563: Crash subdividing with overlapping tri and quadCampbell Barton
The first loop was left out when finding the split edge boundary. Error from f2138686d9d8c105ebf8884774fd7e4d8ff239a1.
2021-11-12Merge branch 'blender-v3.0-release'Campbell Barton
2021-11-12Cleanup: remove redundant loop-index accessCampbell Barton
Use a counter for loop indices as they're being iterated in order.
2021-11-10Merge branch 'blender-v3.0-release'Campbell Barton
2021-11-10Fix T92874: Custom normals reset when vertex is deletedCampbell Barton
Storing and restoring custom normals was broken by 39b2a7bb7e815e051348bf5c5ec777d091324164 This also caused "Sharp Edge" option for Weld by Distance to fail, reported as T92875.
2021-11-09Merge branch 'blender-v3.0-release'Campbell Barton
2021-11-09Fix T92384: Wrong UV layers used with Boolean Modifier (Fast Solver)Campbell Barton
Ensure the layers from the source mesh are used instead of the object referenced by the boolean modifier.
2021-11-08Cleanup: avoid error prone struct declarations in C++Campbell Barton
Reference struct members by name instead relying on their order. This also simplifies moving back to named members when all compilers we use support them.
2021-11-08Cleanup: spelling in commentsCampbell Barton
2021-11-03Fix crash dissolving overlapping facesCampbell Barton
In rare cases disolving faces would crash, caused by iterator variable reuse in b29a8a5dfe3d6eb2fbbdecd0d5dffb3d709b9b91.
2021-10-24Cleanup: spelling in commentsCampbell Barton
2021-10-20Cleanup: use elem macrosCampbell Barton
2021-10-20Cleanup: spelling in commentsCampbell Barton
2021-10-03Fix T91810 Bevel not working well with certain unbeveled edge positions.Howard Trickey
A previous commit, c56526d8b68ab, which sometimes didn't drop offsets into 'in plane' faces, as a fix to T71329, was overly aggressive. If all the intermediate edges are in the same plane then it is fine to just put the meeting point on the plane of the start and end edges.
2021-10-03Cleanup: spelling in commentsCampbell Barton
2021-09-28Fix error in previous commitGermano Cavalcante
`v_other` -> `v_step`
2021-09-28Fix flag wrongly set in 'BM_face_split_edgenet_connect_islands'Germano Cavalcante
Sometimes the `use_partial_connect` option could trigger the assert: ``` BLI_assert(!BM_elem_flag_test(l_iter->v, VERT_NOT_IN_STACK)); ``` This can happen when `v_delimit->e` is not part of edgenet, so `v_other` will not have the flag.
2021-09-24Cleanup: spelling in commentsCampbell Barton
2021-09-13Fix T84638: Wrong scale for primitives with radiusFalk David
Creating some primitives allows for a scale value (via python) that will scale the object accordingly. For objects with a radius parameter (like cylinders, spheres, etc.) passing a scale different to (1,1,1) would result in unexpected behavior. For example: `>>> bpy.ops.mesh.primitive_uv_sphere_add(radius=2, scale=(1,1,2))` We would expect this to create a sphere with a radius of 2 (dimensions 4,4,4) and then be scaled *2 along the z-axis (dimensions 4,4,8). But this would previously create a scaled sphere with dimensions (2,2,4). The scale was simply divided by two. Maybe because the "radius" parameter for creating the primitives was confusingly named "diameter" (but used as the radius). The fix adds a scale parameter to `ED_object_new_primitive_matrix` and also renames the wrongly named "diameter" parameters to "radius". Reviewed By: campbellbarton Maniphest Tasks: T84638 Ref D10093
2021-09-04BMesh: optimize edge & face group calculationMikkel Gjoel
This changes the search for unprocessed faces to only search from the previously found face. Local testing on 1.5 million triangle meshes gives a 75x speedup (of the code affected, which is the first half of the work). The former code would traverse all faces of a mesh until a face was found that had not been processed. This ended up being slow mainly because it had to load face-data to determine the state of the flag. Secondarily, the way it iterated and marked the mesh, it would end up traversing all previously processed faces to find and unprocessed one. The same optimization has been made for edge-group calculation. Reviewed By: campbellbarton Ref D12379
2021-08-17Cleanup: unused definesCampbell Barton
2021-08-17Cleanup: replace degenerate check with assertCampbell Barton
Use an assert since this should never happen.
2021-08-13Revert "Mesh: replace saacos with acosf for normal calculation"Campbell Barton
This reverts commit 41e650981861c2f18ab0548e18851d1d761066ff. This broke "CubeMaskFirst" test. Any value even slightly outside the [-1.0..1.0] range caused the result to be nan, which can happen when calculating the dot-product between two unit length vectors.
2021-08-13Mesh: replace saacos with acosf for normal calculationCampbell Barton
The clamped version of acos isn't needed as degenerate (nan) coordinates result in zeroed vectors which don't need clamping.
2021-08-09Fix T90532: Crash editing meshes with auto-smoothCampbell Barton
Caused by fix for T90256 and a misunderstanding in D11928. Don't skip tagging edges when the auto-smooth angle is 180 degrees since this skips topology checks which are needed for properly calculating edge loop normals.
2021-08-05BMesh: support laplacian smooth for n-gonsCampbell Barton
Follow the same logic already used by the modifier.
2021-08-05Cleanup: replace short with boolean for zero area arrayCampbell Barton
Also remove redundant fabsf on the area of a quad/tri & reduce indentation using continue in for loop.
2021-08-05Fix fix invalid index use for edit-mesh laplacian smoothCampbell Barton
Only vertex indices were ensured to be correct.
2021-08-05Fix T89214: Smooth Vertices (Laplacian) produces NaN coordinatesCampbell Barton
Vertices with no connected faces would attempt to divide by the combined face area causing a divide by zero. Use the same weight for wire vertices as vertices connected to zero area faces.
2021-08-05Fix T90256: faces are flat shaded in edit mode with auto smoothCampbell Barton
Regression in 39b2a7bb7e815e051348bf5c5ec777d091324164.
2021-08-04Cleanup: rename restrict to hide/visibility in Object, Collection, MaskLayerBrecht Van Lommel
This makes the internal naming consistent with the public API. And also gives us a visibility_flag rather than restrictflag that can be extended with more flags.
2021-08-04Fix T90421: edit-mode auto-smooth crash when angle set to 180degreesCampbell Barton
Error in 39b2a7bb7e815e051348bf5c5ec777d091324164 which failed to set edge flags with single threaded calculation, used for low poly models.
2021-08-04Cleanup: spellingCampbell Barton
2021-08-03Cleanup: use C++ comments or 'if 0' for commented codeCampbell Barton
2021-08-02Fix T90332: Auto-smooth crashes in edit-modeCampbell Barton
Regression in 39b2a7bb7e815e051348bf5c5ec777d091324164 that meant non-manifold edges were not being tagged when they should have been.
2021-07-30Fix build error in debug builds and uninitialized structsHans Goudey
This BMesh iterator hadn't been used in C++ code yet, and needed a macro for a proper cast. The parameter structs need to be initialized when declared without designated initializers.
2021-07-30Cleanup: spelling in commentsCampbell Barton
2021-07-26Cleanup: spelling in commentsCampbell Barton
2021-07-25Fix T86768, bevel doesn't loop slide sometimes.Howard Trickey
Six years ago, Bug T44961 about unwanted spikes had me not do a loop slide if the angle was too extreme, to avoid unwanted spikes. The current bug showed that that angle was much too big, and limited desired behavior in many cases. Changing the angle from 0.25 radians to 0.0001 radians (about 0.006 degrees) still fixes the original bug and seems very unlikely to be limiting desired behavior now.
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-23Cleanup: de-duplicate code for edge-split taggingCampbell Barton
Share functionality for single and multi-threaded edge-split tagging. Remove logic that ensured vert & loop indices in bm_mesh_edges_sharp_tag (missing from fd9fc809b76d625a1ead6e1fbe5e486cc012f5f3).
2021-07-23Cleanup: remove unused BM_mesh_loop_normals_update functionCampbell Barton
The only difference with BM_loops_calc_normal_vcos was passing in custom coordinates which may be NULL.
2021-07-23Fix error setting sharp edges in recent normal calculation changesCampbell Barton
bm_mesh_edges_sharp_tag was called with setting sharp edges enabled. Error in 39b2a7bb7e815e051348bf5c5ec777d091324164.
2021-07-23Cleanup: remove normal assignment from bm_mesh_edges_sharp_tagCampbell Barton
This was added in 0b7f5813973c515b84cd7c18ef6d7d1e59374237 but seems not to be needed as the assignment was never correct since only one corner on either side of the smooth edge had the vertex normal written to it.
2021-07-23Edit Mesh: multi-thread auto-smooth sharp-edge calculationCampbell Barton
Merge the sharp edge tagging into bm_mesh_loops_calc_normals, this has the advantage that edge tagging can be performed as part of walking over each vertices edges - instead of tagging in a separate loop. Even though this will tag edges twice (once for each vertex), the computation isn't heavy as it's only calculating a dot-product between the two face users to compare the angle. This change combined with 4ba06ad0a8cdec66d9a9cb06f982736d46c40f4c makes BM_loops_calc_normal_vcos around 5.68x faster, with an overall speedup over 2.6x when transforming a high poly mesh. (tested on a system with 32 cores). Reviewed By: mont29 Ref D11970
2021-07-23Edit Mesh: multi-thread auto-smooth & custom normal calculationsCampbell Barton
Supported multi-threading for bm_mesh_loops_calc_normals. This is done by operating on vertex-loops instead of face-loops. Single threaded operation still loops over faces since iterating over vertices adds some overhead in the case of custom-normals as the order used for accessing loops must be the same as iterating of a faces loops. From isolated timing tests of bm_mesh_loops_calc_normals on high poly models, this gives between 3.5x to 10x speedup, with larger gains for meshes with custom-normals. NOTE: this is part one of two patches for multi-threaded auto-smooth, tagging edges as sharp is still single threaded. Reviewed By: mont29 Ref D11928
2021-07-20Cleanup: use single back-tick quoting in commentsCampbell Barton
While doxygen supports both, conform to our style guide. Note that single back-tick's are already used in a majority of comments.
2021-07-20Cleanup: spellingCampbell Barton