Campbell Barton
33cc5ed495
Cleanup: redundant vars
2015-05-03 06:16:59 +10:00
Campbell Barton
bd5e578804
BMesh: rework BM_vert_is_manifold (simplify logic)
...
- simplify boundary handling (walk from boundary - no need to reset walking)
- early exit when the vert has >2 boundaries
- use BM_vert_step_fan_loop to walk the fan
2015-05-03 04:46:24 +10:00
Campbell Barton
de031b7c89
BMesh: replace radial count with simple checks
2015-05-03 04:41:39 +10:00
Campbell Barton
f283b959e7
BMesh: BM_vert_separate double edge fix
...
Splitting edges could give duplicates.
2015-05-02 16:24:35 +10:00
Campbell Barton
c276cfb3c0
BMesh: return error on mesh validate
2015-05-02 15:52:27 +10:00
Campbell Barton
a5869945c6
Cleanup: bmesh src/dst order in API args
2015-05-02 15:46:03 +10:00
Campbell Barton
5e1c729882
Cleanup: use function attrs for BMesh inline funcs
2015-05-02 15:45:57 +10:00
Bastien Montagne
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
Campbell Barton
f8bdd8e6a8
BMesh: correct bmesh_edge_vert_swap
...
Missed swapping out loops.
2015-05-01 06:51:16 +10:00
Campbell Barton
6111da3629
BMesh: add bmesh_disk_vert_replace
2015-05-01 06:18:04 +10:00
Campbell Barton
3ef27ec807
BMesh: add BM_face_loop_separate_multi
...
New utility function to handle splitting off multiple loops from a face at once.
2015-04-30 06:24:33 +10:00
Campbell Barton
53662bcaf1
BMesh: simplify/optimize loop splitting logic
...
To split off a single loop, was splitting all fans off the vertex, then merging back together (except for one).
Now simply splits off one loop.
2015-04-30 06:24:33 +10:00
Campbell Barton
26541b7488
BMesh: refactor edge-vert swapping into API call
2015-04-30 06:24:32 +10:00
Campbell Barton
67fcb04bbf
BMesh: minor change to swap-vert api
...
- assert if the verts not in the edge (all callers assume success)
- rename to bmesh_disk_vert_swap
- swap src/dst arg order.
2015-04-30 06:24:32 +10:00
Campbell Barton
3acc1ba49c
Add macro BLI_SMALLSTACK_AS_TABLE
...
Use for edge-split (a little less overhead compare to popping each item).
2015-04-29 23:59:48 +10:00
Campbell Barton
7232157357
Correct comment
2015-04-29 20:16:40 +10:00
Campbell Barton
65a9592660
BMesh: optimize edge split
...
Avoid hashing edges when splitting into fans,
Instead, walk & split fans until they're all done, gives approx 40% speedup.
2015-04-29 19:43:32 +10:00
Campbell Barton
179ffefce5
BMesh: replace smallhash flag for checking doubles
2015-04-29 19:43:21 +10:00
Campbell Barton
e1ecd39f0e
BMesh: avoid over-counting vert-edges
2015-04-29 19:42:06 +10:00
Campbell Barton
43616918f3
Cleanup: const correctness
2015-04-28 23:15:48 +10:00
Campbell Barton
7e36c280c2
Cleanup: redundant checks
2015-04-28 16:47:45 +10:00
Campbell Barton
c2f7cffd56
Add inverse-square falloff to bmesh, mask & compo.
2015-04-26 18:31:54 +10:00
Campbell Barton
d33314393e
BMesh: use const for API calls
2015-04-26 17:19:51 +10:00
Campbell Barton
01dda9a434
correct own error in recent ngon creation edit
2015-04-25 21:16:58 +10:00
Campbell Barton
89f5a09ab4
Cleanup: use 8 space indent for multi-line args
2015-04-25 20:15:20 +10:00
Campbell Barton
a7381cca34
BMesh: simplify BM_face_create_ngon
...
Was doing quite a lot of unnecessary steps.
Now construct the sorted verts, edges /w error checking, in a single loop.
2015-04-25 17:26:22 +10:00
Campbell Barton
0626d27bf6
Editmesh select nearest fixes
...
- distance from edge check wasn't clamping 0-1
- vertex bias wasn't taking pixelsize into account.
- index & pass counter were floats
Also some improvements
- use BMesh lookup tables when available.
- use structs to avoid issues getting out of sync.
2015-04-21 01:50:21 +10:00
Campbell Barton
45e929dc12
Cleanup: redundant casts
2015-04-18 00:16:05 +10:00
Campbell Barton
02fba106fa
Dyntopo: save 4 bytes per BMLogVert
2015-04-17 18:07:08 +10:00
Campbell Barton
e05f719b8b
Dyntopo: avoid redundant lookup on original data
2015-04-17 17:34:14 +10:00
Campbell Barton
99299da4b5
Cleanup: warnings, ws
2015-04-16 01:12:22 +10:00
Campbell Barton
240c5704e4
BMesh: Missed normal from example /w skip-cd flag
...
We may still want to use the normal as a reference but skip customdata.
2015-04-15 20:56:11 +10:00
Campbell Barton
d36429b930
initialize members in-order
2015-04-14 18:41:01 +10:00
Campbell Barton
6fb0563aee
BMesh: optimize BM_face_exists
...
Avoid flagging/clearing flags,
just walk over the face until a mismatch is found.
2015-04-14 15:27:08 +10:00
Campbell Barton
690b90f1e2
BMesh: minor optimization counting adjacent data
...
add BM_***_count_is_over(), _count_is_equal()
Useful if we only want to know if the count is a smaller value.
2015-04-12 17:38:14 +10:00
Campbell Barton
6d2c3a2456
BMesh: avoid ghash realloc's making log entry
2015-04-12 17:38:14 +10:00
Campbell Barton
17b4f57bf0
Missed this last commit (dyntopo hashing)
2015-04-12 11:12:57 +10:00
Campbell Barton
ccf44c400c
BMesh: simplify hashing for dyntopo
...
Was using pointer hashing when the keys are in fact uint's.
Since they're well distributed from the rangetree,
no need to do bit-shifting tricks. just use int as hash.
Gives ~8% speedup in own tests.
2015-04-11 23:36:37 +10:00
Campbell Barton
5217d2bc0e
Use BKE_edgehash_ensure_p where possible
2015-04-07 10:53:58 +10:00
Campbell Barton
26e50295ce
Use BKE_ghash_ensure_p where possible
2015-04-06 20:41:37 +10:00
Campbell Barton
4c58cb8bd9
Correct assert
2015-03-16 13:39:27 +11:00
Campbell Barton
7df60becb9
BMesh: Add extended BM_vert_calc_edge_angle that takes a fallback value
2015-03-06 18:45:00 +11:00
Campbell Barton
8c6073db11
BMesh: BM_loop/edge_point_side_of_loop_test
...
change behavior to use a negative number when outside,
and return the signed, squared distance.
2015-03-03 00:26:13 +11:00
Campbell Barton
cdd14ea96d
Cleanup: use bit-shift for bmesh_elem_check
2015-02-24 13:10:15 +11:00
Bastien Montagne
ced19783fd
Fix mismatch (missing 'const' to mactch funcs declarations).
...
Was breaking windows compile, reported by bdancer over IRC, thanks.
Also, quite some annoying 'unused vars' warnings (debug-only vars).
2015-02-23 13:57:02 +01:00
Campbell Barton
7c03ef295b
CustomData: const correctness
2015-02-23 16:17:16 +11:00
Campbell Barton
64b328f22b
Edge/Vert Slide: avoid redundant loop angle calls
...
No need to calculate loop angle for each layer
2015-02-23 15:44:28 +11:00
Campbell Barton
bc876f9ea4
Error in last commit
...
Accidentally left in malloc/free
2015-02-23 15:40:43 +11:00
Campbell Barton
5a372dbd89
Fix error in recent vert/edge-slide commits
...
`CustomData_bmesh_interp_n` was expecting the 'dest' arg not to have its offset applied.
This was a bit confusing since the source args have it applied,
and in some cases we only have the destination with the offset.
2015-02-23 13:57:06 +11:00
Campbell Barton
d580c90469
CustomData: const correctness for interp()
2015-02-23 13:54:33 +11:00