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-07-16Cleanup: sort struct declarationsCampbell Barton
2021-06-05Edit Mesh: partial updates for normal and face tessellationCampbell Barton
This patch exposes functionality for performing partial mesh updates for normal calculation and face tessellation while transforming a mesh. The partial update data only needs to be generated once, afterwards the cached connectivity information can be reused (with the exception of changing proportional editing radius). Currently this is only used for transform, in the future it could be used for other operators as well as the transform panel. The best-case overall speedup while transforming geometry is about 1.45x since the time to update a small number of normals and faces is negligible. For an additional speedup partial face tessellation is multi-threaded, this gives ~15x speedup on my system (timing tessellation alone). Exact results depend on the number of CPU cores available. Ref D11494 Reviewed By: mano-wii
2021-06-01Cleanup: split bmesh tessellation into it's own fileCampbell Barton
Prepare for further refactoring for these functions.
2021-06-01BMesh: remove checks for tessellating 2 sided facesCampbell Barton
2 sided faces aren't supported and will cause problems in many areas of Blender's code. Removing (implied) support for faces with fewer than 3 sides means the total number of triangles is known ahead of time. This simplifies adding support for multi-threading and partial updates to an existing tessellation - as the face and loop indices can be used to access the range of triangles associated with a face. Also correct outdated comments.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-04-06Fix displaying edit-mesh measurements with deform modifiersCampbell Barton
Resolves regression from 2.7x
2019-08-08BMesh: add utility to calculate normal from a vertex cloudCampbell Barton
Extract from BM_verts_sort_radial_plane & simplify.
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-11BMesh: Add BM_face_calc_area_uvClément Foucault
2018-12-14Merge branch 'master' into blender2.8Campbell Barton
2018-12-14Cleanup: naming (mean -> median) see T47811Campbell Barton
2018-11-10BMesh: backport minor changes from 2.8Campbell Barton
2018-11-10BMesh: avoid incorrect/invalid matrix calculationCampbell Barton
- `BKE_object_scale_to_mat3` was used to get the worldspace scale, without taking constraints, parenting etc into account. - Don't pass object's into BMesh API, (prefer matrices instead). - Avoid matrix invert for each edge-angle calculation. - Avoid 2x matrix multiplies when looping over edge pairs.
2018-11-09Multi-Objects: MESH_OT_select_similar worldspace completionHabib Gahbiche
This makes the operator to work 100% with worldspace similarity: * SIMFACE_PERIMETER * SIMFACE_AREA * SIMEDGE_FACE_ANGLE Note from revisor (Dalai Felinto): I'm not sure we want to pass Object * to the bmesh api, though I personally don't see why not. Either way I group the patches together so we can more easily roll them back if needs be. Maniphest Tasks: T56948 Differential Revision: D3908, D3899, D3896
2017-11-20UV Cube Project: improve default behaviorCampbell Barton
- initialize the cube-size from the bounding box when it's not set. - no longer wrap faces to keep in 0-1 bounds, other projection methods don't do this and calculating the scale prevents the UV's from being too far outside the view.
2017-10-22Polyfill Beautify: half-edge optimizationCampbell Barton
Was using an edge hash for triangle -> edge lookups, updating triangle indices for each edge-rotation. Replace this with half-edge which can rotate edges much more simply, writing triangles back once the solution has been calculated. Gives ~33% speedup in own tests.
2017-09-14Fix T52291: Boolean fails w/ co-linear edged ngonsCampbell Barton
This means boolean tessellation wont match viewport tessellation however it's needed to avoid zero area triangles causing problems.
2017-05-06bmesh: use 'uint' instead of 'unsigned int'Campbell Barton
no functional changes.
2016-06-12bmesh py api: expose BM_face_calc_tangent_*Campbell Barton
D1988 by @wisaac, with own edits and improvements. This improves on existing tangent calculation functions too. - BM_face_calc_tangent_auto: Chooses method based on number of sides, used by manipulator (not exposed to Python). - BM_face_calc_tangent_edge: from longest edge. - BM_face_calc_tangent_edge_pair: from longest edge-pair (most useful with quads). - BM_face_calc_tangent_edge_diagonal: edge farthest from any vertex. - BM_face_calc_tangent_vert_diagonal: vert farthest from any vertex. Also optimize BM_vert_tri_calc_tangent_edge* functions to avoid sqrt.
2016-03-14Fix T47788: Symmetrize flips multi-res dataCampbell Barton
Symmetrize was unusable with multi-res data, add an option for the bmesh operator not to flip the multi-res depth.
2016-01-14Cleanup: use BM_mesh_* prefix for BMesh functionsCampbell Barton
2015-11-27BMesh: Add API call BM_face_calc_point_in_faceCampbell Barton
Was local to knife code, but this is generally useful.
2015-11-05Fix T46692: Triangulate creates duplicate facesCampbell Barton
Caused a crash in dyntopo.
2015-11-03BMesh: inline vert-loop iteration for normal calcCampbell Barton
Calculating normals is called often (sculpting for eg), so avoid using high-level iterator here.
2015-11-03Cleanup: use 'const' for BMesh checking funcsCampbell Barton
2015-04-25Cleanup: use 8 space indent for multi-line argsCampbell Barton
2015-02-02BMesh: tool to ensure all faces are convexCampbell Barton
Access from Mesh -> Cleanup
2014-12-09Fix T42630: Triangulate returns invalid face-mapCampbell Barton
Triangulate with beautify caused a bug when there were existing edges could make the bmesh-operator return an invalid face-map. Now the beauty is calculated on the 2d-tri's resulting from polyfill, its simpler and faster.
2014-12-09Cleanup: remove scanfill define for polyfill codeCampbell Barton
also rename vars which were previously used for scanfill.
2014-11-13BMesh: shrink/fatten faces-normals in face modeCampbell Barton
nice for solid-modeling, gives better results for partial selections.
2014-09-11Fix non-deterministic editmesh normal orientationsCampbell Barton
- selecting a boundary edge would randomly point in/outside the face (now point away). - selecting 3 verts would use the first selected edge as the tangent (now use longest). - selecting 1 vert betweem edges, uses the edges to define the tangent.
2014-05-22Fix T40297: Crash while ripping an edge when autosmooth is activated.Bastien Montagne
Turned out there was still quite a few cases were indices were set dirty, but elem_index_dirty was not tagged accordingly (mostly for BM_LOOP, but a few others as well). So probably this crash was not the only one hidden here. Hopefully all possible cases were catched this time!
2014-05-13Fix T40162: Vert connect creates extra face cutting across concave NGon.Campbell Barton
We need to support cutting degenerate ngons, see: T39418 This commit disallows cuts across faces where the same vertices can create better cuts on different faces.
2014-05-13Code cleanup: rename BM_face_legal_splits -> BM_face_splits_check_legalCampbell Barton
2014-05-13BMesh: make BM_face_calc_normal_subset apart of the bmesh apiCampbell Barton
also make face normal calculation functions return normal length
2013-12-02Fix for triangulate and beauty-fillCampbell Barton
- could crash if triangulate attempted to create an existing face. - tagging edges to rotate was unreliable, don't do this anymore. now check if edge is in the array passed to the beauty function.
2013-11-30BMesh/Mesh: replace scanfill with polyfillCampbell Barton
2013-11-18Compile Fix: fix for gcc4.8 with bmesh header.Campbell Barton
2013-11-18BMesh Refactor: BKE_bmbvh_new can now be created without an EditMesh.Walid Shouman
This adds BM_bmesh_calc_tessellation() so we can get triangles from a bmesh without having to have an editmesh available.
2013-10-29Triangulate Modifier: using different ngon and quad methodsDalai Felinto
Quads: Beauty, Fixed, Fixed Alternate, Shortest Diagonal Ngons: Beauty, Scanfill * Shortest Diagonal is the default method in the modifier (popular elsewhere), but beauty is the default in Ctrl+T). * Remove the need for output slot and beauty operator to be called after Clt+T Patch with collaborations and reviewed by Campbell Barton
2013-10-08Triangulate Modifier changes - using scanfillDalai Felinto
The ear loop method is potentially too slow (OˆN). We are not using the 'beauty' option at the moment. I'll incorporate that next. (and later specific methods for quad splitting) Patch done in collaboration (and reviewed by) with Campbell Barton.
2013-09-06bmesh utility functions BM_face_as_array_loop_tri, BM_face_as_array_loop_quadCampbell Barton
also set attributes for the header and remove debug print in mask.c
2013-09-01Move GCC attributes into a centraized definesSergey Sharybin
Instead of having ifdef __GNUC__ all over the headers to use special compiler's hints use a special file where all things like this are concentrated. Makes code easier to follow and allows to manage special attributes in more efficient way. Thanks Campbell for review!
2013-08-03code cleanup: bmesh use 'const' for query functions.Campbell Barton
2013-07-22optimization: lazy initialize EditDerivedBMesh members vertexNos, polyNos.Campbell Barton
also add polyCos array which cache's face centers, gives overall ~20% speedup to drawing on a high-poly mesh in face-editmode.
2013-06-27BM_face_legal_splits - perform calculations in 2d (was using 3d vectors for ↵Campbell Barton
all 2d operations)