[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23328] trunk/blender/source/blender/ blenkernel/intern/brush.c: curve could return values lower then zero, making a brush add and subtract the color in different parts.

Campbell Barton ideasman42 at gmail.com
Sat Sep 19 04:37:20 CEST 2009


np, will make it only clamp for images.

On Fri, Sep 18, 2009 at 12:09 PM, Tom M <letterrip at gmail.com> wrote:
> Cambo, sculpting also uses this and it is useful to be able to add and
> subtract at the same time for mesh sculpting.
>
> LetterRip
>
> On Thu, Sep 17, 2009 at 8:07 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
>> Revision: 23328
>>          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23328
>> Author:   campbellbarton
>> Date:     2009-09-18 06:07:41 +0200 (Fri, 18 Sep 2009)
>>
>> Log Message:
>> -----------
>> curve could return values lower then zero, making a brush add and subtract the color in different parts. (cool but not useful!)
>>
>> Modified Paths:
>> --------------
>>    trunk/blender/source/blender/blenkernel/intern/brush.c
>>
>> Modified: trunk/blender/source/blender/blenkernel/intern/brush.c
>> ===================================================================
>> --- trunk/blender/source/blender/blenkernel/intern/brush.c      2009-09-18 03:47:17 UTC (rev 23327)
>> +++ trunk/blender/source/blender/blenkernel/intern/brush.c      2009-09-18 04:07:41 UTC (rev 23328)
>> @@ -933,8 +933,10 @@
>>  /* Uses the brush curve control to find a strength value between 0 and 1 */
>>  float brush_curve_strength(Brush *br, float p, const float len)
>>  {
>> +       float f;
>>        if(p > len) p= len;
>> -       return curvemapping_evaluateF(br->curve, 0, p/len);
>> +       f= curvemapping_evaluateF(br->curve, 0, p/len);
>> +       return (f > 0.0f) ? f:0.0f;
>>  }
>>
>>  /* TODO: should probably be unified with BrushPainter stuff? */
>>
>>
>> _______________________________________________
>> Bf-blender-cvs mailing list
>> Bf-blender-cvs at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
- Campbell


More information about the Bf-committers mailing list