ColorBand *add_colorband(bool rangetype)
{
	ColorBand *coba;
	
	coba = MEM_callocN(sizeof(ColorBand), "colorband");
	init_colorband(coba, rangetype);
	
	return coba;
}
Example #2
0
void default_color_mapping(ColorMapping *colormap)
{
	memset(colormap, 0, sizeof(ColorMapping));

	init_colorband(&colormap->coba, true);

	colormap->bright = 1.0;
	colormap->contrast = 1.0;
	colormap->saturation = 1.0;

	colormap->blend_color[0] = 0.8f;
	colormap->blend_color[1] = 0.8f;
	colormap->blend_color[2] = 0.8f;
	colormap->blend_type = MA_RAMP_BLEND;
	colormap->blend_factor = 0.0f;
}