Commit Graph

70 Commits

Author SHA1 Message Date
2d1cce8331 Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
6f3e498e7d Cleanup: use of 'unsigned'
- Replace 'unsigned' used on it's own with 'uint'.
- Replace 'unsigned const char' with 'const uchar'.
2020-02-08 01:02:18 +11: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
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
60956397ca Cleanup: BLI_utildefines prefix for header-only libs
This allows to have different macro headers without them sharing
similar names to regular C modules.
2017-09-19 20:16:05 +10:00
89120cd241 bmesh: use 'uint' instead of 'unsigned int'
no functional changes.
2017-05-06 14:19:08 +10: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
8230ea4858 Fix editmesh-connect with adjacent vert selection
The result of running connect wasn't deterministic when adjacent vertices selected.
2014-09-02 16:38:31 +10:00
6b3ec0c515 Fix editmesh-connect with hidden geometry
- ignore hidden faces & verts
- when cutting a pair, select edges co-linear to the cut.

Also support creating a buffer from hidden elem's even if BMO_FLAG_RESPECT_HIDE is enabled.
(if the hflag used includes BM_ELEM_HIDDEN).
2014-09-02 14:35:56 +10:00
f32079d4b9 BLI_stackdefines
Bounds check the stack while debugging, also add STACK_PEEK
2014-06-29 05:57:48 +10:00
c5ccbacdaa move STACK_* macros into BLI_stackdefines.h 2014-06-25 00:01:33 +10:00
a217db0d63 Fix T40297: Crash while ripping an edge when autosmooth is activated.
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-21 22:37:50 +02:00
b12bf2216f Correct last commit, check not to split along edges already used 2014-05-13 18:41:04 +10:00
dd8a9eee3b Fix T40162: Vert connect creates extra face cutting across concave NGon.
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-13 17:56:26 +10:00
46bd759964 Code cleanup: rename BM_face_legal_splits -> BM_face_splits_check_legal 2014-05-13 17:48:25 +10:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
5256a5d66c BMesh: let vert-connect make degenerate faces when only 2 verts selected 2014-03-27 12:52:34 +11:00
ca6d76a915 Code cleanup: double/float 2014-03-19 07:19:43 +11:00
3d031d1f3a BMesh: minor changes for BM_face_split use 2014-03-13 18:41:45 +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
590f58d455 code cleanup: redundant includes and add minor comments. 2013-10-08 20:18:38 +00:00
d7cc2be2b7 add linklist stack macros, use where over allocating an array was previously done. 2013-08-17 05:33:55 +00:00
4982f200fa move alloca define into its own header since its not related to BLI_array 2013-07-28 10:38:25 +00:00
5fac3d9db5 remove bmesh arg from BM_face_legal_splits(), don't use a bmesh iterator. 2013-06-26 20:15:02 +00:00
e4bb913510 Extend existing editmesh connect tool so it can connect across multiple faces.
only use this when 2 vertices are selected, otherwise use the same behavior as before.

This works a little like a fast knife tool, but it only cuts straight lines and doesnt depend on the view-port.

Examples:
- http://www.graphicall.org/ftp/ideasman42/mesh_connect_pair.png
- http://www.graphicall.org/ftp/ideasman42/mesh_connect_pair_curve.png
2013-06-22 17:25:02 +00:00
1014dbaea1 bmesh: replace BLI_array reallocs with alloca, also don't check all faces for connecting verts. 2013-05-25 23:34:25 +00:00
55f929ab3d - add generic edge-loop utility functions for bmesh.
- rewrite bridge tool to use the new functions (using edge & vertex arrays was quite cumbersome).
2013-05-11 14:40:03 +00:00
3d95873cf6 fix [#35257] Brige > Merge sometimes flips result 2013-05-08 23:14:27 +00:00
b1f4e2b4db code comments: bmesh operator doxy header descriptions. 2013-03-30 08:54:50 +00:00
7ec47aa864 code cleanup: shadowing 2013-03-16 14:33:32 +00:00
347e2b6cb0 code cleanup: make bmesh var names more consistent 2013-03-09 17:12:24 +00:00
06b3d4f7bb code cleanup:
- use BM_ITER_* macros in more places.
- avoid sign int conversion when calling EDBM_backbuf_check()
2013-03-09 16:19:07 +00:00
2f53741cfe bridge tool could make bow-tie quads when given 2 isolated edges. 2013-01-30 03:12:19 +00:00
b27854bd47 use booleans for bmesh api. 2013-01-14 16:42:43 +00:00
17c2621fd1 bridge tool - simple optimization, break early if edge loop length comparisons are worse then existing best loop test. 2012-12-03 05:02:32 +00:00
a490f4f7c4 fix [#33391] Bridge two Edgeloops fails in simple case 2012-12-03 04:53:30 +00:00
90666d3436 code cleanup: bmesh operator comments, readying for doc-generation. 2012-11-27 06:53:26 +00:00
dbdc76c9d0 code cleanup: make bmesh operator names more consistant since python has access to these as input arguments and return values.
all output values currently have ".out" suffix, this may go in the future, but for now it makes it clear in C code what are inputs and outputs.
2012-11-20 05:50:19 +00:00
48639af5f8 use input and output slots for bmesh operators, needed for the python api to get return values. 2012-11-19 14:58:31 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
c9c76a9a68 add compiler hints that failing to create a bmesh face is unlikely. 2012-10-01 11:12:49 +00:00
dbeddcdbce style cleanup: also correct incorrect doxy heading 2012-09-26 20:26:31 +00:00
319831d7b8 code cleanup: use an enum for uiBut->pointype (more useful debug display of members),
and rename COL -> COLOR --- less confusing since the layout engine has row/col's.
2012-09-11 23:10:23 +00:00
36797a64a5 code cleanup: use *(*var)[2] for pairs in bmesh code rather then a 1d array stepping by 2. 2012-09-05 23:17:19 +00:00
3da7e0f3bf mesh bridge tool now leaves bridge faces selected. 2012-08-24 17:58:49 +00:00
d3a566457b fix for merged bridge crashing on closed loops (own bug in recent commit) 2012-08-24 16:55:25 +00:00
6e90903baf - add BM_data_interp_from_edges() function (matches BM_data_interp_from_verts).
- bridge-merged now merges edge customdata and flags for verts and edges.
2012-08-23 05:19:40 +00:00
c0c575751d bmesh tool: support for merged-bridge (like bridge, collapsing), with a
factor to blend between loops.
2012-08-23 04:55:59 +00:00