diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 19:47:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 19:47:39 +0300 |
commit | 83cb34ccd15a3f43ebff7e62085a360e7a5c383e (patch) | |
tree | 1bc94fbee987d272300905f1a3be5540084064be /source/blender/blenkernel/intern | |
parent | 638de722775fc43c3543a30aaa888372fe93fe98 (diff) |
Cleanup: unused functions
Diffstat (limited to 'source/blender/blenkernel/intern')
-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. * |