Commit Graph

83 Commits

Author SHA1 Message Date
00f02f2a5c alternate fix for r43166 2012-01-05 13:21:01 +00:00
887f7f572f revert r43166
merge -r43166:43165 .

the bug was infact caused by custom pointer update function not running, committing next
2012-01-05 13:16:31 +00:00
4456948d39 Fix crash when adding cone or cylinder 2012-01-05 12:58:29 +00:00
7a15b93e53 Edit BMesh --> Mesh conversion code was using its own face filling functions, replace this with a call to mesh_recalcTesselation() once everything else is converted.
gives an overall 3x speedup running bmesh_to_mesh_exec() on suzzane subsurf level 5 (applied).

also removes duplicate code.
2012-01-02 03:52:10 +00:00
8a8cb2c3ef minor formatting edits 2011-12-21 04:56:04 +00:00
57e6ac47a0 use TRUE/FALSE rather then 1/0, no functional changes. 2011-12-21 03:33:32 +00:00
8d0dc29aba remove BLI_blenlib since its not needed in quite a few bmesh files 2011-12-12 22:34:05 +00:00
26db98293f Quiet annoying warning:
Warning! Tesselation uvs or vcol data got out of sync, "had to reset!

This would happen on every editmode edit with UV's and wasn't too reassuring that blender was handling uvs/vcols correctly.

From looking into the problem I found that creating the undo mesh would act as if it was tessellating the existing mesh each time and complain that the data was out of sync, when infact the mesh was just created and being filled in.

Also, allocating uv and vcol customdata arrats for tessfaces isn't needed for undo mesh, so save some memory and dont allocate these in the first place.
2011-12-06 09:28:25 +00:00
e72534e398 fix for crash toggling editmode with vertex parenting, add check if the vertex map can even be created to save looping over all mesh data to do nothing, which is what was happening previously when it (wasnt crashing) in some cases. 2011-12-06 01:49:35 +00:00
f06bbaed92 split BMFlags_To_MEFlags & MEFlags_To_BMFlags into type specific calls, since we always know the types with these functions theres not much point in having generic calls with a type switch. 2011-12-01 01:41:56 +00:00
f8d5a01562 more work on getting bmesh dirty index flags reliable.
now there very close, some hard to redo cases to check on.
2011-11-28 06:49:16 +00:00
8aeaa442bc use lower angle when checking to draw an edge, adding uv sphere looked strange 2011-11-28 03:07:12 +00:00
b6aa307368 move edge angle test from previous commit into a static function & set on the edge loop rather then of face edges. 2011-11-24 03:12:37 +00:00
5a0da92418 fix [#29313] In object mode wire frame edges between two planar faces render 2011-11-24 02:52:38 +00:00
9089d72f06 Various typo cleanups, remove unnecessary code etc, found during recent work and separated to a cleanup change 2011-11-20 16:21:13 +00:00
da849bbfc0 prepare for flagging the bmesh has having invalid index values, so we can skip looping over all elements if its already valid.
- went over every BM_SetIndex call and added comments about its use, if its setting dirty values or correct ones.
- replace loops over all elements _just_ to set index values, with a new function, BM_ElemIndex_Ensure(...), this will eventually only initialize values when they are dirty.
2011-11-16 12:38:40 +00:00
2266c7fc1c Add CD_POLYINDEX layer to reduce need for retesselations 2011-11-13 15:13:59 +00:00
b0a21add8a replace bmesh specific macros with math functions, also some pedantic formatting edits. 2011-11-07 09:02:10 +00:00
85e0609c54 use char for BMHeader type and flag (saves 2 bytes per edge/loop/vertex/face)
also found mouse_mesh_shortest_path was casting edit selecton to the wrong type.
2011-11-01 14:36:23 +00:00
f1dcd1f157 Small optimization in mesh-to-bmesh convert (avoid a bunch of alloc, free, realloc of loop customdata) 2011-10-31 00:28:52 +00:00
a7bf015f38 style edits
- rename var to match trunk shape key code
- reduce scope of some vars
- comment some unused vars
2011-10-29 11:23:37 +00:00
1fd6bc21cd add in functionality from trunk, editing base shapekey now offsets other keys when exiting editmode. 2011-10-29 10:19:57 +00:00
b8afde900c macro -> math replacements, uncomment mirror funcs. 2011-10-29 06:57:50 +00:00
cccb06d92b Add nodoubles arg to BM_Make_Face 2011-10-13 04:58:34 +00:00
d62338578b Fix 28493: Meshes added with many addons revert to only verts on entry to edit mode 2011-10-09 16:59:48 +00:00
1f12740a82 make error prints more helpful & correct some comments for rip code. 2011-09-24 12:13:13 +00:00
8c43e785d9 revert own commit r40051, mesh and object pointers are needed for undo, this commit caused bug [#28625] Separate crash bug.
also added a safety check for the crash, even though reverting fixes.
bmesh_to_mesh_exec() could set me->mface array to NULL but leave me->totface when notellelation=1, which is likely to give trouble elsewhere.
2011-09-12 02:23:30 +00:00
0727893231 remove mesh and object arguments from bmesh operators, these are stored within the BMesh its self. 2011-09-09 02:21:57 +00:00
2448f8caa9 code cleanup - commant/remove unused vars and reduce scope. 2011-09-07 06:49:20 +00:00
0093440fdb fix crashing when setting the vertex parent. 2011-09-06 04:50:01 +00:00
5c22d9f916 svn merge -r39877:39878 https://svn.blender.org/svnroot/bf-blender/trunk/blender, merged manually 2011-09-03 12:39:17 +00:00
e1315ef15a implement select nth, separate loose parts, and a few bug fixes
This code is from Andrew Wiggen (ender79) and reviewed by me.

His comments:

Implements some tools that were marked TODO:
- select nth
- separate loose parts

And also fixes a few bugs;
- extrude and move on normals causes faces to disappear until the move starts
- hiding verts/edges/faces does not deselect them
- deleting a selection sometimes deletes too much (e.g. a solid cube and a wire cube build of only edges, join them on a single edge, select only the faces of the solid cube and delete, some of the deselected edges from the wire cube were also being deleted)
2011-08-28 17:15:24 +00:00
033e25f4f7 fix memory leak with selection. 2011-08-18 12:51:15 +00:00
7ee8820c3e fix for adding a hook not working in editmode for very simple cases.
hook index getting cleared when the mesh had no CD_SHAPE_KEYINDEX vertex custom data.
2011-08-17 07:51:11 +00:00
59e95fa0ff =bmesh: bridge edge loop tool=
rough version of a new bridge tool.

ctrl-e -> bridge (two) edge loops
2011-08-15 23:38:51 +00:00
a7a0c17ec5 fix crash when hook default cube to new object 2011-08-15 13:35:31 +00:00
6d5080783e svn merge -r38500:38600 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-07-26 04:17:15 +00:00
d88ea6ab91 Turned select vertex path back on and added
back in selection history for bmesh->mesh
and mesh->bmesh conversions:
----------------------------------------------
Select Vertex Path had wrong invoke callback
(shouldn't have any?). 

Also selection history was not converted when 
doing bmesh->mesh or mesh->bmesh conversions. 
This meant that tabbing in and out of editmode
would make your selection history dissapear.
Undo pop would also not preserve selection 
history so any operators that relied on it
would not work when you adjusted their settings.
2011-06-27 04:54:58 +00:00
142d87f154 =bmesh= committing not-quite-functional edge split modifier code before replacing it with a bmesh version, taking too much time to debug right now. 2011-06-01 19:30:19 +00:00
16710fb3c2 svn merge -r36651:36672 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-05-13 16:55:07 +00:00
1d8fa52883 rename BMINDEX_GET/SET to BM_GetIndex/BM_SetIndex 2011-05-13 10:49:26 +00:00
cc2352cdd0 =bmesh=fixed shapekey mem leak 2011-05-12 18:33:10 +00:00
1e90add66c more syncing with trunk. 2011-05-11 09:31:00 +00:00
086d013ec2 =bmesh= glsl drawing in editmode works again, also fixed some minor customdata bugs 2011-05-10 17:01:26 +00:00
5a2a3d7d82 more syncing with trunk, also cleared many warnings with gcc4.6 2011-05-09 04:06:48 +00:00
e0c83f2de9 =bmesh= made connected PET work better 2011-04-29 17:32:42 +00:00
2a24370bab =bmesh= fixed a shapekey issue with undo 2011-04-17 05:08:03 +00:00
489eaaa46d =bmesh= build modifier works now, also made scanfill thread-safe 2011-04-16 23:58:49 +00:00
fc050837b0 =bmesh= fixed edge creasing for subsurf 2011-03-27 03:29:27 +00:00
d88bb9115f =bmesh=
Coded a new modifier, "Precision UV Interpolation", 
that triangulates, subdivides, then uses brecht's mean
value interpolation to interpolate face data.

Textures on ngon faces get interpolated a bit nicer, in 
other words (though concave cases, e.g. 'N', don't work very well).
2011-03-25 00:32:38 +00:00