Commit Graph

1027 Commits

Author SHA1 Message Date
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
Howard Trickey
0a006cce9c Fix bevel bugs 34445 and 35109, copying over edge data.
The bugs were about not respecting edge smoothness and
not respecting edge crease.  This change copies the
edge attributes from a beveled edge to the two outside
edges of the bevel.
2013-07-08 13:02:21 +00:00
Campbell Barton
61bbefe40d remove unused normal-recalc flags. 2013-07-08 08:56:46 +00:00
Campbell Barton
335fd7388f move normal recalculation into its own source file. 2013-07-08 08:50:04 +00:00
Campbell Barton
2c8087aa2a fix [#36047] Recalculate normals produces faulty normals on certain simple meshes
The mesh in the report had 3 faces-user-edges, resolve the problem by not walking over these edges.
also don't recurse anymore (avoids realloc's).
2013-07-08 00:51:30 +00:00
Campbell Barton
0a1bcc78e0 fix for writing past array end with loop filling. 2013-07-06 02:20:39 +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
Howard Trickey
2e7776b95a Fix bevel crash bug 35990. Sometimes no face to interpolate from. 2013-07-03 20:52:31 +00:00
Campbell Barton
4848ca09c0 style cleanup 2013-07-02 20:36:52 +00:00
Howard Trickey
994a937a97 Fix Bevel bug #34321, making bevel keep UVs contiguous when possible. 2013-07-02 13:18:56 +00:00
Campbell Barton
b96aa8800e bump up openmp limit for release,
also remove 'Vertex ' prefix for items in the vertex menu.
2013-07-02 04:34:39 +00:00
Campbell Barton
e9208e99b7 bridge tool: calculate face normals before triangulating, own error when removing normal recalc from the bmesh operator.
also rename `Fill Grid` -> `Grid Fill` to match `Beauty Fill`
2013-07-01 07:15:12 +00:00
Campbell Barton
73d32fdcc2 add type checking assert in bmesh operator iterator. 2013-07-01 07:12:05 +00:00
Campbell Barton
ff39d7b4bf fix for incorrect selection when running MESH_OT_loop_to_region, running wire-frame operator directly after would crash. 2013-06-27 05:19:25 +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
7d608452d0 bmesh mirror operator was counting layers in inner loop for no good reason. 2013-06-26 04:17:02 +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
3a1082b359 tweak comparisons for connect pair in rare case the value == CONNECT_EPS. 2013-06-23 15:00:12 +00:00
Campbell Barton
dc12dd23f6 fix for connect_pair cutting across triangle verts from edges. 2013-06-23 09:50:10 +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
998101763a correct for own regressions when refactoring select-path, was using heap popmin incorrectly. 2013-06-19 19:59:49 +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
Brecht Van Lommel
c03e638cf3 Fix msvc compile error with subdivide use_smooth_even option. 2013-06-10 20:54:08 +00:00
Campbell Barton
bff8a4c594 correction to typo in r57327, ui-load wasnt working on splash screen.
also minor changes:
- update the load-UI flag when changing in the preferences.
- remove unused initialization values for subdivide.
2013-06-10 10:55:57 +00:00
Campbell Barton
cae0d9df52 optimize customdata lookups for subdivision. 2013-06-10 05:18:45 +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
c630435b3c fix own error with removing vertex weights not checking for non-existing weights.
however this exposed some other odd behavior.

removing a vertex group would add one if not found but only for meshes, not lattices.

now just skip removal if not found.
2013-06-04 19:37:18 +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
cfd0438d3c fix for crash in edgering subd when 3+ disconnected edge rings were found. 2013-06-02 17:02:56 +00:00
Campbell Barton
b577f0c16e previous fix for #35578 didnt work right, check direction of the open edge loop too. 2013-05-31 18:58:32 +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
54e8cacdcf improve edgering subdivide curvature calculations (calculate length projected onto the normal plane).
also correct recely added asserts.
2013-05-31 06:28:11 +00:00
Campbell Barton
58a748431e correct cast to uintptr_t for smallhash use. 2013-05-31 00:19:38 +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