Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/colorband.c
| Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | for (a = 2; a < MAXCOLORBAND; a++) { | ||||
| coba->data[a].r = 0.5; | coba->data[a].r = 0.5; | ||||
| coba->data[a].g = 0.5; | coba->data[a].g = 0.5; | ||||
| coba->data[a].b = 0.5; | coba->data[a].b = 0.5; | ||||
| coba->data[a].a = 1.0; | coba->data[a].a = 1.0; | ||||
| coba->data[a].pos = 0.5; | coba->data[a].pos = 0.5; | ||||
| } | } | ||||
| coba->tot = 2; | coba->tot = 2; | ||||
| coba->cur = 0; | |||||
| coba->color_mode = COLBAND_BLEND_RGB; | coba->color_mode = COLBAND_BLEND_RGB; | ||||
| coba->ipotype = COLBAND_INTERP_LINEAR; | |||||
| } | } | ||||
| static void colorband_init_from_table_rgba_simple( | static void colorband_init_from_table_rgba_simple( | ||||
| ColorBand *coba, | ColorBand *coba, | ||||
| const float (*array)[4], const int array_len) | const float (*array)[4], const int array_len) | ||||
| { | { | ||||
| /* No Re-sample, just de-duplicate. */ | /* No Re-sample, just de-duplicate. */ | ||||
| const float eps = (1.0f / 255.0f) + 1e-6f; | const float eps = (1.0f / 255.0f) + 1e-6f; | ||||
| ▲ Show 20 Lines • Show All 540 Lines • Show Last 20 Lines | |||||