Code

optionally use linear profile for sculpting
authorbuliabyak <buliabyak@users.sourceforge.net>
Tue, 16 May 2006 04:40:49 +0000 (04:40 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Tue, 16 May 2006 04:40:49 +0000 (04:40 +0000)
src/nodepath.cpp

index 1ffef1880c68b0f6c4110e7c64322adad9fc167e..2e5b24c62ca6f233c748dc48e524b7885d3f1ba1 100644 (file)
@@ -1002,7 +1002,11 @@ sculpt_profile (double x, double alpha)
 {
     if (x >= 1)
         return 0;
-    return (0.5 * cos (M_PI * (pow(x, alpha))) + 0.5);
+    if (prefs_get_int_attribute("tools.nodes", "sculpt_profile_linear", 0) == 1) {
+        return 1 - x;
+    } else {
+        return (0.5 * cos (M_PI * (pow(x, alpha))) + 0.5);
+    }
 }
 
 double