Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_userdef.c
| Show First 20 Lines • Show All 1,501 Lines • ▼ Show 20 Lines | static void rna_def_userdef_theme_ui(BlenderRNA *brna) | ||||
| 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_folder", PROP_FLOAT, PROP_COLOR_GAMMA); | prop = RNA_def_property(srna, "icon_folder", PROP_FLOAT, PROP_COLOR_GAMMA); | ||||
| RNA_def_property_float_sdna(prop, NULL, "icon_folder"); | RNA_def_property_float_sdna(prop, NULL, "icon_folder"); | ||||
| RNA_def_property_array(prop, 4); | RNA_def_property_array(prop, 4); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text(prop, "File Folders", "Color of folders in the file browser"); | ||||
| prop, "File Folders", "Color of folders in the file browser"); | |||||
| 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); | 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_float_sdna(prop, NULL, "icon_border_intensity"); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Icon Border", "Control the intensity of the border around themes icons"); | 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_ui_range(prop, 0.0, 1.0, 0.1, 2); | ||||
| RNA_def_property_update(prop, 0, "rna_userdef_theme_update_icons"); | RNA_def_property_update(prop, 0, "rna_userdef_theme_update_icons"); | ||||
| ▲ Show 20 Lines • Show All 2,520 Lines • ▼ Show 20 Lines | static void rna_def_userdef_view(BlenderRNA *brna) | ||||
| static const EnumPropertyItem line_width[] = { | static const EnumPropertyItem line_width[] = { | ||||
| {-1, "THIN", 0, "Thin", "Thinner lines than the default"}, | {-1, "THIN", 0, "Thin", "Thinner lines than the default"}, | ||||
| {0, "AUTO", 0, "Auto", "Automatic line width based on UI scale"}, | {0, "AUTO", 0, "Auto", "Automatic line width based on UI scale"}, | ||||
| {1, "THICK", 0, "Thick", "Thicker lines than the default"}, | {1, "THICK", 0, "Thick", "Thicker lines than the default"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem render_display_types[] = { | |||||
| {USER_RENDER_DISPLAY_NONE, | |||||
| "NONE", | |||||
| 0, | |||||
| "Keep User Interface", | |||||
| "Images are rendered without changing the user interface"}, | |||||
| {USER_RENDER_DISPLAY_SCREEN, | |||||
| "SCREEN", | |||||
| 0, | |||||
| "Full Screen", | |||||
| "Images are rendered in a maximized Image Editor"}, | |||||
| {USER_RENDER_DISPLAY_AREA, | |||||
| "AREA", | |||||
| 0, | |||||
| "Image Editor", | |||||
| "Images are rendered in an Image Editor"}, | |||||
| {USER_RENDER_DISPLAY_WINDOW, | |||||
| "WINDOW", | |||||
| 0, | |||||
| "New Window", | |||||
| "Images are rendered in a new window"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| static const EnumPropertyItem temp_space_display_types[] = { | |||||
| {USER_TEMP_SPACE_DISPLAY_FULLSCREEN, | |||||
| "SCREEN", /* Could be FULLSCREEN, but keeping it consistent with render_display_types */ | |||||
| 0, | |||||
| "Full Screen", | |||||
| "Open the temporary editor in a maximized screen"}, | |||||
| {USER_TEMP_SPACE_DISPLAY_WINDOW, | |||||
| "WINDOW", | |||||
| 0, | |||||
| "New Window", | |||||
| "Open the temporary editor in a new window"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| srna = RNA_def_struct(brna, "PreferencesView", NULL); | srna = RNA_def_struct(brna, "PreferencesView", NULL); | ||||
| RNA_def_struct_sdna(srna, "UserDef"); | RNA_def_struct_sdna(srna, "UserDef"); | ||||
| RNA_def_struct_nested(brna, srna, "Preferences"); | RNA_def_struct_nested(brna, srna, "Preferences"); | ||||
| RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | ||||
| RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to viewing data"); | RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to viewing data"); | ||||
| ▲ Show 20 Lines • Show All 209 Lines • ▼ Show 20 Lines | static const EnumPropertyItem header_align_items[] = { | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| prop = RNA_def_property(srna, "header_align", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "header_align", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, header_align_items); | RNA_def_property_enum_items(prop, header_align_items); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag"); | ||||
| RNA_def_property_ui_text(prop, "Header Position", "Default header position for new space-types"); | RNA_def_property_ui_text(prop, "Header Position", "Default header position for new space-types"); | ||||
| RNA_def_property_update(prop, 0, "rna_userdef_screen_update_header_default"); | RNA_def_property_update(prop, 0, "rna_userdef_screen_update_header_default"); | ||||
| prop = RNA_def_property(srna, "render_display_type", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, render_display_types); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Render Display Type", "Default location where rendered images will be displayed in"); | |||||
| prop = RNA_def_property(srna, "filebrowser_display_type", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, temp_space_display_types); | |||||
| RNA_def_property_ui_text(prop, | |||||
| "File Browser Display Type", | |||||
| "Default location where the File Editor will be displayed in"); | |||||
| static const EnumPropertyItem text_hinting_items[] = { | static const EnumPropertyItem text_hinting_items[] = { | ||||
| {0, "AUTO", 0, "Auto", ""}, | {0, "AUTO", 0, "Auto", ""}, | ||||
| {USER_TEXT_HINTING_NONE, "NONE", 0, "None", ""}, | {USER_TEXT_HINTING_NONE, "NONE", 0, "None", ""}, | ||||
| {USER_TEXT_HINTING_SLIGHT, "SLIGHT", 0, "Slight", ""}, | {USER_TEXT_HINTING_SLIGHT, "SLIGHT", 0, "Slight", ""}, | ||||
| {USER_TEXT_HINTING_FULL, "FULL", 0, "Full", ""}, | {USER_TEXT_HINTING_FULL, "FULL", 0, "Full", ""}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 1,603 Lines • Show Last 20 Lines | |||||