Blender V5.0
resources.cc File Reference
#include <cmath>
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "BKE_addon.h"
#include "BKE_appdir.hh"
#include "BLO_userdef_default.h"
#include "BLF_api.hh"
#include "ED_screen.hh"
#include "UI_interface_icons.hh"
#include "GPU_framebuffer.hh"
#include "interface_intern.hh"

Go to the source code of this file.

Functions

Init/Exit
void ui_resources_init ()
void ui_resources_free ()
Themes
const ucharUI_ThemeGetColorPtr (bTheme *btheme, int spacetype, int colorid)
void UI_theme_init_default ()
void UI_style_init_default ()
void UI_SetTheme (int spacetype, int regionid)
bThemeUI_GetTheme ()
void UI_Theme_Store (bThemeState *theme_state)
void UI_Theme_Restore (const bThemeState *theme_state)
void UI_GetThemeColorShadeAlpha4ubv (int colorid, int coloffset, int alphaoffset, uchar col[4])
void UI_GetThemeColorBlend3ubv (int colorid1, int colorid2, float fac, uchar col[3])
void UI_GetThemeColorBlend3f (int colorid1, int colorid2, float fac, float r_col[3])
void UI_GetThemeColorBlend4f (int colorid1, int colorid2, float fac, float r_col[4])
void UI_FontThemeColor (int fontid, int colorid)
float UI_GetThemeValuef (int colorid)
int UI_GetThemeValue (int colorid)
float UI_GetThemeValueTypef (int colorid, int spacetype)
int UI_GetThemeValueType (int colorid, int spacetype)
void UI_GetThemeColor3fv (int colorid, float col[3])
void UI_GetThemeColor4fv (int colorid, float col[4])
void UI_GetThemeColorType4fv (int colorid, int spacetype, float col[4])
void UI_GetThemeColorShade3fv (int colorid, int offset, float col[3])
void UI_GetThemeColorShade3ubv (int colorid, int offset, uchar col[3])
void UI_GetThemeColorBlendShade3ubv (int colorid1, int colorid2, float fac, int offset, uchar col[3])
void UI_GetThemeColorShade4ubv (int colorid, int offset, uchar col[4])
void UI_GetThemeColorShadeAlpha4fv (int colorid, int coloffset, int alphaoffset, float col[4])
void UI_GetThemeColorBlendShade3fv (int colorid1, int colorid2, float fac, int offset, float col[3])
void UI_GetThemeColorBlendShade4fv (int colorid1, int colorid2, float fac, int offset, float col[4])
void UI_GetThemeColor3ubv (int colorid, uchar col[3])
void UI_GetThemeColorShade4fv (int colorid, int offset, float col[4])
void UI_GetThemeColor4ubv (int colorid, uchar col[4])
void UI_GetThemeColorType3fv (int colorid, int spacetype, float col[3])
void UI_GetThemeColorType3ubv (int colorid, int spacetype, uchar col[3])
void UI_GetThemeColorType4ubv (int colorid, int spacetype, uchar col[4])
bool UI_GetIconThemeColor4ubv (int colorid, uchar col[4])
void UI_GetColorPtrBlendAlpha4fv (const float cp1[4], const float cp2[4], float fac, const float alphaoffset, float r_col[4])
void UI_GetColorPtrShade3ubv (const uchar cp[3], int offset, uchar r_col[3])
void UI_GetColorPtrBlendShade3ubv (const uchar cp1[3], const uchar cp2[3], float fac, int offset, uchar r_col[3])
void UI_ThemeClearColor (int colorid)
int UI_ThemeMenuShadowWidth ()
void UI_make_axis_color (const uchar col[3], const char axis, uchar r_col[3])

Variables

static bThemeState g_theme_state

Function Documentation

◆ UI_FontThemeColor()

◆ UI_GetColorPtrBlendAlpha4fv()

void UI_GetColorPtrBlendAlpha4fv ( const float cp1[4],
const float cp2[4],
float fac,
float alphaoffset,
float r_col[4] )

Get four color values, range 0.0-1.0, blended between two other float color pointers, complete with offset for the alpha component.

Definition at line 1495 of file resources.cc.

References b, and CLAMP.

Referenced by blender::ed::space_node::node_draw_basis(), and blender::ed::space_node::node_header_color_get().

◆ UI_GetColorPtrBlendShade3ubv()

void UI_GetColorPtrBlendShade3ubv ( const unsigned char cp1[3],
const unsigned char cp2[3],
float fac,
int offset,
unsigned char r_col[3] )

Get a 3 byte color, blended and shaded between two other char color pointers.

Definition at line 1534 of file resources.cc.

References b, CLAMP, and floor.

Referenced by blender::ed::vse::color3ubv_from_seq(), blender::ed::vse::draw_strips_background(), and UI_make_axis_color().

◆ UI_GetColorPtrShade3ubv()

void UI_GetColorPtrShade3ubv ( const unsigned char cp[3],
int offset,
unsigned char r_col[3] )

Shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor).

Definition at line 1517 of file resources.cc.

References b, and CLAMP.

Referenced by blender::ed::vse::color3ubv_from_seq(), blender::ed::vse::draw_strip_offsets(), blender::ed::vse::draw_strips_background(), and blender::ed::vse::strip_data_outline_params_set().

◆ UI_GetIconThemeColor4ubv()

bool UI_GetIconThemeColor4ubv ( int colorid,
unsigned char col[4] )

Get theme color for coloring monochrome icons.

Definition at line 1466 of file resources.cc.

References col, g_theme_state, RGN_TYPE_NAV_BAR, RGN_TYPE_WINDOW, SPACE_FILE, SPACE_OUTLINER, SPACE_PROPERTIES, TH_ICON_FUND, and UI_ThemeGetColorPtr().

Referenced by UI_icon_get_theme_color().

◆ UI_GetTheme()

◆ UI_GetThemeColor3fv()

void UI_GetThemeColor3fv ( int colorid,
float col[3] )

Get three color values, scaled to 0.0-1.0 range.

Definition at line 1245 of file resources.cc.

References col, float, g_theme_state, and UI_ThemeGetColorPtr().

Referenced by acf_generic_dataexpand_color(), acf_generic_root_color(), acf_group_color(), acf_summary_color(), annotation_draw_onionskins(), blender::draw::overlay::Resources::background_color_get(), blender::draw::overlay::ModeTransfer::begin_sync(), blender::ed::curves::curve_draw_stroke_3d(), curve_draw_stroke_3d(), blender::ed::animation::greasepencil::datablock_color(), blender::ed::space_node::draw_background_color(), blender::ed::vse::draw_cursor_2d(), draw_fcurve_handles(), draw_fcurve_selected_handle_vertices(), draw_primitive_view(), draw_single_handle(), draw_textscroll(), ED_region_do_draw(), ED_region_draw_overflow_indication(), ED_region_grid_draw(), ED_region_image_render_region_draw(), ED_view3d_background_color_get(), ED_view3d_text_colors_get(), blender::ed::view3d::geometry_nodes_gizmos::get_axis_gizmo_colors(), gizmo_axis_draw(), gizmo_mesh_bisect_setup(), blender::ed::transform::gizmo_mesh_extrude_setup(), gizmo_mesh_placement_setup(), gizmo_mesh_spin_init_setup(), gizmo_mesh_spin_redo_setup(), graph_refresh_fcurve_colors(), immUniformThemeColor3(), immUniformThemeColorAlpha(), blender::ed::animation::greasepencil::layer_group_color(), nla_strip_get_color_inside(), blender::ed::outliner::outliner_draw_highlights(), plane_track_colors(), region_draw_gradient(), set_fcurve_vertex_color(), blender::draw::overlay::ShapeCache::ShapeCache(), blender::ed::vse::strip_draw_image_origin_and_outline(), tool_generic_create_gizmo(), track_channel_color(), track_colors(), blender::ed::transform::transform_draw_cursor_draw(), UI_ThemeClearColor(), ui_tooltip_region_draw_cb(), UI_view2d_dot_grid_draw(), blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_style(), blender::ed::view3d::geometry_nodes_gizmos::LinearGizmo::update_style(), WIDGETGROUP_armature_spline_setup(), WIDGETGROUP_camera_setup(), WIDGETGROUP_empty_image_setup(), WIDGETGROUP_forcefield_setup(), WIDGETGROUP_light_area_setup(), WIDGETGROUP_light_point_setup(), WIDGETGROUP_light_spot_setup(), WIDGETGROUP_light_target_setup(), WIDGETGROUP_mesh_preselect_edgering_setup(), WIDGETGROUP_mesh_preselect_elem_setup(), blender::ed::transform::WIDGETGROUP_xform_shear_setup(), wm_window_decoration_style_set_from_theme(), and wm_window_ghostwindow_add().

◆ UI_GetThemeColor3ubv()

◆ UI_GetThemeColor4fv()

void UI_GetThemeColor4fv ( int colorid,
float col[4] )

Get four color values, scaled to 0.0-1.0 range.

Definition at line 1253 of file resources.cc.

References col, float, g_theme_state, and UI_ThemeGetColorPtr().

Referenced by blender::draw::overlay::MeshUVs::begin_sync(), blender::draw::overlay::Text::begin_sync(), channel_ui_data_init(), clip_draw_dopesheet_main(), blender::ed::greasepencil::control_point_colors_and_sizes(), draw_background(), draw_current_frame(), draw_fcurve_active_handle_vertices(), draw_keyframe_shape(), blender::ed::space_node::draw_link_errors(), draw_marker_areas(), draw_text_decoration(), draw_text_main(), draw_vertical_scale_indicators(), blender::ed::transform::drawAutoKeyWarning(), ED_region_clear(), ED_region_grid_draw(), ED_scene_draw_fps(), ED_screen_draw_edges(), blender::draw::overlay::MeshUVs::end_sync(), file_draw_preview(), file_draw_special_image(), blender::ed::space_node::frame_node_draw_background(), blender::ed::transform::gizmo2d_get_axis_color(), blender::ed::transform::gizmo2d_resize_setup(), blender::ed::transform::gizmo2d_rotate_setup(), blender::ed::transform::gizmo2d_xform_setup(), blender::ed::transform::gizmo_get_axis_color(), icon_draw_icon(), icon_draw_rect_input_text(), icon_draw_size(), imm_draw_box_checker_2d(), immUniformThemeColor(), nla_action_get_color(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_collapsed(), blender::ed::space_node::node_draw_node_group_indicator(), blender::ed::space_node::node_draw_panels_background(), blender::ed::space_node::node_draw_zones_and_frames(), blender::ed::space_node::node_header_color_get(), blender::ed::space_node::nodelink_batch_draw(), blender::ed::space_node::nodelink_get_draw_config(), blender::ed::outliner::outliner_back(), blender::ed::outliner::outliner_draw_highlights(), blender::ed::outliner::outliner_draw_iconrow_doit(), blender::ed::outliner::outliner_draw_tree_element(), blender::ed::outliner::outliner_icon_background_colors(), panel_draw_aligned_backdrop(), panel_draw_border(), radial_control_paint_cursor(), region_draw_gradient(), region_draw_status_text(), screen_draw_dock_preview(), screen_draw_move_highlight(), screen_draw_split_preview(), blender::ed::asset::screenshot_preview_draw(), stitch_draw(), text_info_row(), timeline_cache_draw_geometry_nodes(), timeline_cache_draw_single(), track_channel_color(), tracking_segment_start_cb(), ui_draw_but_HISTOGRAM(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_VECTORSCOPE(), ui_draw_but_WAVEFORM(), ui_draw_button_sections_alignment_separator(), ui_draw_button_sections_background(), ui_draw_dialog_alert(), UI_panel_category_draw_all(), ui_tooltip_region_draw_cb(), blender::draw::overlay::Resources::update_theme_settings(), widget_pulldownbut(), and wm_drop_redalert_draw().

◆ UI_GetThemeColor4ubv()

◆ UI_GetThemeColorBlend3f()

void UI_GetThemeColorBlend3f ( int colorid1,
int colorid2,
float fac,
float r_col[3] )

Definition at line 1191 of file resources.cc.

References CLAMP, g_theme_state, and UI_ThemeGetColorPtr().

◆ UI_GetThemeColorBlend3ubv()

void UI_GetThemeColorBlend3ubv ( int colorid1,
int colorid2,
float fac,
uchar col[3] )

◆ UI_GetThemeColorBlend4f()

void UI_GetThemeColorBlend4f ( int colorid1,
int colorid2,
float fac,
float r_col[4] )

◆ UI_GetThemeColorBlendShade3fv()

void UI_GetThemeColorBlendShade3fv ( int colorid1,
int colorid2,
float fac,
int offset,
float col[3] )

Get four color values, range 0.0-1.0, complete with shading offset for the RGB components and blending.

Definition at line 1359 of file resources.cc.

References b, CLAMP, col, float, floorf, g_theme_state, and UI_ThemeGetColorPtr().

Referenced by blender::draw::overlay::ShapeCache::ShapeCache(), and blender::draw::overlay::Resources::update_theme_settings().

◆ UI_GetThemeColorBlendShade3ubv()

void UI_GetThemeColorBlendShade3ubv ( int colorid1,
int colorid2,
float fac,
int offset,
unsigned char col[3] )

Get three color values, range 0-255, complete with shading offset for the RGB components and blending.

Definition at line 1305 of file resources.cc.

References blend(), CLAMP, col, floorf, g_theme_state, UI_ThemeGetColorPtr(), and unit_float_to_uchar_clamp_v3.

Referenced by blender::ed::space_node::frame_node_draw_label(), and UI_view2d_multi_grid_draw().

◆ UI_GetThemeColorBlendShade4fv()

◆ UI_GetThemeColorShade3fv()

void UI_GetThemeColorShade3fv ( int colorid,
int offset,
float col[3] )

◆ UI_GetThemeColorShade3ubv()

void UI_GetThemeColorShade3ubv ( int colorid,
int offset,
uchar col[3] )

◆ UI_GetThemeColorShade4fv()

◆ UI_GetThemeColorShade4ubv()

void UI_GetThemeColorShade4ubv ( int colorid,
int offset,
uchar col[4] )

◆ UI_GetThemeColorShadeAlpha4fv()

void UI_GetThemeColorShadeAlpha4fv ( int colorid,
int coloffset,
int alphaoffset,
float col[4] )

◆ UI_GetThemeColorShadeAlpha4ubv()

void UI_GetThemeColorShadeAlpha4ubv ( int colorid,
int coloffset,
int alphaoffset,
unsigned char col[4] )

Get four color values ranged between 0 and 255; includes the alpha channel.

Definition at line 1161 of file resources.cc.

References b, CLAMP, col, g_theme_state, and UI_ThemeGetColorPtr().

Referenced by immThemeColorShadeAlpha().

◆ UI_GetThemeColorType3fv()

void UI_GetThemeColorType3fv ( int colorid,
int spacetype,
float col[3] )

Get a theme color from specified space type.

Definition at line 1441 of file resources.cc.

References col, float, g_theme_state, and UI_ThemeGetColorPtr().

◆ UI_GetThemeColorType3ubv()

void UI_GetThemeColorType3ubv ( int colorid,
int spacetype,
uchar col[3] )

Definition at line 1449 of file resources.cc.

References col, g_theme_state, and UI_ThemeGetColorPtr().

Referenced by knife_init_colors().

◆ UI_GetThemeColorType4fv()

void UI_GetThemeColorType4fv ( int colorid,
int spacetype,
float col[4] )

Get four color values from specified space type, scaled to 0.0-1.0 range.

Definition at line 1262 of file resources.cc.

References col, float, g_theme_state, and UI_ThemeGetColorPtr().

Referenced by icon_node_socket_draw(), blender::ed::space_node::node_socket_outline_color_get(), blender::ed::sculpt_paint::paint_draw_curve_cursor(), and widget_nodesocket().

◆ UI_GetThemeColorType4ubv()

void UI_GetThemeColorType4ubv ( int colorid,
int spacetype,
uchar col[4] )

◆ UI_GetThemeValue()

int UI_GetThemeValue ( int colorid)

Get individual values, not scaled.

Definition at line 1227 of file resources.cc.

References g_theme_state, and UI_ThemeGetColorPtr().

Referenced by blender::draw::overlay::Background::begin_sync(), and imm_draw_box_checker_2d().

◆ UI_GetThemeValuef()

◆ UI_GetThemeValueType()

int UI_GetThemeValueType ( int colorid,
int spacetype )

◆ UI_GetThemeValueTypef()

float UI_GetThemeValueTypef ( int colorid,
int spacetype )

Definition at line 1233 of file resources.cc.

References float, g_theme_state, and UI_ThemeGetColorPtr().

◆ UI_make_axis_color()

void UI_make_axis_color ( const uchar col[3],
const char axis,
uchar r_col[3] )

◆ ui_resources_free()

void ui_resources_free ( )

Definition at line 54 of file resources.cc.

References UI_icons_free().

Referenced by UI_exit().

◆ ui_resources_init()

void ui_resources_init ( )

Definition at line 49 of file resources.cc.

References UI_icons_init().

Referenced by UI_init().

◆ UI_SetTheme()

◆ UI_style_init_default()

void UI_style_init_default ( )

Definition at line 1118 of file resources.cc.

References BLI_freelistN(), U, and uiStyleInit().

Referenced by preferences_reset_default_theme_exec().

◆ UI_theme_init_default()

void UI_theme_init_default ( )

Initialize default theme.

Note
When you add new colors, created & saved themes need initialized use function below, #init_userdef_do_versions.

Definition at line 1097 of file resources.cc.

References bTheme::active_theme_area, BLI_addhead(), BLI_findstring(), BLI_listbase_rotate_first(), MEM_callocN(), MEMCPY_STRUCT_AFTER, bTheme::name, name, offsetof, STRNCPY_UTF8, U, U_theme_default, and UI_SetTheme().

Referenced by preferences_reset_default_theme_exec().

◆ UI_Theme_Restore()

◆ UI_Theme_Store()

void UI_Theme_Store ( bThemeState * theme_state)

◆ UI_ThemeClearColor()

◆ UI_ThemeGetColorPtr()

const uchar * UI_ThemeGetColorPtr ( bTheme * btheme,
int spacetype,
int colorid )

Only for buttons in theme editor!

Definition at line 65 of file resources.cc.

References ThemeSpace::act_marker, ThemeSpace::active, ThemeSpace::active_object, ThemeSpace::active_strip, ThemeSpace::after_current_frame, ThemeCommon::anim, ThemeSpace::anim_active, ThemeSpace::anim_non_active, ThemeRegions::asset_shelf, ThemeSpace::audio, ThemeRegionsAssetShelf::back, ThemeRegionsChannels::back, ThemeRegionsScrubbing::back, ThemeRegionsSidebars::back, ThemeSpace::back, ThemeSpace::back_grad, ThemeSpace::background_type, ThemeSpace::before_current_frame, ThemeSpace::bevel, BLI_assert, BLI_findindex(), ThemeSpace::bone_locked_weight, ThemeSpace::bone_pose, ThemeSpace::bone_pose_active, ThemeSpace::bone_solid, ThemeSpace::bundle_solid, ThemeSpace::camera, ThemeSpace::camera_passepartout, ThemeSpace::camera_path, ThemeCommonAnim::channel, ThemeCommonAnim::channel_group, ThemeCommonAnim::channel_group_active, ThemeCommonAnim::channel_selected, ThemeCommonAnim::channels, ThemeRegions::channels, ThemeCommonAnim::channels_sub, ThemeSpace::clipping_border_3d, ThemeSpace::color_strip, bTheme::common, ThemeSpace::console_cursor, ThemeSpace::console_error, ThemeSpace::console_info, ThemeSpace::console_input, ThemeSpace::console_output, ThemeSpace::console_select, copy_v4_v4_uchar(), ThemeSpace::crease, ThemeCommon::curves, ThemeSpace::dis_marker, ThemeSpace::ds_ipoline, ED_region_is_overlap(), ThemeSpace::edge, ThemeSpace::edge_mode_select, ThemeSpace::edge_select, ThemeSpace::edge_width, ThemeSpace::edited_object, ThemeSpace::editmesh_active, ThemeUI::editor_border, ThemeUI::editor_outline, ThemeUI::editor_outline_active, ThemeSpace::effect, ELEM, ThemeSpace::empty, error(), uiWidgetStateColors::error, ThemeSpace::extra_edge_angle, ThemeSpace::extra_edge_len, ThemeSpace::extra_face_angle, ThemeSpace::extra_face_area, ThemeSpace::face, ThemeSpace::face_back, ThemeSpace::face_front, ThemeSpace::face_mode_select, ThemeSpace::face_retopology, ThemeSpace::face_select, ThemeSpace::facedot_size, ThemeSpace::freestyle, g_theme_state, ThemeUI::gizmo_a, ThemeUI::gizmo_b, ThemeUI::gizmo_hi, ThemeUI::gizmo_primary, ThemeUI::gizmo_secondary, ThemeUI::gizmo_view_align, ThemeSpace::gp_vertex, ThemeSpace::gp_vertex_select, ThemeSpace::gp_vertex_size, ThemeSpace::grid, ThemeSpace::grid_levels, ThemeCommonCurves::handle_align, ThemeCommonCurves::handle_auto, ThemeCommonCurves::handle_auto_clamped, ThemeCommonCurves::handle_free, ThemeCommonCurves::handle_sel_align, ThemeCommonCurves::handle_sel_auto, ThemeCommonCurves::handle_sel_auto_clamped, ThemeCommonCurves::handle_sel_free, ThemeCommonCurves::handle_sel_vect, ThemeCommonCurves::handle_vect, ThemeCommonCurves::handle_vertex, ThemeCommonCurves::handle_vertex_select, ThemeCommonCurves::handle_vertex_size, ThemeSpace::header, ThemeRegionsAssetShelf::header_back, ThemeSpace::header_text, ThemeSpace::header_text_hi, ThemeSpace::header_title, ThemeSpace::hilite, ThemeUI::icon_autokey, ThemeUI::icon_collection, ThemeUI::icon_folder, ThemeUI::icon_modifier, ThemeUI::icon_object, ThemeUI::icon_object_data, ThemeUI::icon_scene, ThemeUI::icon_shading, ThemeSpace::image, uiWidgetStateColors::info, ThemeSpace::info_debug, ThemeSpace::info_debug_text, ThemeSpace::info_error_text, ThemeSpace::info_info_text, ThemeSpace::info_operator, ThemeSpace::info_operator_text, ThemeSpace::info_property, ThemeSpace::info_property_text, ThemeSpace::info_selected, ThemeSpace::info_selected_text, ThemeSpace::info_warning_text, uiWidgetColors::inner, uiWidgetColors::inner_sel, uiWidgetColors::item, ThemeSpace::keyborder, ThemeSpace::keyborder_select, ThemeCommonAnim::keyframe, ThemeCommonAnim::keyframe_breakdown, ThemeCommonAnim::keyframe_breakdown_selected, ThemeCommonAnim::keyframe_extreme, ThemeCommonAnim::keyframe_extreme_selected, ThemeCommonAnim::keyframe_generated, ThemeCommonAnim::keyframe_generated_selected, ThemeCommonAnim::keyframe_jitter, ThemeCommonAnim::keyframe_jitter_selected, ThemeCommonAnim::keyframe_moving_hold, ThemeCommonAnim::keyframe_moving_hold_selected, ThemeCommonAnim::keyframe_selected, ThemeSpace::lamp, ThemeSpace::line_numbers, ThemeSpace::lock_marker, ThemeCommonAnim::long_key, ThemeCommonAnim::long_key_selected, ThemeSpace::loop_normal, ThemeSpace::marker, ThemeSpace::marker_outline, ThemeSpace::mask, ThemeSpace::match, ThemeSpace::meta, ThemeSpace::metadatabg, ThemeSpace::metadatatext, ThemeSpace::movie, ThemeSpace::movieclip, ThemeSpace::nla_meta, ThemeSpace::nla_meta_sel, ThemeSpace::nla_sound, ThemeSpace::nla_sound_sel, ThemeSpace::nla_transition, ThemeSpace::nla_transition_sel, ThemeSpace::nla_tweakdupli, ThemeSpace::nla_tweaking, ThemeSpace::node_outline, ThemeSpace::node_zone_closure, ThemeSpace::node_zone_foreach_geometry_element, ThemeSpace::node_zone_repeat, ThemeSpace::node_zone_simulation, ThemeSpace::nodeclass_attribute, ThemeSpace::nodeclass_filter, ThemeSpace::nodeclass_geometry, ThemeSpace::nodeclass_output, ThemeSpace::nodeclass_script, ThemeSpace::nodeclass_shader, ThemeSpace::nodeclass_texture, ThemeSpace::nodeclass_vector, ThemeSpace::noodle_curving, ThemeSpace::normal, ThemeSpace::nurb_sel_uline, ThemeSpace::nurb_sel_vline, ThemeSpace::nurb_uline, ThemeSpace::nurb_vline, ThemeSpace::obcenter_dia, uiWidgetColors::outline, uiWidgetColors::outline_sel, ThemeSpace::outline_width, ThemeUI::panel_active, ThemeUI::panel_back, ThemeUI::panel_header, ThemeUI::panel_outline, ThemeUI::panel_sub_back, ThemeUI::panel_text, ThemeUI::panel_title, ThemeSpace::path_after, ThemeSpace::path_before, ThemeSpace::path_keyframe_after, ThemeSpace::path_keyframe_before, ThemeCommonAnim::playhead, ThemeSpace::preview_back, ThemeCommonAnim::preview_range, ThemeSpace::preview_stitch_active, ThemeSpace::preview_stitch_edge, ThemeSpace::preview_stitch_face, ThemeSpace::preview_stitch_stitchable, ThemeSpace::preview_stitch_unstitchable, ThemeSpace::preview_stitch_vert, bTheme::regions, RGN_TYPE_ASSET_SHELF, RGN_TYPE_ASSET_SHELF_HEADER, RGN_TYPE_CHANNELS, RGN_TYPE_FOOTER, RGN_TYPE_HEADER, RGN_TYPE_NAV_BAR, RGN_TYPE_PREVIEW, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, ThemeSpace::row_alternate, ThemeSpace::scene, ThemeCommonAnim::scene_strip_range, ThemeRegions::scrubbing, ThemeSpace::seam, ThemeSpace::sel_marker, ThemeSpace::select, ThemeSpace::selected_highlight, ThemeSpace::selected_object, ThemeSpace::selected_strip, ThemeSpace::selected_text, ThemeSpace::shade1, ThemeSpace::shade2, ThemeSpace::sharp, ThemeRegions::sidebars, ThemeSpace::simulated_frames, ThemeSpace::skin_root, SPACE_ACTION, bTheme::space_action, SPACE_CLIP, bTheme::space_clip, SPACE_CONSOLE, bTheme::space_console, SPACE_FILE, bTheme::space_file, SPACE_GRAPH, bTheme::space_graph, SPACE_IMAGE, bTheme::space_image, SPACE_INFO, bTheme::space_info, SPACE_NLA, bTheme::space_nla, SPACE_NODE, bTheme::space_node, SPACE_OUTLINER, bTheme::space_outliner, bTheme::space_preferences, SPACE_PROPERTIES, bTheme::space_properties, SPACE_SEQ, bTheme::space_sequencer, SPACE_SPREADSHEET, bTheme::space_spreadsheet, SPACE_STATUSBAR, bTheme::space_statusbar, SPACE_TEXT, bTheme::space_text, SPACE_TOPBAR, bTheme::space_topbar, SPACE_USERPREF, SPACE_VIEW3D, bTheme::space_view3d, ThemeSpace::speaker, ThemeSpace::strip, ThemeSpace::strip_select, uiWidgetStateColors::success, ThemeSpace::syntaxb, ThemeSpace::syntaxc, ThemeSpace::syntaxd, ThemeSpace::syntaxl, ThemeSpace::syntaxn, ThemeSpace::syntaxr, ThemeSpace::syntaxs, ThemeSpace::syntaxv, ThemeRegionsSidebars::tab_back, ThemeRegionsChannels::text, ThemeRegionsScrubbing::text, ThemeSpace::text, uiWidgetColors::text, ThemeSpace::text_hi, uiWidgetColors::text_sel, ThemeRegionsChannels::text_selected, ThemeSpace::text_strip, ThemeSpace::text_strip_cursor, TH_ACT_MARKER, TH_ACTIVE, TH_ACTIVE_OBJECT, TH_ANIM_ACTIVE, TH_ANIM_INACTIVE, TH_ANIM_PREVIEW_RANGE, TH_ANIM_SCENE_STRIP_RANGE, TH_AXIS_W, TH_AXIS_X, TH_AXIS_Y, TH_AXIS_Z, TH_BACK, TH_BACK_GRAD, TH_BACKGROUND_TYPE, TH_BEVEL, TH_BLACK, TH_BONE_LOCKED_WEIGHT, TH_BONE_POSE, TH_BONE_POSE_ACTIVE, TH_BONE_SOLID, TH_BUNDLE_SOLID, TH_CAMERA, TH_CAMERA_PASSEPARTOUT, TH_CAMERA_PATH, TH_CFRAME, TH_CHANNEL, TH_CHANNEL_SELECT, TH_CONSOLE_CURSOR, TH_CONSOLE_ERROR, TH_CONSOLE_INFO, TH_CONSOLE_INPUT, TH_CONSOLE_OUTPUT, TH_CONSOLE_SELECT, TH_CREASE, TH_DIS_MARKER, TH_DOPESHEET_CHANNELOB, TH_DOPESHEET_CHANNELSUBOB, TH_DOPESHEET_IPOLINE, TH_DRAWEXTRA_EDGEANG, TH_DRAWEXTRA_EDGELEN, TH_DRAWEXTRA_FACEANG, TH_DRAWEXTRA_FACEAREA, TH_EDGE, TH_EDGE_MODE_SELECT, TH_EDGE_SELECT, TH_EDGE_WIDTH, TH_EDITED_OBJECT, TH_EDITMESH_ACTIVE, TH_EDITOR_BORDER, TH_EDITOR_OUTLINE, TH_EDITOR_OUTLINE_ACTIVE, TH_EMPTY, TH_ERROR, TH_FACE, TH_FACE_BACK, TH_FACE_FRONT, TH_FACE_MODE_SELECT, TH_FACE_RETOPOLOGY, TH_FACE_SELECT, TH_FACEDOT_SIZE, TH_FRAME_AFTER, TH_FRAME_BEFORE, TH_FREESTYLE, TH_GIZMO_A, TH_GIZMO_B, TH_GIZMO_HI, TH_GIZMO_PRIMARY, TH_GIZMO_SECONDARY, TH_GIZMO_VIEW_ALIGN, TH_GP_VERTEX, TH_GP_VERTEX_SELECT, TH_GP_VERTEX_SIZE, TH_GRID, TH_GROUP, TH_GROUP_ACTIVE, TH_HANDLE_ALIGN, TH_HANDLE_AUTO, TH_HANDLE_AUTOCLAMP, TH_HANDLE_FREE, TH_HANDLE_SEL_ALIGN, TH_HANDLE_SEL_AUTO, TH_HANDLE_SEL_AUTOCLAMP, TH_HANDLE_SEL_FREE, TH_HANDLE_SEL_VECT, TH_HANDLE_VECT, TH_HANDLE_VERTEX, TH_HANDLE_VERTEX_SELECT, TH_HANDLE_VERTEX_SIZE, TH_HEADER, TH_HEADER_TEXT, TH_HEADER_TEXT_HI, TH_HILITE, TH_ICON_AUTOKEY, TH_ICON_COLLECTION, TH_ICON_FOLDER, TH_ICON_FUND, TH_ICON_MODIFIER, TH_ICON_OBJECT, TH_ICON_OBJECT_DATA, TH_ICON_SCENE, TH_ICON_SHADING, TH_INFO, TH_INFO_DEBUG, TH_INFO_DEBUG_TEXT, TH_INFO_ERROR_TEXT, TH_INFO_INFO_TEXT, TH_INFO_OPERATOR, TH_INFO_OPERATOR_TEXT, TH_INFO_PROPERTY, TH_INFO_PROPERTY_TEXT, TH_INFO_SELECTED, TH_INFO_SELECTED_TEXT, TH_INFO_WARNING_TEXT, TH_KEYBORDER, TH_KEYBORDER_SELECT, TH_KEYTYPE_BREAKDOWN, TH_KEYTYPE_BREAKDOWN_SELECT, TH_KEYTYPE_EXTREME, TH_KEYTYPE_EXTREME_SELECT, TH_KEYTYPE_GENERATED, TH_KEYTYPE_GENERATED_SELECT, TH_KEYTYPE_JITTER, TH_KEYTYPE_JITTER_SELECT, TH_KEYTYPE_KEYFRAME, TH_KEYTYPE_KEYFRAME_SELECT, TH_KEYTYPE_MOVEHOLD, TH_KEYTYPE_MOVEHOLD_SELECT, TH_LIGHT, TH_LINENUMBERS, TH_LNORMAL, TH_LOCK_MARKER, TH_LONGKEY, TH_LONGKEY_SELECT, TH_MARKER, TH_MARKER_OUTLINE, TH_MATCH, TH_METADATA_BG, TH_METADATA_TEXT, TH_NLA_META, TH_NLA_META_SEL, TH_NLA_SOUND, TH_NLA_SOUND_SEL, TH_NLA_TRACK, TH_NLA_TRANSITION, TH_NLA_TRANSITION_SEL, TH_NLA_TWEAK, TH_NLA_TWEAK_DUPLI, TH_NODE, TH_NODE_ATTRIBUTE, TH_NODE_COLOR, TH_NODE_CONVERTER, TH_NODE_CURVING, TH_NODE_DISTORT, TH_NODE_FILTER, TH_NODE_FRAME, TH_NODE_GEOMETRY, TH_NODE_GRID_LEVELS, TH_NODE_GROUP, TH_NODE_INPUT, TH_NODE_INTERFACE, TH_NODE_MATTE, TH_NODE_OUTLINE, TH_NODE_OUTPUT, TH_NODE_SCRIPT, TH_NODE_SHADER, TH_NODE_TEXTURE, TH_NODE_VECTOR, TH_NODE_ZONE_CLOSURE, TH_NODE_ZONE_FOREACH_GEOMETRY_ELEMENT, TH_NODE_ZONE_REPEAT, TH_NODE_ZONE_SIMULATION, TH_NONE, TH_NORMAL, TH_NURB_SEL_ULINE, TH_NURB_SEL_VLINE, TH_NURB_ULINE, TH_NURB_VLINE, TH_OBCENTER_DIA, TH_OUTLINE_WIDTH, TH_PANEL_ACTIVE, TH_PANEL_BACK, TH_PANEL_HEADER, TH_PANEL_OUTLINE, TH_PANEL_SUB_BACK, TH_PATH_AFTER, TH_PATH_BEFORE, TH_PATH_KEYFRAME_AFTER, TH_PATH_KEYFRAME_BEFORE, TH_PREVIEW_BACK, TH_REDALERT, TH_ROW_ALTERNATE, TH_SCROLL_TEXT, TH_SEAM, TH_SEL_MARKER, TH_SELECT, TH_SELECT_ACTIVE, TH_SELECT_HIGHLIGHT, TH_SELECTED_OBJECT, TH_SEQ_ACTIVE, TH_SEQ_AUDIO, TH_SEQ_COLOR, TH_SEQ_EFFECT, TH_SEQ_IMAGE, TH_SEQ_MASK, TH_SEQ_META, TH_SEQ_MOVIE, TH_SEQ_MOVIECLIP, TH_SEQ_PREVIEW, TH_SEQ_SCENE, TH_SEQ_SELECTED, TH_SEQ_SELECTED_TEXT, TH_SEQ_TEXT, TH_SEQ_TEXT_CURSOR, TH_SEQ_TRANSITION, TH_SHADE1, TH_SHADE2, TH_SHARP, TH_SIMULATED_FRAMES, TH_SKIN_ROOT, TH_SPEAKER, TH_STITCH_PREVIEW_ACTIVE, TH_STITCH_PREVIEW_EDGE, TH_STITCH_PREVIEW_FACE, TH_STITCH_PREVIEW_STITCHABLE, TH_STITCH_PREVIEW_UNSTITCHABLE, TH_STITCH_PREVIEW_VERT, TH_STRIP, TH_STRIP_SELECT, TH_SUCCESS, TH_SYNTAX_B, TH_SYNTAX_C, TH_SYNTAX_D, TH_SYNTAX_L, TH_SYNTAX_N, TH_SYNTAX_R, TH_SYNTAX_S, TH_SYNTAX_V, TH_TAB_ACTIVE, TH_TAB_BACK, TH_TAB_INACTIVE, TH_TAB_OUTLINE, TH_TAB_OUTLINE_ACTIVE, TH_TAB_TEXT, TH_TAB_TEXT_HI, TH_TEXT, TH_TEXT_HI, TH_THEMEUI, TH_TIME_GP_KEYFRAME, TH_TIME_MARKER_LINE, TH_TIME_MARKER_LINE_SELECTED, TH_TIME_SCRUB_BACKGROUND, TH_TIME_SCRUB_TEXT, TH_TITLE, TH_TRANSFORM, TH_TRANSPARENT_CHECKER_PRIMARY, TH_TRANSPARENT_CHECKER_SECONDARY, TH_TRANSPARENT_CHECKER_SIZE, TH_UNDEFINED, TH_UV_SHADOW, TH_V3D_CLIPPING_BORDER, TH_VERTEX, TH_VERTEX_ACTIVE, TH_VERTEX_SELECT, TH_VERTEX_SIZE, TH_VERTEX_UNREFERENCED, TH_VIEW_OVERLAY, TH_VNORMAL, TH_WARNING, TH_WHITE, TH_WIDGET_EMBOSS, TH_WIDGET_TEXT_CURSOR, TH_WIDGET_TEXT_HIGHLIGHT, TH_WIDGET_TEXT_SELECTION, TH_WIRE, TH_WIRE_EDIT, TH_WIRE_INNER, ThemeSpace::time_gp_keyframe, ThemeRegionsScrubbing::time_marker, ThemeRegionsScrubbing::time_marker_selected, ThemeSpace::title, ThemeSpace::transform, ThemeSpace::transition, ThemeUI::transparent_checker_primary, ThemeUI::transparent_checker_secondary, ThemeUI::transparent_checker_size, bTheme::tui, U, ThemeSpace::uv_shadow, ThemeSpace::vertex, ThemeSpace::vertex_active, ThemeSpace::vertex_normal, ThemeSpace::vertex_select, ThemeSpace::vertex_size, ThemeSpace::vertex_unreferenced, ThemeSpace::view_overlay, uiWidgetStateColors::warning, ThemeUI::waxis, ThemeUI::wcol_scroll, ThemeUI::wcol_state, ThemeUI::wcol_tab, ThemeUI::wcol_text, ThemeUI::widget_emboss, ThemeUI::widget_text_cursor, ThemeSpace::wire, ThemeSpace::wire_edit, ThemeUI::xaxis, ThemeUI::yaxis, and ThemeUI::zaxis.

Referenced by UI_GetIconThemeColor4ubv(), UI_GetThemeColor3fv(), UI_GetThemeColor3ubv(), UI_GetThemeColor4fv(), UI_GetThemeColor4ubv(), UI_GetThemeColorBlend3f(), UI_GetThemeColorBlend3ubv(), UI_GetThemeColorBlend4f(), UI_GetThemeColorBlendShade3fv(), UI_GetThemeColorBlendShade3ubv(), UI_GetThemeColorBlendShade4fv(), UI_GetThemeColorShade3fv(), UI_GetThemeColorShade3ubv(), UI_GetThemeColorShade4fv(), UI_GetThemeColorShade4ubv(), UI_GetThemeColorShadeAlpha4fv(), UI_GetThemeColorShadeAlpha4ubv(), UI_GetThemeColorType3fv(), UI_GetThemeColorType3ubv(), UI_GetThemeColorType4fv(), UI_GetThemeColorType4ubv(), UI_GetThemeValue(), UI_GetThemeValuef(), UI_GetThemeValueType(), and UI_GetThemeValueTypef().

◆ UI_ThemeMenuShadowWidth()

int UI_ThemeMenuShadowWidth ( )

Return shadow width outside menus and popups.

Definition at line 1561 of file resources.cc.

References ThemeUI::menu_shadow_width, bTheme::tui, UI_GetTheme(), and UI_SCALE_FAC.

Referenced by panel_draw_aligned_backdrop(), and widget_softshadow().

Variable Documentation

◆ g_theme_state