64 static uchar back[4] = {0, 0, 0, 255};
65 static uchar none[4] = {0, 0, 0, 0};
66 static uchar white[4] = {255, 255, 255, 255};
67 static uchar black[4] = {0, 0, 0, 255};
68 static uchar setting = 0;
1046 static const uchar red[4] = {204, 48, 72, 255};
1095 return (
const uchar *)cp;
1103 if (btheme ==
nullptr) {
1134 else if (regionid) {
1150 return static_cast<bTheme *
>(
U.themes.first);
1166 r = coloffset + int(cp[0]);
1168 g = coloffset + int(cp[1]);
1170 b = coloffset + int(cp[2]);
1172 a = alphaoffset + int(cp[3]);
1186 CLAMP(fac, 0.0f, 1.0f);
1187 col[0] =
floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
1188 col[1] =
floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
1189 col[2] =
floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
1197 CLAMP(fac, 0.0f, 1.0f);
1198 r_col[0] = ((1.0f - fac) * cp1[0] + fac * cp2[0]) / 255.0f;
1199 r_col[1] = ((1.0f - fac) * cp1[1] + fac * cp2[1]) / 255.0f;
1200 r_col[2] = ((1.0f - fac) * cp1[2] + fac * cp2[2]) / 255.0f;
1208 CLAMP(fac, 0.0f, 1.0f);
1209 r_col[0] = ((1.0f - fac) * cp1[0] + fac * cp2[0]) / 255.0f;
1210 r_col[1] = ((1.0f - fac) * cp1[1] + fac * cp2[1]) / 255.0f;
1211 r_col[2] = ((1.0f - fac) * cp1[2] + fac * cp2[2]) / 255.0f;
1212 r_col[3] = ((1.0f - fac) * cp1[3] + fac * cp2[3]) / 255.0f;
1225 return float(cp[0]);
1237 return float(cp[0]);
1249 col[0] = float(cp[0]) / 255.0f;
1250 col[1] = float(cp[1]) / 255.0f;
1251 col[2] = float(cp[2]) / 255.0f;
1257 col[0] = float(cp[0]) / 255.0f;
1258 col[1] = float(cp[1]) / 255.0f;
1259 col[2] = float(cp[2]) / 255.0f;
1260 col[3] = float(cp[3]) / 255.0f;
1266 col[0] = float(cp[0]) / 255.0f;
1267 col[1] = float(cp[1]) / 255.0f;
1268 col[2] = float(cp[2]) / 255.0f;
1269 col[3] = float(cp[3]) / 255.0f;
1277 r = offset + int(cp[0]);
1279 g = offset + int(cp[1]);
1281 b = offset + int(cp[2]);
1284 col[0] = float(r) / 255.0f;
1285 col[1] = float(g) / 255.0f;
1286 col[2] = float(
b) / 255.0f;
1294 r = offset + int(cp[0]);
1296 g = offset + int(cp[1]);
1298 b = offset + int(cp[2]);
1307 int colorid1,
int colorid2,
float fac,
int offset,
uchar col[3])
1312 CLAMP(fac, 0.0f, 1.0f);
1315 blend[0] = (offset +
floorf((1.0f - fac) * cp1[0] + fac * cp2[0])) / 255.0f;
1316 blend[1] = (offset +
floorf((1.0f - fac) * cp1[1] + fac * cp2[1])) / 255.0f;
1317 blend[2] = (offset +
floorf((1.0f - fac) * cp1[2] + fac * cp2[2])) / 255.0f;
1327 r = offset + int(cp[0]);
1329 g = offset + int(cp[1]);
1331 b = offset + int(cp[2]);
1345 r = coloffset + int(cp[0]);
1347 g = coloffset + int(cp[1]);
1349 b = coloffset + int(cp[2]);
1351 a = alphaoffset + int(cp[3]);
1354 col[0] = float(r) / 255.0f;
1355 col[1] = float(g) / 255.0f;
1356 col[2] = float(
b) / 255.0f;
1357 col[3] = float(a) / 255.0f;
1366 CLAMP(fac, 0.0f, 1.0f);
1368 r = offset +
floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
1370 g = offset +
floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
1372 b = offset +
floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
1375 col[0] = float(r) / 255.0f;
1376 col[1] = float(g) / 255.0f;
1377 col[2] = float(
b) / 255.0f;
1386 CLAMP(fac, 0.0f, 1.0f);
1388 r = offset +
floorf((1.0f - fac) * cp1[0] + fac * cp2[0]);
1390 g = offset +
floorf((1.0f - fac) * cp1[1] + fac * cp2[1]);
1392 b = offset +
floorf((1.0f - fac) * cp1[2] + fac * cp2[2]);
1395 a =
floorf((1.0f - fac) * cp1[3] + fac * cp2[3]);
1398 col[0] = float(r) / 255.0f;
1399 col[1] = float(g) / 255.0f;
1400 col[2] = float(
b) / 255.0f;
1401 col[3] = float(a) / 255.0f;
1417 r = offset + int(cp[0]);
1419 g = offset + int(cp[1]);
1421 b = offset + int(cp[2]);
1427 col[0] = float(r) / 255.0f;
1428 col[1] = float(g) / 255.0f;
1429 col[2] = float(
b) / 255.0f;
1430 col[3] = float(a) / 255.0f;
1445 col[0] = float(cp[0]) / 255.0f;
1446 col[1] = float(cp[1]) / 255.0f;
1447 col[2] = float(cp[2]) / 255.0f;
1500 r = offset + int(cp[0]);
1501 g = offset + int(cp[1]);
1502 b = offset + int(cp[2]);
1514 const uchar cp1[3],
const uchar cp2[3],
float fac,
int offset,
uchar r_col[3])
1518 CLAMP(fac, 0.0f, 1.0f);
1519 r = offset +
floor((1.0f - fac) * cp1[0] + fac * cp2[0]);
1520 g = offset +
floor((1.0f - fac) * cp1[1] + fac * cp2[1]);
1521 b = offset +
floor((1.0f - fac) * cp1[2] + fac * cp2[2]);
void BLF_color4ubv(int fontid, const unsigned char rgba[4])
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_listbase_rotate_first(ListBase *lb, void *vlink) ATTR_NONNULL(1
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4])
char * STRNCPY(char(&dst)[N], const char *src)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
const bTheme U_theme_default
@ RGN_TYPE_ASSET_SHELF_HEADER
bool ED_region_is_overlap(int spacetype, int regiontype)
void GPU_clear_color(float red, float green, float blue, float alpha)
Read Guarded memory(de)allocation.
@ TH_TIME_SCRUB_BACKGROUND
@ TH_TRANSPARENT_CHECKER_PRIMARY
@ TH_WIDGET_TEXT_HIGHLIGHT
@ TH_TIME_MARKER_LINE_SELECTED
@ TH_DOPESHEET_CHANNELSUBOB
@ TH_TRANSPARENT_CHECKER_SECONDARY
@ TH_HANDLE_SEL_AUTOCLAMP
@ TH_KEYTYPE_KEYFRAME_SELECT
@ TH_STITCH_PREVIEW_UNSTITCHABLE
@ TH_KEYTYPE_BREAKDOWN_SELECT
@ TH_HANDLE_VERTEX_SELECT
@ TH_STITCH_PREVIEW_ACTIVE
@ TH_KEYTYPE_EXTREME_SELECT
@ TH_NODE_ZONE_FOREACH_GEOMETRY_ELEMENT
@ TH_EDITOR_OUTLINE_ACTIVE
@ TH_KEYTYPE_MOVEHOLD_SELECT
@ TH_KEYTYPE_JITTER_SELECT
@ TH_TRANSPARENT_CHECKER_SIZE
@ TH_STITCH_PREVIEW_STITCHABLE
@ TH_NODE_ZONE_SIMULATION
@ TH_WIDGET_TEXT_SELECTION
@ TH_KEYTYPE_GENERATED_SELECT
@ TH_PATH_KEYFRAME_BEFORE
void * MEM_callocN(size_t len, const char *str)
#define unit_float_to_uchar_clamp_v3(v1, v2)
static void error(const char *str)
bool UI_GetIconThemeColor4ubv(int colorid, uchar col[4])
void UI_Theme_Store(bThemeState *theme_state)
void UI_GetColorPtrBlendShade3ubv(const uchar cp1[3], const uchar cp2[3], float fac, int offset, uchar r_col[3])
void UI_Theme_Restore(const bThemeState *theme_state)
void UI_GetThemeColorType3fv(int colorid, int spacetype, float col[3])
void UI_GetColorPtrShade3ubv(const uchar cp[3], int offset, uchar r_col[3])
void UI_GetThemeColor3fv(int colorid, float col[3])
void UI_make_axis_color(const uchar col[3], const char axis, uchar r_col[3])
const uchar * UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
int UI_GetThemeValueType(int colorid, int spacetype)
void UI_GetThemeColorBlend4f(int colorid1, int colorid2, float fac, float r_col[4])
void UI_GetThemeColorShade3fv(int colorid, int offset, float col[3])
void UI_GetThemeColorBlendShade4fv(int colorid1, int colorid2, float fac, int offset, float col[4])
void UI_GetThemeColorShadeAlpha4ubv(int colorid, int coloffset, int alphaoffset, uchar col[4])
void UI_ThemeClearColor(int colorid)
float UI_GetThemeValueTypef(int colorid, int spacetype)
void UI_GetThemeColorType4fv(int colorid, int spacetype, float col[4])
void UI_GetThemeColorShade4ubv(int colorid, int offset, uchar col[4])
void UI_GetThemeColorBlendShade3fv(int colorid1, int colorid2, float fac, int offset, float col[3])
void UI_GetThemeColorShadeAlpha4fv(int colorid, int coloffset, int alphaoffset, float col[4])
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_GetThemeColorShade4fv(int colorid, int offset, float col[4])
void UI_GetThemeColor4ubv(int colorid, uchar col[4])
void UI_style_init_default()
int UI_GetThemeValue(int colorid)
void UI_GetThemeColorBlend3f(int colorid1, int colorid2, float fac, float r_col[3])
void UI_FontThemeColor(int fontid, int colorid)
static bThemeState g_theme_state
void UI_GetThemeColorBlend3ubv(int colorid1, int colorid2, float fac, uchar col[3])
float UI_GetThemeValuef(int colorid)
void UI_GetThemeColorBlendShade3ubv(int colorid1, int colorid2, float fac, int offset, uchar col[3])
void UI_SetTheme(int spacetype, int regionid)
void UI_theme_init_default()
void UI_GetThemeColorType3ubv(int colorid, int spacetype, uchar col[3])
void UI_GetThemeColorShade3ubv(int colorid, int offset, uchar col[3])
void UI_GetThemeColorType4ubv(int colorid, int spacetype, uchar col[4])
void UI_GetThemeColor3ubv(int colorid, uchar col[3])
int UI_ThemeMenuShadowWidth()
unsigned char header_back[4]
unsigned char keytype_keyframe_select[4]
unsigned char back_grad[4]
unsigned char preview_stitch_vert[4]
unsigned char path_before[4]
unsigned char edge_bevel[4]
unsigned char noodle_curving
unsigned char active_strip[4]
unsigned char edge_mode_select[4]
unsigned char lock_marker[4]
unsigned char movieclip[4]
unsigned char bundle_solid[4]
unsigned char dis_marker[4]
unsigned char ds_ipoline[4]
ThemeAssetShelf asset_shelf
unsigned char handle_sel_auto[4]
unsigned char time_scrub_background[4]
unsigned char active_object[4]
unsigned char nodeclass_filter[4]
unsigned char keytype_jitter[4]
unsigned char keytype_keyframe[4]
unsigned char keytype_breakdown_select[4]
unsigned char anim_active[4]
unsigned char anim_non_active[4]
unsigned char handle_free[4]
unsigned char console_info[4]
unsigned char edge_crease[4]
unsigned char group_active[4]
unsigned char edge_select[4]
unsigned char handle_sel_vect[4]
unsigned char selected_highlight[4]
unsigned char editmesh_active[4]
unsigned char console_select[4]
unsigned char vertex_size
unsigned char keytype_extreme[4]
unsigned char gp_vertex_size
unsigned char ds_subchannel[4]
unsigned char gp_vertex_select[4]
unsigned char sel_marker[4]
unsigned char navigation_bar[4]
unsigned char keytype_movehold_select[4]
unsigned char vertex_unreferenced[4]
unsigned char list_text[4]
unsigned char transition[4]
unsigned char keytype_extreme_select[4]
unsigned char vertex_select[4]
unsigned char outline_width
unsigned char selected_object[4]
unsigned char time_marker_line_selected[4]
unsigned char header_text_hi[4]
unsigned char face_back[4]
unsigned char selected_text[4]
unsigned char info_property_text[4]
unsigned char time_keyframe[4]
unsigned char transform[4]
unsigned char handle_vertex_size
unsigned char before_current_frame[4]
unsigned char face_dot[4]
unsigned char marker_outline[4]
unsigned char bone_pose_active[4]
unsigned char obcenter_dia
unsigned char act_marker[4]
unsigned char camera_path[4]
unsigned char nla_meta[4]
unsigned char info_selected_text[4]
uiPanelColors panelcolors
unsigned char handle_vect[4]
unsigned char handle_auto[4]
unsigned char extra_edge_len[4]
unsigned char list_title[4]
unsigned char view_overlay[4]
unsigned char wire_edit[4]
unsigned char skin_root[4]
unsigned char node_zone_repeat[4]
unsigned char after_current_frame[4]
unsigned char console_error[4]
unsigned char camera_passepartout[4]
unsigned char handle_auto_clamped[4]
unsigned char keytype_breakdown[4]
unsigned char bone_solid[4]
unsigned char clipping_border_3d[4]
unsigned char extra_edge_angle[4]
unsigned char face_select[4]
unsigned char facedot_size
unsigned char loop_normal[4]
unsigned char nla_track[4]
unsigned char node_zone_foreach_geometry_element[4]
unsigned char nodeclass_vector[4]
unsigned char button_text_hi[4]
unsigned char preview_stitch_face[4]
unsigned char freestyle_face_mark[4]
unsigned char nodeclass_layout[4]
unsigned char path_after[4]
unsigned char edge_facesel[4]
unsigned char button_title[4]
unsigned char bone_locked_weight[4]
unsigned char keyborder_select[4]
unsigned char extra_face_angle[4]
unsigned char tab_back[4]
unsigned char vertex_bevel[4]
unsigned char metadatatext[4]
unsigned char preview_stitch_edge[4]
unsigned char nodeclass_attribute[4]
unsigned char face_mode_select[4]
unsigned char freestyle_edge_mark[4]
unsigned char anim_preview_range[4]
unsigned char preview_back[4]
unsigned char gp_vertex[4]
unsigned char extra_face_area[4]
unsigned char handle_sel_align[4]
unsigned char lastsel_point[4]
unsigned char nurb_sel_vline[4]
unsigned char line_numbers[4]
unsigned char node_zone_simulation[4]
unsigned char preview_stitch_stitchable[4]
unsigned char console_cursor[4]
unsigned char text_strip[4]
unsigned char button_text[4]
unsigned char metadatabg[4]
unsigned char preview_stitch_unstitchable[4]
unsigned char nurb_sel_uline[4]
unsigned char info_property[4]
unsigned char info_selected[4]
unsigned char nurb_vline[4]
unsigned char text_strip_cursor[4]
unsigned char bone_pose[4]
unsigned char edge_sharp[4]
unsigned char handle_align[4]
unsigned char color_strip[4]
unsigned char vertex_active[4]
unsigned char preview_stitch_active[4]
unsigned char nodeclass_geometry[4]
unsigned char path_keyframe_before[4]
unsigned char nodeclass_script[4]
unsigned char tab_inactive[4]
unsigned char nodeclass_shader[4]
unsigned char time_marker_line[4]
unsigned char paint_curve_pivot[4]
unsigned char nodeclass_pattern[4]
unsigned char vertex_normal[4]
unsigned char nla_tweakdupli[4]
unsigned char info_debug_text[4]
unsigned char nla_transition[4]
unsigned char face_retopology[4]
unsigned char nla_sound_sel[4]
unsigned char grid_levels
unsigned char nla_sound[4]
unsigned char header_text[4]
unsigned char uv_shadow[4]
unsigned char edited_object[4]
unsigned char node_zone_closure[4]
unsigned char path_keyframe_after[4]
unsigned char keytype_generated[4]
unsigned char edge_seam[4]
unsigned char nla_transition_sel[4]
unsigned char nodeclass_output[4]
unsigned char info_operator[4]
unsigned char simulated_frames[4]
unsigned char header_title[4]
unsigned char handle_sel_auto_clamped[4]
unsigned char info_operator_text[4]
unsigned char tab_active[4]
unsigned char console_output[4]
unsigned char act_spline[4]
unsigned char info_info_text[4]
unsigned char time_gp_keyframe[4]
unsigned char handle_vertex_select[4]
unsigned char handle_sel_free[4]
unsigned char nurb_uline[4]
unsigned char keytype_movehold[4]
unsigned char info_debug[4]
unsigned char nodeclass_texture[4]
unsigned char paint_curve_handle[4]
unsigned char face_front[4]
unsigned char handle_vertex[4]
unsigned char keyborder[4]
unsigned char execution_buts[4]
unsigned char row_alternate[4]
unsigned char ds_channel[4]
unsigned char nla_tweaking[4]
unsigned char list_text_hi[4]
unsigned char console_input[4]
unsigned char nla_meta_sel[4]
unsigned char strip_select[4]
unsigned char info_warning_text[4]
unsigned char tab_outline[4]
unsigned char info_error_text[4]
unsigned char selected_strip[4]
unsigned char keytype_generated_select[4]
unsigned char keytype_jitter_select[4]
unsigned char gizmo_primary[4]
unsigned char editor_border[4]
unsigned char transparent_checker_secondary[4]
unsigned char icon_modifier[4]
unsigned char editor_outline_active[4]
unsigned char icon_shading[4]
unsigned char transparent_checker_size
unsigned char gizmo_view_align[4]
unsigned char icon_folder[4]
unsigned char icon_scene[4]
unsigned char gizmo_hi[4]
unsigned char editor_outline[4]
unsigned char gizmo_secondary[4]
unsigned char icon_object[4]
uiWidgetStateColors wcol_state
uiWidgetColors wcol_scroll
unsigned char icon_collection[4]
unsigned char widget_text_cursor[4]
unsigned char widget_emboss[4]
unsigned char transparent_checker_primary[4]
unsigned char icon_autokey[4]
unsigned char icon_object_data[4]
ThemeSpace space_sequencer
ThemeSpace space_properties
ThemeSpace space_outliner
ThemeSpace space_preferences
ThemeSpace space_spreadsheet
ThemeSpace space_statusbar
unsigned char sub_back[4]
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)