Cleanup: unused functions
authorCampbell Barton <ideasman42@gmail.com>
Sat, 9 Jun 2018 16:47:39 +0000 (18:47 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 9 Jun 2018 16:47:39 +0000 (18:47 +0200)
source/blender/blenkernel/BKE_brush.h
source/blender/blenkernel/intern/brush.c

index f2601f2..9f326d9 100644 (file)
@@ -57,12 +57,6 @@ void BKE_brush_sculpt_reset(struct Brush *brush);
 /* image icon function */
 struct ImBuf *get_brush_icon(struct Brush *brush);
 
-/* brush library operations used by different paint panels */
-int BKE_brush_texture_set_nr(struct Brush *brush, int nr);
-int BKE_brush_texture_delete(struct Brush *brush);
-int BKE_brush_clone_image_set_nr(struct Brush *brush, int nr);
-int BKE_brush_clone_image_delete(struct Brush *brush);
-
 /* jitter */
 void BKE_brush_jitter_pos(
         const struct Scene *scene, struct Brush *brush,
index d82c1ca..7f50e52 100644 (file)
@@ -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.
  *