Commit Graph

20 Commits

Author SHA1 Message Date
8beb565c59 code cleanup: headers - doxy comments. 2013-09-12 03:02:50 +00:00
09a52f18b6 ghash: reserve size when its known or can be guessed close enough.
also avoid allocs per node in pbvh_bmesh_node_limit_ensure()
2013-08-24 17:33:47 +00:00
a31db0c7e9 rename recently added BLI_ghash_assign() -> BLI_ghash_reinsert() 2013-08-21 16:06:03 +00:00
9470754fd3 bmesh api cleanup, face creation args now accept an example face (as with vertex and edge),
also replace BM_face_create_quad_tri_v with BM_face_create_verts
2013-08-21 07:51:47 +00:00
8937a8b839 use BM_CREATE_NOP arg rather then zero, with pointer and bool args in either side in some cases it gets a bit confusing.
also correct edge-rotate where bool->flag conversion worked by accident.
2013-08-21 05:39:46 +00:00
6f88dca9c3 Dyntopo:
Turn off pbvh normal update flag after recalculation, saves
recalculating normals every frame when not stroking the mesh.

For this to work reliably with undo we need to support original normals
in the bm_log (was marked as a TODO already in the code), so that
undoing avoids having invalid normals in the mesh (since we don't update
every frame anymore). This was added in this commit as well.

Also added some (disabled) quite paranoid checks in the bmesh valication
code for dyntopo hoping to catch the real normal update issue. No luck
there yet.
2013-08-19 14:08:59 +00:00
754b4ab3bc add hash function BLI_ghash_assign, BLI_edgehash_assign
avoids remove,insert and only hashes the key once.
2013-08-18 03:41:39 +00:00
0d5b028d43 patch [#34103] use boolean in path functions and add comments.
path_util_1.patch from Lawrence D'Oliveiro (ldo)
2013-03-04 19:27:51 +00:00
89bda7899d style cleanup & some spelling 2013-02-03 10:28:28 +00:00
f0d4b85fef improve BMesh api use from r54265, no need to do edge lookups from the faces verts since the face stores these already.
also remove ScrArea.cursor, historic runtime variable.
2013-02-03 02:54:24 +00:00
ad2b4c6e54 Remove loose edges created during undo in dynamic-topology sculpt mode
Fixes [#34043] "Dyntopo: noise appear during sculpting (parasite edges)"
projects.blender.org/tracker/index.php?func=detail&aid=34043&group_id=9&atid=498
2013-02-02 16:54:18 +00:00
c37bc8fa76 minor optimization - don't do double lookups on vertex mask layer for vert_mask_get(), vert_mask_set().
add an assert because if the mesh is in an invalid state the mask layer can exist but the mask pointer still be NULL (noticed this while looking into a different bug).
2013-01-28 04:10:47 +00:00
774ff1c246 style cleanup: also remove unneeded NULL check. 2013-01-28 01:59:59 +00:00
38cee985bb code cleanup: style & warnings. 2013-01-21 02:30:40 +00:00
f251eb3f0c minor dyntopo speedup: was doing 2x ghash lookups for BM_log_face_removed(), BM_log_vert_removed(), only one needed. 2013-01-19 00:53:33 +00:00
5ddc7d64a8 optimize bmesh operations that use triangle BMFace's (dyn-topo and mesh conversion). 2013-01-16 21:09:54 +00:00
b27854bd47 use booleans for bmesh api. 2013-01-14 16:42:43 +00:00
e24443b79a style cleanup 2013-01-09 03:30:15 +00:00
1aebc0e790 style cleanup 2012-12-31 02:37:28 +00:00
2e9cb31c02 Add BMLog for efficiently storing changes to vertices and faces
The BMLog is an interface for storing undo/redo steps as a BMesh is
modified. It only stores changes to the BMesh, not full copies.

Currently it supports the following types of changes:
- Adding and removing vertices
- Adding and removing faces
- Moving vertices
- Setting vertex paint-mask values
- Setting vertex hflags
2012-12-30 18:24:08 +00:00