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>2010-07-26 06:35:43 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2010-07-26 06:35:43 +0400
commit5b1231849cd2f87af24d13b6631199ba28e100e6 (patch)
tree4c49be4fd703942c5ad59617ac1764b6b5880fa8 /source/blender/blenkernel/intern/paint.c
parenta27de17349f7f341e07ff2521156a444b59ba3b9 (diff)
* Factored out some duplicated code from rna_brush into paint.c, added a new function that checks whether a brush is used by that paint struct
* Fixed an improperly initialized variable in BKE_previewing_free_id * Added an RNA access function to get the icon associated with a value
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r--source/blender/blenkernel/intern/paint.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index cf5deb95258..fcbe8d65d64 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -192,3 +192,15 @@ void copy_paint(Paint *orig, Paint *new)
id_us_plus((ID *)new->brushes[i]);
}
}
+
+int paint_has_brush(Paint *p, Brush *brush)
+{
+ int i;
+
+ for (i= 0; i < p->brush_count; i++) {
+ if (strcmp(brush->id.name+2, p->brushes[i]->id.name+2) == 0)
+ return 1;
+ }
+
+ return 0;
+}