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-08-16Cleanupsoc-2021-porting-modifiers-to-nodes-extrude-and-moveFabian Schempp
2021-08-16Geometry Nodes: Mesh ExtrudeFabian Schempp
Node that extrudes vertices, edges and Faces. Uses the corresponding bmesh operator. I renamed D12108, which was previously named Mesh Extrude to Mesh Inset, because that uses the bmesh inset operators. NOTE: This requires an update of the attribute interpolation to work, that is not yet in master. Part of the GSOC 2021 Differential Revision: https://developer.blender.org/D12224
2021-08-15Merge branch 'master' into soc-2021-porting-modifiers-to-nodes-extrude-and-moveFabian Schempp
# Conflicts: # source/blender/blenkernel/BKE_node.h
2021-08-14Changes based on review by Hans Goudey (HooglyBoogly)Fabian Schempp
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-06Merged MasterFabian Schempp
2021-08-06added side selection.Fabian Schempp
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-03Merge branch 'master' into soc-2021-porting-modifiers-to-nodes-extrudeFabian Schempp
2021-08-03Cleanup: use C++ comments or 'if 0' for commented codeCampbell Barton
2021-08-02Geometry Nodes: ExtrudeFabian Schempp
Differential Revision: https://developer.blender.org/D12108
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-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
2021-07-16Cleanup: sort struct declarationsCampbell Barton
2021-07-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-14Cleanup: use BMLoop.next/prev for BMesh auto-smooth logicCampbell Barton
Use more direct access to next/previous vertices. - `BM_edge_other_vert(l_curr->e, l_curr->v)` -> `l_curr->next->v`. - `BM_edge_other_vert(l_curr->prev->e, l_curr->v)` -> `l_curr->prev->v`. Add asserts to keep the intention clear.
2021-07-13Cleanup: replace BKE_customdata.h in BKE_editmesh.hCampbell Barton
Only DNA_customdata_types.h is needed for BMEditMesh.
2021-07-11Cleanup: correct spelling in comments, remove profanityCampbell Barton
2021-07-07Cleanup: update filename referencesCampbell Barton
2021-07-06Cleanup: rename 'count' to 'len'Campbell Barton
Reserve the term count for values that require calculation (typically linked lists).
2021-07-05BMesh: remove redundant mesh-backups from EDBM_op_* APICampbell Barton
Using BMesh operators through the edit-mesh API created a full copy of the mesh so it was possible to restore the mesh in case one of the operators raised an error. Remove support for automatic backup/restore from the EDBM_op_* API's as it adds significant overhead and was rarely used. Operators that need this can use the BMBackup API to backup & restore the mesh in case of failure. Add warning levels to BMO_error_raise so operators can report problems without it being interpreted as a request to cancel the operation. For high-poly meshes creating and freeing a full copy is an expensive operation, removing this gives a speedup of ~1.77x for most operators except for "connect_verts" / "connect_vert_pair" which still uses this functionality.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-01Cleanup: remove bmesh-operator error codeCampbell Barton
The error codes could be used to look up messages from a table of messages however this wasn't especially useful. Now all calls to BMO_error_raise must inclue a message.
2021-07-01Cleanup: split normal calculation into it's own fileCampbell Barton
Normals now includes many functions including normal splitting & custom normal manipulation split this into it's own file to centralize related functions.
2021-06-28Cleanup: update commentsCampbell Barton
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-26Edit Mesh: optimize common use-cases for partial updatesCampbell Barton
Skip updating normals & tessellation for contiguous geometry regions for operations such as translate & uniform scale. This means when all geometry is selected, no updates are needed as the relative locations of vertices aren't being modified. Performance: As this is skipping a multi-threaded operation, larger improvements are noticeable on systems with fewer cores. - ~1.15x to ~1.3x overall gain for 32 cores. - ~1.7x to ~2.2x overall gain for 1 core (limited using `-t 1` argument). Details: - Rotate & non-uniform scale only skip tessellation. - Proportional editing and axis-mirror have special handling ensure geometry is properly grouped before considering a face part of a single group that can be skipped. - Loose vertices always need their normals to be recalculated since they're calculated based on the location. - Non-affine transform operations such as shrink-fatten & bend, don't take advantage of this optimization. - Snap projection also disables the optimization.
2021-06-26BMesh: skip partial updates when there is nothing to doCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-21Performance: Flush selection to edges/faces.Jeroen Bakker
This patch uses threading to flush selection from verts to edges and from edges to faces. The solution is lockless and should scale well on modern CPU architectures. Master:{F10185359} Patch:{F10185361} End user performance went from 3.9 to 4.6 FPS (Stanford Dragon) but that was measured on a Intel Core i7-6700 CPU and AMD RX480 Gpu. The more cores the better improvements you get. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11644
2021-06-21Fix T89271: Selecting all vertices doesn't select all edges.Jeroen Bakker
Mistake in recent commit {rBea4309925f1d2d2a224bd1dce12269a58ade9b62}.
2021-06-20Mesh: minor optimization to concave quad check for tessellationCampbell Barton
Use the face normal (when available) for a faster concave quad test.
2021-06-18Fix T89261: Crash when calculating bmesh tessellationGermano Cavalcante
Error passing `false` instead of a `BMeshCalcTessellation_Params` struct.