04313f1bb5
BMesh: remove redundant mesh-backups from EDBM_op_* API
...
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-05 18:36:33 +10:00
b29a8a5dfe
BMesh: dissolve faces no longer fails when some faces can't dissolve
...
Previously, any face groups that could not be merged into a face
caused the entire operation to report an error and do nothing.
Now these cases are skipped over, dissolving faces where possible.
2021-07-05 18:31:44 +10:00
76f7b22989
Cleanup: minor improvements to BMesh dissolve faces
...
- Only create arrays with groups of two or more faces.
- Remove raising exception for zero length arrays.
- Remove redundant exception check (assert there is no exception).
- Use a struct for face array & it's length instead of a NULL
terminated array (removes the need to count faces in a loop).
2021-07-05 15:54:57 +10:00
96d487b3ae
Cleanup: remove redundant calls to BMO_error_clear
2021-07-01 17:25:27 +10:00
aaa8ee1307
Cleanup: remove bmesh-operator error code
...
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-01 17:01:19 +10:00
0bac768223
Fix missing NULL checks in adb21faa83
2021-04-15 15:07:36 +10:00
adb21faa83
Fix T70286: Dissolve vertices/edges creates duplicate face
2021-04-15 14:20:21 +10:00
2a14ab998a
Fix T87259: Un-Subdivide creates duplicate faces
...
Add argument to BM_vert_collapse_faces to remove any faces that become
duplicate as result of the collapse.
2021-04-12 14:24:09 +10:00
17e1e2bfd8
Cleanup: correct spelling in comments
2021-02-05 16:23:34 +11:00
2d1cce8331
Cleanup: make format after SortedIncludes change
2020-03-19 09:33:58 +01:00
ee192a35e8
Cleanup: comments (long lines) in bmesh
2019-04-29 22:06:26 +10:00
e12c08e8d1
ClangFormat: apply to source, most of intern
...
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-04-17 06:21:24 +02:00
8d7005d715
Cleanup: style, use braces for bmesh
2019-03-27 17:14:36 +11:00
de13d0a80c
doxygen: add newline after \file
...
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
eef4077f18
Cleanup: remove redundant doxygen \file argument
...
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
65ec7ec524
Cleanup: remove redundant, invalid info from headers
...
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-02-02 01:36:28 +11:00
854db8951b
Cleanup: strip trailing space in bmesh module
2018-06-04 08:49:47 +02:00
342593f124
Cleanup: rename BLI_array_count -> len
...
Match naming convention used everywhere else.
Count should only be used when this isn't directly accessible.
2018-03-15 01:53:20 +11:00
078e012cd9
Cleanup: rename BLI_*_empty() -> clear()
...
Consistent with other BLI API's
2018-02-01 13:40:53 +11:00
89120cd241
bmesh: use 'uint' instead of 'unsigned int'
...
no functional changes.
2017-05-06 14:19:08 +10:00
7fd2efa507
BMesh: Minor improvement to face-join
...
Pass in loops instead of edge & faces.
Nearly all callers have the loop-pairs to pass in.
2016-11-12 10:30:32 +11:00
0a026033ae
BMesh: make toolflags optional
...
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
2016-07-01 19:29:22 +10:00
80b1adf8c2
BMesh: avoid calling delete operator w/ face dissolve
...
In nearly all cases this isn't needed.
2016-05-12 16:47:30 +10:00
544b76ac9c
BMesh: ignore non-manifold face connections
...
Was showing an error message,
now dissolve the faces that and delimit at non-manifold boundaries.
2016-05-12 06:00:05 +10:00
4e500101a7
Cleanup: quiet -Wcomma, cast to void where needed
2016-03-05 09:16:12 +11:00
74d31279cd
Fix T44560: Merge Collapse tool - UVs operator panel option ignored with Collapse but not with other merge types.
...
Was missing parameter for collapse bmesh operator...
2015-05-01 17:10:39 +02:00
9e9cd77b8d
Compiler warning: double-promotion
2015-02-01 01:17:21 +11:00
a71a947c6a
Fix T41568: Dissolve & Tear Boundary Keeps Verts
2014-08-26 13:35:43 +10:00
41c31b8e55
Correction to recent rip-tear
2014-07-24 23:25:01 +10:00
1f55044617
Editmesh: Add option to tear boundary vertices when dissolving
2014-07-24 03:29:17 +10:00
beedb0b274
BMesh: more edits to vertex dissolve, handle mixing wire edges with faces better
2014-06-27 22:06:49 +10:00
d6ab81809e
BMesh: tweaks to dissolve, remove wire edges before other calculations
...
also avoid feedback loop when checking topology giving nondeterministic results.
2014-06-27 20:28:36 +10:00
e947dd8cd7
BMesh: add BM_vert_is_edge_pair(), faster then checking (BM_vert_edge_count(v) == 2)
2014-06-27 20:28:32 +10:00
c3deb16c16
BMesh: add ability not to delete vertex when collapsing
2014-06-27 20:28:02 +10:00
2aca720bff
Fix T40813: Dissolve verts with adjacent regions, removes the dividing edge
2014-06-27 05:39:39 +10:00
0ea7302349
Fix for dissolve faces iterating over verts while removing
2014-06-26 23:29:45 +10:00
cc7cfd6617
Mesh Tool: removes degenerate edges, faces and face ears.
2014-02-17 11:41:19 +11:00
04a902965e
BMesh optimize face splitting by taking loops rather then verts
...
- add BM_vert_pair_share_face
- add BM_loop_is_adjacent
- remove BM_verts_connect
2013-12-24 11:13:58 +11:00
283f43d31a
Fix T37559: Crash dissolving vertices in some situations
2013-11-22 19:42:14 +11:00
51f7f82a42
fix crash in editmesh edge-dissolve, when 2 faces shared multiple edges, freed edges would be checked.
2013-10-03 15:29:08 +00:00
6b2e563924
yet another instance dissolve deletes verts it loops over.
2013-10-03 10:50:03 +00:00
5b5bc63396
fix [ #36923 ] Merge / Delete vertices crashes for some meshes
...
add BM_ITER_MESH_MUTABLE which steps before entering the for() loop body and prevents the assert from complaining about removing mesh data while iterating as well as the crash.
this was done in quite a few areas, more may turn up.
2013-10-03 07:06:56 +00:00
6cba2b8d73
move bmesh tools into their own include,
...
changes to tool args would rebuild far too many files and these are mainly by modifiers outside of bmesh.
2013-08-23 04:22:07 +00:00
5fafc222f0
style cleanup
2013-08-17 08:21:40 +00:00
72f2917032
bmesh: skip error checks when building in release mode (minor speedup),
...
also more strict use of BLI_array_declare(), only allow after array is declared.
2013-07-28 09:05:27 +00:00
3270031660
correct problem with limited-dissolve not leaving the selection correctly (caused by BM_elem_attrs_copy no longer dealing with selection)
2013-07-25 06:05:44 +00:00
6664d1bf59
remove 'dissolve_edge_loop' bmesh operator, edgeloop dissolve replaces this now.
2013-06-14 04:04:35 +00:00
b913385e32
bmesh edge dissolve: add option use_face_split (matching vertex dissolve option),
...
useful to avoid odd shaped ngons surrounding dissolved edges.
2013-06-14 02:30:40 +00:00
790e9d9fa0
fix [ #35311 ] Planar Decimate / Limited Dissolve fails to merge some adjacent faces
...
optionally limit by face flipping, also added support to delimit by material and edge crease.
2013-06-03 05:07:16 +00:00
6f8c29ab0b
fix for 2 errors introduced since release
...
- shape key NULL pointer dereference.
- use uninitialized variable for bmesh free.
also update credits and merge dissolve flag assignment.
2013-05-09 07:02:51 +00:00