Commit Graph

94 Commits

Author SHA1 Message Date
286073fb4e Style Cleanup 2012-02-07 00:13:29 +00:00
8733f89539 Style Cleanup: edits for line length 2012-02-06 06:26:54 +00:00
3c39c9dcf2 add in gpl headers 2012-02-06 06:10:11 +00:00
5c3fdfac77 Code Style: more code style edits. 2012-02-06 06:03:46 +00:00
288a5b4b17 Style Cleanup: bmesh code style was a bit mixed - follow http://wiki.blender.org/index.php/User:Nazg-gul/CodeStyle 2012-02-06 04:37:27 +00:00
11d5a2d2eb Code Cleanup: style change only 2012-02-05 15:55:28 +00:00
1d21e2386e ensure tessface's are available while sculpting. 2012-02-05 07:12:46 +00:00
7138e6aa9c comment unused code. 2012-01-23 23:39:51 +00:00
001a15a721 speedup for mesh -> bmesh conversion
- was looping over all verts/edges/faces to setup the selection store, even when there was no selection store (mselect), since this is fairly common case, add a check.

also use BLI_array_growitems rather then BLI_array_growone to allocate in larger steps.
2012-01-23 13:50:00 +00:00
6d50149e7c dissable editmode tesselation calculation on exiting editmode, the mesh conversion function does this. 2012-01-22 22:06:12 +00:00
bc745a32d3 argument to mesh_recalcTesselation to skip copying normals from polygons. 2012-01-19 17:51:52 +00:00
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