Bastien Montagne
0af11a1742
Make use/computation of lnors consistant.
...
Issue was, when requesting (building) lnors for a mesh that has
autosmooth disabled, one would expect to simply get vnors as lnors.
Until now, it wasn't the case, which was bad e.g. for normal projections
of loops in recent remap code (projecting along split loop normals
when you would expect projection along vertex normals...).
Also, removed the 'angle' parameter from RNA's `mesh.calc_normals_split`.
This should *always* use mesh settings (both autosmooth and smoothresh),
otherwise once again we'd get inconsistencies in some cases.
Will update fbx and obj addons too.
2015-01-19 15:51:20 +01:00
Campbell Barton
a97c5d1f9f
Fix T42459: Knife fails at small scale
...
Occluding geometry failed when near overlapping (or cutting small objects).
2015-01-14 01:36:03 +11:00
Campbell Barton
bd00770715
Cleanup: consistent arg order in bmesh
2015-01-14 01:36:03 +11:00
Campbell Barton
3debcc8b51
Math Lib: improve area calculation
...
- area_quad_v3 now works correctly with concave quads.
- add area_squared_*** functions, to use when comparing to avoid a sqrt().
2015-01-13 19:10:15 +11:00
Campbell Barton
aab4f2b762
cleanup: redundant casts & const cast correctness
2015-01-01 23:42:28 +11:00
Bastien Montagne
c79c48cc93
Fix T40930: Add a new option to select faces by smooth/flat shading.
...
Org code by robschia (Roberto Schiavone), first review by campbellbarton (Campbell Barton),
final review and minor changes by mont29 (Bastien Montagne).
Reviewers: cambellbarton, mont29
Subscribers: mont29, campbellbarton
Maniphest Tasks: T40930
Differential Revision: https://developer.blender.org/D638
2014-12-28 19:08:43 +01:00
Campbell Barton
a56e31c89c
Fix triangulating concave quads
...
Resulting triangles could be pointing in opposing directions.
2014-12-17 11:34:16 +01:00
Campbell Barton
b04d2f99f2
Fix T42927: Triangulate-beauty fails on quads
...
Regressions since 2.69.
2014-12-17 10:09:47 +01:00
Campbell Barton
a5c3de2e49
Fix T42630: Triangulate returns invalid face-map
...
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-09 13:08:28 +01:00
Campbell Barton
6076bedec0
Cleanup: remove scanfill define for polyfill code
...
also rename vars which were previously used for scanfill.
2014-12-09 12:19:26 +01:00
Campbell Barton
3e7e97f127
BMesh: ensure iterator macros assign to valid types
...
note, this is for C++ code which expects a cast, (will be added later)
also add a macro for nop-expressions (EXPR_NOP),
when we never want an expression to be evaluated, but it should still be valid.
2014-12-08 10:54:56 +01:00
Campbell Barton
a5cd6a029f
Cleanup: style & de-duplicate
2014-12-02 10:30:29 +01:00
Campbell Barton
0154096fd5
Cleanup: unused headers
2014-11-28 23:12:12 +01:00
Campbell Barton
591eb27efa
BMesh: check for loop side-of-loop & side-of-edge
2014-11-21 14:16:35 +01:00
Campbell Barton
46e2d5ee41
Cleanup: typo
2014-11-21 14:16:35 +01:00
Bastien Montagne
b7f5ab0cd3
ShapeKeys: Add BKE_keyblock_is_basis to check whether a given keyblock is used a basis by others.
...
Also fix stupid debug-only error in previous commit.
2014-11-17 11:19:54 +01:00
Campbell Barton
902ba7b25c
Cleanup: use SUBD_CORNER_* prefix for Subdiv flags
2014-11-16 15:46:30 +01:00
Campbell Barton
7d040d2a08
Cleanup: use BLI_listbase_*** prefix for count,sort,sort_r
2014-11-16 13:57:58 +01:00
Campbell Barton
1ddfe6676d
BMesh: shrink/fatten faces-normals in face mode
...
nice for solid-modeling, gives better results for partial selections.
2014-11-13 16:41:56 +01:00
Campbell Barton
a081a4817c
Editmesh: select more/less can now step over adjacent faces
...
This keeps a square shaped selection when using grid topology.
2014-11-06 15:35:46 +01:00
Campbell Barton
5e0e175422
Cleanup: spelling (D831)
2014-11-03 23:28:16 +01:00
Campbell Barton
d57ce42dfa
BMesh: arg reorder
2014-11-03 08:30:54 +01:00
Campbell Barton
b7174c9320
Fix connect-vertices failing for concave ngons
...
Also add:
- generic callback for bmesh elements.
- ability to pass an existing array to a bmesh operator.
2014-11-02 00:09:14 +01:00
Campbell Barton
133f79e449
Cleanup: warnings, typos
2014-10-29 14:15:21 +01:00
Bastien Montagne
a62b806d70
Fix T42145: EditMesh Bevel tools had no clamping option.
...
Missing feature already present in Bevel modifier, useful and rather simple to add.
2014-10-08 16:42:41 +02:00
Campbell Barton
a8705e99ee
Sculpt: minor speedup for dyntopo
...
Add retake to range-tree to avoid double lookup.
2014-10-07 21:02:08 +02:00
Campbell Barton
5e809c45ed
Fix T4199: Knife holes in concave ngons failed
...
BM_face_point_inside_test assumed the face center was inside the face.
2014-10-07 10:09:19 +02:00
Campbell Barton
9cfcddc8f4
Dyntopo: minor speedup collapsing edges
2014-10-06 12:16:06 +02:00
Campbell Barton
5b027bd6dd
Cleanup: remove smooth_ from 'smooth_factor'
...
redundant, just call factor as smooth modifier does.
2014-09-29 15:48:51 +10:00
Bastien Montagne
da78dd78be
Fix T25582: Add a 'smooth factor' to smooth_vertex BMesh op.
...
Based on code by wahooney (Keith Boshoff), patch itself was merely rewritten due to BMesh changes...
2014-09-28 20:00:54 +02:00
Campbell Barton
07d161bb38
Comments: update for changed args
2014-09-28 19:19:58 +10:00
Campbell Barton
51d99ebf01
BMesh: type-check iterator data argument
2014-09-25 14:14:52 +10:00
Campbell Barton
d0bd474375
Custom Data API: redundant pointer-to-pointer arg
2014-09-24 18:50:29 +10:00
Campbell Barton
ff0b24c4e2
BMesh: slight speedup loop-of-verts iterator
2014-09-24 18:45:23 +10:00
Campbell Barton
3c0605c0ef
BMesh: generic callbacks for mempool iterator
2014-09-24 14:55:30 +10:00
Campbell Barton
e7f495d8a0
Cleanup: bool
2014-09-24 14:55:01 +10:00
Campbell Barton
87208fa699
Fix for edge-order flipping on subdividing wire
...
Extruding a subdivided edge would create flipped faces.
2014-09-18 13:39:10 +10:00
Campbell Barton
149ca1320b
Fix non-deterministic editmesh normal orientations
...
- 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-09-11 18:31:02 +10:00
Campbell Barton
652eaf7723
Fix for mesh-inset modifying hidden faces
2014-09-10 16:02:24 +10:00
Campbell Barton
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
Campbell Barton
39c7ccca1e
BMesh: report errors for invalid operator use
...
- invalid htype's into a slot
- duplicate htype's args to BMO_op_vinitf
2014-09-02 13:57:39 +10:00
Campbell Barton
47ad1a9720
Comments
2014-08-26 15:21:12 +10:00
Campbell Barton
ca1bca442a
Fix T40993: Store selection history for extrude
2014-08-25 16:57:38 +10:00
Campbell Barton
470e694652
BMesh: New operator flag not to clear history
2014-08-25 16:42:27 +10:00
Campbell Barton
28a08e7ae6
Cleanup: BMesh arg name
2014-08-22 16:16:19 +10:00
Campbell Barton
dece09d827
BMesh: add assert for correct args to creation functions
2014-08-21 13:08:13 +10:00
Campbell Barton
90e1746d89
BMesh: correct flag use
...
Allowed fill to make duplicate faces
2014-08-21 13:08:13 +10:00
Campbell Barton
7bca8be24d
BMesh: improve docs for BM_edge_split
2014-08-20 12:44:11 +10:00
Campbell Barton
4795b61c1b
Cleanup: assert / warn
2014-08-18 16:05:06 +10:00
Campbell Barton
baea85b449
BMesh: add BM_vert_splice_check_double
...
checks if splicing verts creates duplicate edges
2014-08-18 15:59:14 +10:00