Commit Graph

1537 Commits

Author SHA1 Message Date
675628d24d bmesh: debugging function to help resolve issues with corrupt mesh data - BM_mesh_validate() 2012-03-22 05:13:43 +00:00
b6c2f9ddab style cleanup: enforce macros using a semicolon. 2012-03-22 01:35:13 +00:00
d76c05cd36 style cleanup: bmesh 2012-03-21 09:10:08 +00:00
e11c67e1dc fix [#30617] regression: select similar no threshold 2012-03-21 07:49:05 +00:00
6193c47c39 disable re-using 'number_cuts' setting on operators, problem was that you could subdiv a plane many times but then go to subdivide a high poly mesh and it would start with really high subdiv value (possibly running out of ram and crashing). 2012-03-20 22:27:08 +00:00
1272492445 temp disable inset boundary option, it can make invalid meshes, need to look into this further. 2012-03-20 11:45:55 +00:00
be116242d4 style cleanup 2012-03-20 04:27:14 +00:00
e6834fcf85 bmesh inset: outset option 2012-03-19 21:40:17 +00:00
d91deb9e97 bmesh inset:
option to inset boundaries.
2012-03-19 21:27:24 +00:00
3dbc34049a Spelling of UI messages (then -> than). 2012-03-19 19:17:17 +00:00
6f104aad3a code cleanup: bmesh api - make arg order consistent - htype before hflag or oflag. 2012-03-19 08:36:27 +00:00
86796252da bmesh: inset tool, access from face menu (Ctrl+F)
- Even option (like solidify even option)
- Relative option (insets based on lengths of surrounding edges)

TODO: merge tares when 2+ face corners meet but don't form a contiguous region.
2012-03-19 05:45:15 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
02abb636a3 UI messages: unification of select/deselect stuff.
Previously we had three versions, Select/Deselect, Select or Deselect, and (De)select, choosen the third (shortest) one for now.
2012-03-17 19:14:08 +00:00
bed5ae5366 *picky* fix for edge rotate
- Edge rotate would leave verts selected, this would give problems because those selections would leave edges that would try to rotate when run again. now de-select old verts on edge rotate.

- Rotating into hidden verts gave odd results, now make sure hidden state is ok.

- BMO_slot_buffer_hflag_disable / BMO_slot_buffer_hflag_enable now have flushing for the hide flag too.
2012-03-15 23:23:04 +00:00
b40386a3e3 fixes for vertex color (found when brining X3D import back)
- tessface vertex color had the wrong sized array passing to rna_iterator_array_begin
- re-calculating tessface's would clear them if they were already created (own mistake)
- ED_mesh_color_add initialized tessface vertex colors from the loop color array

also made rna's mesh.tessface_vertex_colors.new() work like tessface_uv_textures.new()
where layers can be added as long as polygons are not present.
2012-03-15 05:40:33 +00:00
a97825dfd7 stule cleanup for rct.c and fix for error in last commit. 2012-03-13 01:55:25 +00:00
8646bb4464 workaround [#30480] Knife tool flicker
the problem was numeric precision when in ortho mode the start/end points for the view vector would be 2000 apart which caused trouble for the intersection test.
2012-03-13 01:11:08 +00:00
b457c7fdbd style cleanup 2012-03-12 23:56:11 +00:00
50af47a67f Code cleanup: knife gathers pos-related state into a struct. No functional change.
This is in preparation for bug fixing and cleanup related to tracking
of bmface and is_space state variables.  And makes it more likely
to avoid bugs in future where some part of state is copied but not all.
2012-03-12 12:45:55 +00:00
ca5fd21bb5 Make knifetool more robust against crashes. Fix some hole problems.
Sometimes split would fail to make a face - make sure it doesn't
crash if that happens.
Chain finding code for holes would sometimes go back to same
vertex on the face, which causes problems, so fixe that.
Also, disallowed a cut that starts at a vertex or edge and
cycles back to that same point in a face - this would make
a face with a repeated vertex, which may not be handled by
the rest of the system properly.
2012-03-12 11:27:59 +00:00
b330abc290 remove Object member from BMesh struct - was only used for undo and BMEditMesh already stores an object pointer.
also fix for own mistake with mesh conversion refactor, shape key index was off by 1 when switching editmode.
2012-03-11 19:58:56 +00:00
7f34653f59 style cleanup: + some warning fixes, also remove unused metaelem extern. 2012-03-10 22:00:55 +00:00
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
dfdfa3d51b code cleanup: replace macros VECCOPY, VECADD, VECSUB, INPR - with BLI_math funcs.
added copy float/double funcs: copy_v3fl_v3db(), copy_v3db_v3fl(). 2d & 4d too.
2012-03-09 06:04:17 +00:00
4251746382 some code cleanup for rip tool. 2012-03-09 04:10:19 +00:00
78d73eb155 BMesh: rewrite edge split code (used by edge split modifier and rip tool)
this fixes but [#30461] where the same vertex was added to some faces twice.

Previous code rebuilt all faces around the split edges, replace this with much simpler code that uses existing bmesh API for splitting.

This also gives a performance boost to the modifier (over 30x faster in the bug-report file).
2012-03-09 03:16:39 +00:00
4f7bdc59d3 style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
c82c456247 bmesh py api, new functions:
* bmesh.utils.face_vert_rip(f, v)
* bmesh.utils.loop_rip(l)
2012-03-08 20:00:37 +00:00
a5f2db9992 Fix #30489: Loop Cut by Typing Numbers Is Limited to 32?
Increase numbering input of number of loop cuts to 130 as it was in 2.49.
Also display count of cuts in a header.
2012-03-08 13:20:06 +00:00
fc170e6a4e Knifetool: change ESC to mean cancel, not confirm.
This corresponds to the more usual convention.
There was no key connected to Cancel, and we already
have Return, Numpad-Return, and Right-click for confirm.
2012-03-08 11:56:11 +00:00
e61339a76f code cleanup: duplicate checks and double assignments. 2012-03-08 04:38:35 +00:00
79d97ca509 style cleanup - spelling. 2012-03-08 04:12:11 +00:00
081aa382ed fix
- access to a meshs editmesh before the pointer was checked to be a mesh.
- uninitialized memory use in transform (not a problem practically but nice to quiet the error in valgrind).
2012-03-08 01:22:49 +00:00
52db32bb53 fix for 2 crashes from missing NULL checks. 2012-03-08 00:23:28 +00:00
b41b19025e style cleanup: picky edits 2012-03-07 15:10:21 +00:00
9f742303a7 Knifetool uses direct cutting instead of scanfill: fixes bugs 29908, 28963, 30333.
Knifetool accumulates a bunch of proposed cuts and when the user
confirms, it makes them all. The old code did this by using scanfill
to triangulate the cutting edges in their faces, and then merging
triangles where possible. This sometimes ended up with strange
lost faces, and also made it so that when holes were cut, the
surrounding face ended up totally triangulated. But 29908 was
an example of a lost face.

This new code directly finds chains of cutting edges that go from
one side of a face to the other and using BM_edge_split_n to make
the cuts. Holes are handled by finding two good places where
the hole can be connected to the containing face (using two
because I think some other code in bmesh assumes that there are
no edges that appear twice in a face).

The old code is still there with #if SCANFILL_CUTS, so can easily revert
if this proves to be a bad idea.

Also, a small fix to previously added BM_split_n (forgot to
copy face attributes to new face).
2012-03-07 14:44:43 +00:00
bdf731f03d Patch [#30476] small 3 line patch to add the option 'NOT EQUAL TO' to the select faces by number of vertices operator
"This patch adds "Not Equal To" to the list of options for selecting faces based on the number of vertices. While the equivalent can indeed be achieved by using "Equal To" and invert selection, having this option allows for a smoother work-flow when adjusting the number of vertices to be compared."
2012-03-07 07:32:15 +00:00
b563870fd9 use a better method if picking the rip vertex to use, rather then finding the edge closest to the mouse, find the face corner attached to the vert - thats closest to the mouse, this way ripping gives predictable outcome. 2012-03-07 04:20:30 +00:00
4fe4cfdb88 revert own commit r44684 it broke edges with one vertex on a boundry 2012-03-07 03:46:30 +00:00
04beeea9c9 single vertex rip wasn't finishing with the best vertex selected. 2012-03-07 02:46:58 +00:00
6eb6877cdd minor improvement to Rip tool side calculation, measure distance to the edge line segment rather then midpoint. 2012-03-07 01:14:20 +00:00
f11d7a426f fix for bug in ED_view3d_project_float that only effected the 'Rip' tool.
when the source and destination vectors were the same pointer, the X value would get overwritten.

now the rip tool uses the best side to grab as in trunk.
2012-03-07 01:06:18 +00:00
400a0297b0 - simplify rip code not to expand/contract selection.
- disable BVH edge visibility test (ifdef'd out. dont think its really needed)
2012-03-07 00:08:00 +00:00
d1937de1d2 fix for own error in edge-rotate keeping edge customdata - this was crashing when rotating multiple edges.
Now create the rotate edge in advance and copy its customdata (before joining the faces).

This commit also fixes an annoyance where tryangulating faces could create duplicate edges.
2012-03-06 19:29:05 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
7b7214c722 code cleanup - give edge split more helpful var names and replace edgetag macros with static functions. 2012-03-06 17:23:26 +00:00
bb21641e1c Fix to knifetool when intermediate point in space.
Before, if you cut the same edge multiple times
with an intermediate point in space, it wouldn't
get all of the edges.
2012-03-06 12:16:55 +00:00
f6ddb79e20 fix [#30457] Smooth normals wrongly exported to wavefront
mesh.calc_normals() wasnt calculating vertex normals (only face normals),

now only calculate vertex normals.

added a define incase we want to have poly normals back again.
2012-03-05 11:49:24 +00:00
4b940364a1 edge rotate now keeps edge properties (like seam, crease, bevel weight.. etc) 2012-03-05 01:53:30 +00:00