diff options
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index d82c1ca56fe..7f50e521e63 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -457,68 +457,6 @@ void BKE_brush_curve_preset(Brush *b, eCurveMappingPreset preset) curvemapping_changed(b->curve, false); } -/* XXX Unused function. */ -int BKE_brush_texture_set_nr(Brush *brush, int nr) -{ - ID *idtest, *id = NULL; - - id = (ID *)brush->mtex.tex; - - idtest = (ID *)BLI_findlink(&G.main->tex, nr - 1); - if (idtest == NULL) { /* new tex */ - if (id) idtest = (ID *)BKE_texture_copy(G.main, (Tex *)id); - else idtest = (ID *)BKE_texture_add(G.main, "Tex"); - id_us_min(idtest); - } - if (idtest != id) { - BKE_brush_texture_delete(brush); - - brush->mtex.tex = (Tex *)idtest; - id_us_plus(idtest); - - return 1; - } - - return 0; -} - -int BKE_brush_texture_delete(Brush *brush) -{ - if (brush->mtex.tex) - id_us_min(&brush->mtex.tex->id); - - return 1; -} - -int BKE_brush_clone_image_set_nr(Brush *brush, int nr) -{ - if (brush && nr > 0) { - Image *ima = (Image *)BLI_findlink(&G.main->image, nr - 1); - - if (ima) { - BKE_brush_clone_image_delete(brush); - brush->clone.image = ima; - id_us_plus(&ima->id); - brush->clone.offset[0] = brush->clone.offset[1] = 0.0f; - - return 1; - } - } - - return 0; -} - -int BKE_brush_clone_image_delete(Brush *brush) -{ - if (brush && brush->clone.image) { - id_us_min(&brush->clone.image->id); - brush->clone.image = NULL; - return 1; - } - - return 0; -} - /* Generic texture sampler for 3D painting systems. point has to be either in * region space mouse coordinates, or 3d world coordinates for 3D mapping. * |