diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-06 19:46:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-06 19:46:35 +0300 |
commit | 132783328209f24873629113665f01b35364fdd0 (patch) | |
tree | 4632fc09d8fc119a22e4f9907e3c49e8f5fcf7e5 /source/blender/blenkernel/intern | |
parent | 9c1c0152df19d982b14ea9a58c1c19c0f378680b (diff) |
Sculpt: WIP brush behavior changes
* Draw/Inflate/Layer now keep working on the original mesh coordinates and
normals from when the stroke started. This helps avoid the mesh blowing
up, but can still be better. The old behavior is still available as
"Accumulate" in the UI.
* This requires some more memory usage for the BVH, would like to find a
way to avoid that.
* Smooth falloff is now the default.
* Spacing is now enabled by default, with a value of 7.5.
* Anchored now stores normals per node to save some memory.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 8a4ffca8244..b415e7b7b17 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -75,13 +75,14 @@ Brush *add_brush(const char *name) brush->rgb[2]= 1.0f; brush->alpha= 0.2f; brush->size= 25; - brush->spacing= 10.0f; + brush->spacing= 7.5f; brush->smooth_stroke_radius= 75; brush->smooth_stroke_factor= 0.9; brush->rate= 0.1f; brush->jitter= 0.0f; brush->clone.alpha= 0.5; brush->sculpt_tool = SCULPT_TOOL_DRAW; + brush->flag |= BRUSH_SPACE; brush_curve_preset(brush, BRUSH_PRESET_SMOOTH); diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 7cc46d39158..7acf77c6f90 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -420,11 +420,13 @@ static void draw_partial_cb(PBVHNode *node, void *data) Returns true if the AABB is at least partially within the frustum (ok, not a real frustum), false otherwise. */ -int planes_contain_AABB(PBVHNode *node, float bb_min[3], float bb_max[3], void *data) +int planes_contain_AABB(PBVHNode *node, void *data) { float (*planes)[4] = data; int i, axis; - float vmin[3], vmax[3]; + float vmin[3], vmax[3], bb_min[3], bb_max[3]; + + BLI_pbvh_node_get_BB(node, bb_min, bb_max); for(i = 0; i < 4; ++i) { for(axis = 0; axis < 3; ++axis) { |