Campbell Barton
14ab39c5e0
minor improvements
...
- calc normals only check flag when needed.
- keymap, dont get name unless its needed.
- keymap, avoid property lookup.
- idprop debug print, include pointer, helpful for troubleshooting.
2013-07-09 00:13:17 +00:00
Campbell Barton
27734f5bec
fix/improve normal calculation, noticed when checking on the previous bugfix.
...
- normals depended on the meshes rotation, so you could rotate Suzzane and in some cases one of the eye normals would be flipped.
- normals depended on the meshes placement in relation to the meshes center, now find the outer most face by each face-island center.
2013-07-08 13:30:11 +00:00
Campbell Barton
61bbefe40d
remove unused normal-recalc flags.
2013-07-08 08:56:46 +00:00
Campbell Barton
0d18f1829a
fix [ #35989 ] bridge tool flip mash
...
open edge loops were calculating flipping incorrectly.
2013-07-05 08:45:42 +00:00
Campbell Barton
02002c2394
fix [ #36014 ] Individual Origin Translation across Normal Orientation doesn't work properly.
...
makes boundary edges use predictable orientation.
2013-07-05 05:52:49 +00:00
Campbell Barton
73d32fdcc2
add type checking assert in bmesh operator iterator.
2013-07-01 07:12:05 +00:00
Campbell Barton
329b832dc2
BM_face_legal_splits - perform calculations in 2d (was using 3d vectors for all 2d operations)
2013-06-26 21:47:08 +00:00
Campbell Barton
56a47b6114
avoid calling axis_dominant_v3_to_m3 twice from BM_face_legal_splits
2013-06-26 21:17:10 +00:00
Campbell Barton
5fac3d9db5
remove bmesh arg from BM_face_legal_splits(), don't use a bmesh iterator.
2013-06-26 20:15:02 +00:00
Campbell Barton
c0c9f5386b
fix [ #35507 ] BMesh module: Crash on to_mesh() if faces.layers.tex is used but no loops.layers.uv
2013-06-26 04:17:41 +00:00
Campbell Barton
fad1da062d
correct typos in comments.
2013-06-25 22:58:23 +00:00
Campbell Barton
781184562b
add api calls for BM_mesh_active_vert/edge_get.
...
inspecting the edit-selection inline was cumbersome.
2013-06-24 04:51:56 +00:00
Campbell Barton
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
Campbell Barton
d54d00ef84
Remove paranoid null checks for editmesh EDBM_vert_at_index and friends (use asserts instead).
...
temp set BM_OMP_LIMIT to zero for better testing before release.
2013-06-19 18:59:54 +00:00
Campbell Barton
6664d1bf59
remove 'dissolve_edge_loop' bmesh operator, edgeloop dissolve replaces this now.
2013-06-14 04:04:35 +00:00
Campbell Barton
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
Campbell Barton
cda5770160
code cleanup: also fix crash in GPU_state_print(). and confine to debug mode builds.
2013-06-13 11:59:28 +00:00
Sergey Sharybin
e895c8302e
Use OpenMP threads in bm_loop_interp_mdisps
...
Gives approx 2x speedup on my laptop on such operations
as mesh subdivision in edit mode. Desktops with fancier
CPUs could benefit even more.
Thanks Campbell for review!
2013-06-11 09:14:39 +00:00
Sergey Sharybin
401eaa448b
Fix for distortion happens when flipping mesh normals
...
Issue was caused by missing X/Y displacement components
flip when flipping the normals (flipping the normals changes
the tangent space apparently and displacement vectors need
to be modified to correspond to new space).
Reported by Jonathan Williamson in IRC.
2013-06-11 08:06:59 +00:00
Campbell Barton
501f655503
fix [ #35648 ] Loop cut, smoothness showing wrong symmetrical
...
this is more of a feature request then a bug, but nicer to use even smoothing offset for loopcut smoothing.
2013-06-10 04:33:05 +00:00
Campbell Barton
4835f63be2
fix issue with new bridge tool interpolation [ #35636 ]
2013-06-05 21:31:01 +00:00
Campbell Barton
d1e78aa75d
fix for own error in recent bridge changes, make sure normals are calculated before use.
2013-06-04 17:46:19 +00:00
Campbell Barton
48fd740096
edit-mesh improvements to select shortest path
...
- Ctrl+RMB only worked for edges & faces
- Menu item 'Select Shortest Path' only worked for vertices.
Now Ctrl+RMB works for vertices and the menu item works for verts/edges/faces (depending on the current selection).
2013-06-04 01:23:51 +00:00
Campbell Barton
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
Campbell Barton
dfad9b0c09
fix [ #35555 ] Collada: export destroys mesh in some cases
...
add arguments to calculate normals when converting to bmesh:
BM_mesh_bm_from_me, DM_to_bmesh
This gives some speedup to undo (which didnt need to re-calculate vertex normals), and array modifier which doesnt need to calculate face normals at all
2013-06-02 23:20:49 +00:00
Campbell Barton
99b55ef6eb
add asserts when scanfilling or triangulating with zero length normal.
2013-06-02 22:54:00 +00:00
Campbell Barton
db42a596aa
fix [ #35578 ] New bridge tool; bowtie crossing when destination edges form one half of an 'X'
2013-05-31 15:48:42 +00:00
Campbell Barton
638c021039
tweak to edge-loop select, so loop selecting a side of a subdivided triangle selects all edges along one side.
2013-05-30 21:39:12 +00:00
Sergey Sharybin
9e05f6571f
Make sure bool will always have the same size in C and C++
...
There were an issues with data structures defined in headers
and being used by both C and C++ on systems with stdbool
unavailable.
This happened because bool in this case will be defined as
unsigned int, which is 4 bytes. But C++'s bool is only 1
byte and this lead to alignment issues.
Now bool is always 1 byte, also made sure there's no situation
like bool foo = BitField & BitFlag, which could give overflow
issues. Use (BitField & BitFlag) != 0 instead.
Fixes #35553 : Compositor broken (Backdrop & Preview)
2013-05-29 11:49:39 +00:00
Campbell Barton
88d385ef70
fix [ #35509 ] MedianPoint choice has bad normals
2013-05-28 15:08:13 +00:00
Campbell Barton
5e347c4f71
code cleanup: typos
2013-05-26 12:02:29 +00:00
Campbell Barton
b2f1720d41
bmesh: copy function - replace use of array reallocations with alloca in a static function.
2013-05-25 20:47:06 +00:00
Campbell Barton
78c35c7720
bmesh: optimize iterator size using a union for iterator specific data.
...
on 64bit system reduces the struct to 64bytes, was 120, also avoids initializing unused values.
2013-05-25 09:46:28 +00:00
Ton Roosendaal
ec834f8234
Bug fix, IRC report.
...
Mesh with very strange topology makes loop-select (ALT+select) crash.
Missing NULL check for do-while loop that can return NULL.
For Campbell: here's the file to check: http://www.pasteall.org/blend/21576
2013-05-23 16:01:25 +00:00
Campbell Barton
0ff22044cd
Support for bridge tool subdivisions, smoothing and shape along the profile.
...
also added the underlying subdivision as a standalone operator in the edge menu, named: subdivide edge-ring.
http://www.graphicall.org/ftp/ideasman42/bridge_subd.png
2013-05-23 06:19:04 +00:00
Campbell Barton
aa0caa448e
utility bmesh functions, for edge loop creation, optionally pass array BM_edge_split_n() to get verts created.
2013-05-22 06:00:26 +00:00
Campbell Barton
b73c821b5d
fix for BM_mesh_edgeloops_find(), could give edge loops with one vert. (caused bridge to crash sometimes)
2013-05-17 12:11:34 +00:00
Campbell Barton
fbf890200c
fix for crash in grid-fill where it was possible for rail edges to overlap.
2013-05-16 15:28:57 +00:00
Campbell Barton
1df12416ca
bmesh, grid fill tool.
...
This uses 2 edge loops and fills them with a grid, taking into account curvature of surrounding edges.
Access from face menu: Ctrl+F,G
http://www.graphicall.org/ftp/ideasman42/grid_fill.png
2013-05-15 20:34:40 +00:00
Campbell Barton
cd089ea321
bmesh edgeloop utility function, calculates an edge loop from 2 verts (start and endpoint).
2013-05-15 06:27:48 +00:00
Campbell Barton
5888830acb
tweak to r56784, no functional change, utility function worked confusingly.
2013-05-14 06:10:26 +00:00
Campbell Barton
3b8b62ea4e
fix for problem where edge loop select would select too many vertices (extend selection too far),
...
before & after: http://www.graphicall.org/ftp/ideasman42/edgeloop_select_fix.png
2013-05-14 04:55:21 +00:00
Campbell Barton
b31e03fdd1
refactor bmesh edge loop walker,
...
was getting too complicated handing different cases at once, split out boundary case into its own branch.
2013-05-14 04:09:02 +00:00
Campbell Barton
c838b2d2a7
bmesh api: add 'is_boundary' attribute to verts.
2013-05-14 02:56:24 +00:00
Campbell Barton
92da9792fe
fix for strange behavior with loop select involving ngons,
...
when selecting a loop with quads on one side an ngon on another - never select the outer boundary edge of the ngon.
2013-05-13 17:42:27 +00:00
Campbell Barton
f4bb0a7412
code cleanup: remove duplicate calls to 'BMW_current_state'
2013-05-13 16:35:28 +00:00
Campbell Barton
281c1565b9
remove BLI_array use in bmesh mirror, add BMO_iter_as_arrayN() function.
2013-05-13 13:44:20 +00:00
Campbell Barton
6c28e1d76a
fix for crash with new bridge method used with invalid edge-loops.
2013-05-12 15:24:02 +00:00
Campbell Barton
40535f5ef3
bmesh recalculate normals - remove BLI_array reallocation, the max size of the array is known.
...
replace with STACK_* macros (moved to BLI_utildefines.h).
2013-05-12 12:23:44 +00:00
Campbell Barton
f87464392c
bridge option to bridge loop pairs,
...
change the operator option to an enum: Connect Loops - open/closed/pairs
because it was getting confusing having all as bools.
2013-05-12 10:00:15 +00:00