Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_userdef.c
| Show All 36 Lines | |||||
| #include "BKE_sound.h" | #include "BKE_sound.h" | ||||
| #include "BKE_addon.h" | #include "BKE_addon.h" | ||||
| #include "BKE_studiolight.h" | #include "BKE_studiolight.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "UI_interface_icons.h" | |||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "BLT_lang.h" | #include "BLT_lang.h" | ||||
| #ifdef WITH_OPENSUBDIV | #ifdef WITH_OPENSUBDIV | ||||
| ▲ Show 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | |||||
| static void rna_userdef_theme_update(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_userdef_theme_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| /* Recreate gizmos when changing themes. */ | /* Recreate gizmos when changing themes. */ | ||||
| WM_reinit_gizmomap_all(bmain); | WM_reinit_gizmomap_all(bmain); | ||||
| rna_userdef_update(bmain, scene, ptr); | rna_userdef_update(bmain, scene, ptr); | ||||
| } | } | ||||
| static void rna_userdef_theme_update_icons(Main *bmain, Scene *scene, PointerRNA *ptr) | |||||
| { | |||||
| UI_icons_reload_internal_textures(); | |||||
| rna_userdef_theme_update(bmain, scene, ptr); | |||||
| } | |||||
| /* also used by buffer swap switching */ | /* also used by buffer swap switching */ | ||||
| static void rna_userdef_dpi_update(Main *UNUSED(bmain), | static void rna_userdef_dpi_update(Main *UNUSED(bmain), | ||||
| Scene *UNUSED(scene), | Scene *UNUSED(scene), | ||||
| PointerRNA *UNUSED(ptr)) | PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| /* font's are stored at each DPI level, without this we can easy load 100's of fonts */ | /* font's are stored at each DPI level, without this we can easy load 100's of fonts */ | ||||
| BLF_cache_clear(); | BLF_cache_clear(); | ||||
| ▲ Show 20 Lines • Show All 1,201 Lines • ▼ Show 20 Lines | static void rna_def_userdef_theme_ui(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Modifier", ""); | RNA_def_property_ui_text(prop, "Modifier", ""); | ||||
| RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); | RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); | ||||
| prop = RNA_def_property(srna, "icon_shading", PROP_FLOAT, PROP_COLOR_GAMMA); | prop = RNA_def_property(srna, "icon_shading", PROP_FLOAT, PROP_COLOR_GAMMA); | ||||
| RNA_def_property_float_sdna(prop, NULL, "icon_shading"); | RNA_def_property_float_sdna(prop, NULL, "icon_shading"); | ||||
| RNA_def_property_array(prop, 4); | RNA_def_property_array(prop, 4); | ||||
| RNA_def_property_ui_text(prop, "Shading", ""); | RNA_def_property_ui_text(prop, "Shading", ""); | ||||
| RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); | RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); | ||||
| prop = RNA_def_property(srna, "icon_border_intensity", PROP_FLOAT, PROP_FACTOR); | |||||
| RNA_def_property_float_sdna(prop, NULL, "icon_border_intensity"); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Icon Border", "Control the intensity of the border around themes icons"); | |||||
| RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 2); | |||||
| RNA_def_property_update(prop, 0, "rna_userdef_theme_update_icons"); | |||||
| } | } | ||||
| static void rna_def_userdef_theme_space_common(StructRNA *srna) | static void rna_def_userdef_theme_space_common(StructRNA *srna) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| prop = RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR_GAMMA); | prop = RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR_GAMMA); | ||||
| RNA_def_property_array(prop, 3); | RNA_def_property_array(prop, 3); | ||||
| ▲ Show 20 Lines • Show All 4,258 Lines • Show Last 20 Lines | |||||