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:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-01-12 22:08:07 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-01-12 22:08:07 +0400
commit7889905888e70996b8fce714d71114561d3f40be (patch)
tree1b1ce21a5ffe42297454cc89cf8a4736c46b3947
parent9fe88a8488ad9e209956f047496c838f38562c19 (diff)
Rename the sculpt/paint unified flags for better consistency, no functional changes
-rw-r--r--source/blender/blenkernel/intern/brush.c36
-rw-r--r--source/blender/makesdna/DNA_scene_types.h16
-rw-r--r--source/blender/makesrna/intern/rna_scene.c4
3 files changed, 29 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 7a235966bfd..b1aeea99b1b 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -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;
}
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 9f3353078c2..743458f62c8 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -835,15 +835,17 @@ typedef struct UnifiedPaintSettings {
} UnifiedPaintSettings;
typedef enum {
- SCULPT_PAINT_USE_UNIFIED_SIZE = (1<<0),
- SCULPT_PAINT_USE_UNIFIED_ALPHA = (1<<1),
+ UNIFIED_PAINT_SIZE = (1<<0),
+ UNIFIED_PAINT_ALPHA = (1<<1),
- /* only used if unified size is enabled */
- SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE = (1<<2),
- SCULPT_PAINT_UNIFIED_SIZE_PRESSURE = (1<<3),
+ /* only used if unified size is enabled, mirros the brush flags
+ BRUSH_LOCK_SIZE and BRUSH_SIZE_PRESSURE */
+ UNIFIED_PAINT_BRUSH_LOCK_SIZE = (1<<2),
+ UNIFIED_PAINT_BRUSH_SIZE_PRESSURE = (1<<3),
- /* only used if unified alpha is enabled */
- SCULPT_PAINT_UNIFIED_ALPHA_PRESSURE = (1<<4)
+ /* only used if unified alpha is enabled, mirrors the brush flag
+ BRUSH_ALPHA_PRESSURE */
+ UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE = (1<<4)
} UnifiedPaintSettingsFlags;
/* *************************************************************** */
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 61ced5bdada..af0e8d58e14 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1628,12 +1628,12 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Unified Paint Settings", "Overrides for some of the active brush's settings");
prop= RNA_def_property(srna, "use_unified_size", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SCULPT_PAINT_USE_UNIFIED_SIZE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_SIZE);
RNA_def_property_ui_text(prop, "Use Unified Radius",
"Instead of per-brush radius, the radius is shared across brushes");
prop= RNA_def_property(srna, "use_unified_strength", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SCULPT_PAINT_USE_UNIFIED_ALPHA);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_ALPHA);
RNA_def_property_ui_text(prop, "Use Unified Strength",
"Instead of per-brush strength, the strength is shared across brushes");