Cleanup: unused functions

This commit is contained in:
Campbell Barton 2018-06-09 18:47:39 +02:00
parent 638de72277
commit 83cb34ccd1
2 changed files with 0 additions and 68 deletions

View 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,

View 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.
*