Bugfix #25581
authorTon Roosendaal <ton@blender.org>
Tue, 11 Jan 2011 14:01:23 +0000 (14:01 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 11 Jan 2011 14:01:23 +0000 (14:01 +0000)
Pressure sensitivity for Sculpt 'strength' got lost in code cleanup.
Added warning in code, the function call is confusing.

source/blender/editors/sculpt_paint/paint_stroke.c

index 15bb574448f3fb5e9edf8a02ebd190c564c366a6..f6136bced94075ec5b3d7d96a08468a90fb45c03 100644 (file)
@@ -766,9 +766,12 @@ static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const
                if(length > FLT_EPSILON) {
                        int steps;
                        int i;
-                       float pressure;
+                       float pressure= 1.0f;
 
-                       pressure = event_tablet_data(event, NULL);
+                       /* XXX mysterious :) what has 'use size' do with this here... if you don't check for it, pressure fails */
+                       if(brush_use_size_pressure(stroke->brush))
+                               pressure = event_tablet_data(event, NULL);
+                       
                        if(pressure > FLT_EPSILON) {
                                scale = (brush_size(stroke->brush)*pressure*stroke->brush->spacing/50.0f) / length;
                                if(scale > FLT_EPSILON) {