Rename the sculpt/paint unified flags for better consistency, no functional changes
[blender.git] / source / blender / blenkernel / intern / brush.c
index 7a235966bfd06e29749b7d4d49dfd65da205a509..b1aeea99b1bc926513e8e5a580114747d4130eee 100644 (file)
@@ -1374,7 +1374,7 @@ void brush_set_size(Brush *brush, int size)
 {
        const short us_flag = unified_settings(brush);
 
-       if (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE)
+       if (us_flag & UNIFIED_PAINT_SIZE)
                set_unified_size(brush, size);
        else
                brush->size= size;
@@ -1386,15 +1386,15 @@ int brush_size(Brush *brush)
 {
        const short us_flag = unified_settings(brush);
 
-       return (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) ? unified_size(brush) : brush->size;
+       return (us_flag & UNIFIED_PAINT_SIZE) ? unified_size(brush) : brush->size;
 }
 
 void brush_set_use_locked_size(Brush *brush, int value)
 {
        const short us_flag = unified_settings(brush);
 
-       if (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) {
-               set_unified_settings(brush, SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE, value);
+       if (us_flag & UNIFIED_PAINT_SIZE) {
+               set_unified_settings(brush, UNIFIED_PAINT_BRUSH_LOCK_SIZE, value);
        }
        else {
                if (value)
@@ -1410,8 +1410,8 @@ int brush_use_locked_size(Brush *brush)
 {
        const short us_flag = unified_settings(brush);
 
-       return (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) ?
-               (us_flag & SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE) :
+       return (us_flag & UNIFIED_PAINT_SIZE) ?
+               (us_flag & UNIFIED_PAINT_BRUSH_LOCK_SIZE) :
                (brush->flag & BRUSH_LOCK_SIZE);
 }
 
@@ -1419,8 +1419,8 @@ void brush_set_use_size_pressure(Brush *brush, int value)
 {
        const short us_flag = unified_settings(brush);
 
-       if (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) {
-               set_unified_settings(brush, SCULPT_PAINT_UNIFIED_SIZE_PRESSURE, value);
+       if (us_flag & UNIFIED_PAINT_SIZE) {
+               set_unified_settings(brush, UNIFIED_PAINT_BRUSH_SIZE_PRESSURE, value);
        }
        else {
                if (value)
@@ -1436,8 +1436,8 @@ int brush_use_size_pressure(Brush *brush)
 {
        const short us_flag = unified_settings(brush);
 
-       return (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) ?
-               (us_flag & SCULPT_PAINT_UNIFIED_SIZE_PRESSURE) :
+       return (us_flag & UNIFIED_PAINT_SIZE) ?
+               (us_flag & UNIFIED_PAINT_BRUSH_SIZE_PRESSURE) :
                (brush->flag & BRUSH_SIZE_PRESSURE);
 }
 
@@ -1445,8 +1445,8 @@ void brush_set_use_alpha_pressure(Brush *brush, int value)
 {
        const short us_flag = unified_settings(brush);
 
-       if (us_flag & SCULPT_PAINT_USE_UNIFIED_ALPHA) {
-               set_unified_settings(brush, SCULPT_PAINT_UNIFIED_ALPHA_PRESSURE, value);
+       if (us_flag & UNIFIED_PAINT_ALPHA) {
+               set_unified_settings(brush, UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE, value);
        }
        else {
                if (value)
@@ -1462,8 +1462,8 @@ int brush_use_alpha_pressure(Brush *brush)
 {
        const short us_flag = unified_settings(brush);
 
-       return (us_flag & SCULPT_PAINT_USE_UNIFIED_ALPHA) ?
-               (us_flag & SCULPT_PAINT_UNIFIED_ALPHA_PRESSURE) :
+       return (us_flag & UNIFIED_PAINT_ALPHA) ?
+               (us_flag & UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE) :
                (brush->flag & BRUSH_ALPHA_PRESSURE);
 }
 
@@ -1471,7 +1471,7 @@ void brush_set_unprojected_radius(Brush *brush, float unprojected_radius)
 {
        const short us_flag = unified_settings(brush);
 
-       if (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE)
+       if (us_flag & UNIFIED_PAINT_SIZE)
                set_unified_unprojected_radius(brush, unprojected_radius);
        else
                brush->unprojected_radius= unprojected_radius;
@@ -1483,7 +1483,7 @@ float brush_unprojected_radius(Brush *brush)
 {
        const short us_flag = unified_settings(brush);
 
-       return (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) ?
+       return (us_flag & UNIFIED_PAINT_SIZE) ?
                unified_unprojected_radius(brush) :
                brush->unprojected_radius;
 }
@@ -1492,7 +1492,7 @@ void brush_set_alpha(Brush *brush, float alpha)
 {
        const short us_flag = unified_settings(brush);
 
-       if (us_flag & SCULPT_PAINT_USE_UNIFIED_ALPHA)
+       if (us_flag & UNIFIED_PAINT_ALPHA)
                set_unified_alpha(brush, alpha);
        else
                brush->alpha= alpha;
@@ -1504,7 +1504,7 @@ float brush_alpha(Brush *brush)
 {
        const short us_flag = unified_settings(brush);
 
-       return (us_flag & SCULPT_PAINT_USE_UNIFIED_ALPHA) ?
+       return (us_flag & UNIFIED_PAINT_ALPHA) ?
                unified_alpha(brush) :
                brush->alpha;
 }