Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-02-11 22:04:41 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-02-11 22:11:44 +0300
commit6ee6a42d10e3c1c0868d1f038401d525264a7e24 (patch)
treee91a6b00bfa493300c99d3e274ba0e5493ad596c /source/blender/blenloader
parent0ab7e321585f909a4fd3cc55221bf3d3827989e9 (diff)
Sculpt: Clay Strips Tip Roundness property
This patch allow to change the brush tip shape between a square and a circle using a brush property. After this change we are no longer testing the distance against a cube (the Z axis is not used). I did not test this in depth, but if it does not produce any artifacts I think we can keep it this way instead of adding more complexity to the code. In this new distance test the brush falloff is only applied on the rounded parts of the square to avoid sharp artifacts in the diagonals. Because of this, the round version is much softer than the square one. The planned hardness property will fix this, but this can also be avoided by setting the fallof to a custom curve. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6165
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index b570947739a..6062d971629 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -4428,7 +4428,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- /* Brush cursor alpha */
for (Brush *br = bmain->brushes.first; br; br = br->id.next) {
br->add_col[3] = 0.9f;
br->sub_col[3] = 0.9f;
@@ -4447,5 +4446,14 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
br->flag2 |= BRUSH_POSE_IK_ANCHORED;
}
}
+
+ /* Tip Roundness. */
+ if (!DNA_struct_elem_find(fd->filesdna, "Brush", "float", "tip_roundness")) {
+ for (Brush *br = bmain->brushes.first; br; br = br->id.next) {
+ if (br->ob_mode & OB_MODE_SCULPT && br->sculpt_tool == SCULPT_TOOL_CLAY_STRIPS) {
+ br->tip_roundness = 0.18f;
+ }
+ }
+ }
}
}