Commit Graph

16 Commits

Author SHA1 Message Date
38eef8deee Refactor to Dyntopo node customdata commit.
Don't use a dedicated node layer but use temporary int layer instead.
Works like a charm as long as we are careful resetting the layer when
needed (after pbvh clearing and always after bmesh has been filled in
undo)

Tip by Campbell, thanks!
2014-04-17 19:03:08 +03:00
556590fa3a Dyntopo:
Store PBVH node ID in CustomData. This avoids a number of hash deletions
and checks/insertions on big hashes.
2014-04-16 05:31:02 +03:00
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
ebaf3781fa Dyntopo: replace GHash with GSet, saves some memory 2014-04-08 14:45:48 +10:00
551d1a1ed5 Code cleanup: style 2014-03-24 13:14:19 +11:00
e732c5809c Detail sampling operator
Located on topology panel.

To use just click on button and click on mesh.
Operator will just use the dimensions of the triangles below to set the
constant detail setting.

Also changed pair of scale/detail size with nice separate float
percentage value.
2014-03-22 23:35:41 +02:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
ba8d65a9a7 Code clean-up change naming of gpu buffers used by pbvh to better
reflect that. Previous name GPU_Buffers was very similar to GPU_Buffer,
renamed to GPU_PBVH_Buffers
2014-01-03 12:48:12 +02:00
0ac194687e style cleanup 2013-09-18 00:07:17 +00:00
8beb565c59 code cleanup: headers - doxy comments. 2013-09-12 03:02:50 +00:00
bbce51d116 replace hashes with sets where possible. 2013-08-25 20:03:45 +00:00
04ea8c0ee8 remove the pointer from BLI_bitmap's typedef,
hides that an arg passed is really an array which may be modified by other functions.
2013-07-22 23:20:48 +00:00
c9d16fd22c add ".hh" as an extension for source scripts. 2012-12-31 07:06:51 +00:00
2e69b0cd0b Add dynamic topology support to the PBVH
* Add BLI_pbvh_build_bmesh(), similar to the other PBVH builders but
  specialized for BMesh. Whereas the PBVH leaf nodes for mesh and
  grids only store a start-index and count into the primitive indices
  array, the BMesh version uses GHashes to store the full set of faces
  and vertices in leaf nodes

* Update PBVH iterator to handle BMesh

* Make some of the pbvh.c functions non-static so they can be used by
  the new pbvh_bmesh code

* The BLI_pbvh_bmesh_update_topology() function is the main reason for
  adding BMesh support to the PBVH. This function is used during a
  sculpt stroke to dynamically collapse edges that are particular
  short and subdivide edges that are particularly long.
2012-12-30 18:28:36 +00:00
31f978c8ef Move layer displacements from SculptUndoNode to PBVHNode
* This doesn't make much difference for regular mesh/multires
  sculpting, but for dynamic topology sculpting the undo stack isn't
  split up by PBVH nodes, so it's more convenient to store the layer
  data in PBVH nodes.

* Note that the life cycle of the layer displacement data is
  unchanged -- it's only valid during a stroke with the layer brush,
  gets free'd when the undo step ends.
2012-12-30 18:26:11 +00:00
ec258542e2 Code cleanup: move PBVH/PBVHNode structs into new header file 2012-12-30 18:25:36 +00:00