Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/resources.c
| Show First 20 Lines • Show All 1,530 Lines • ▼ Show 20 Lines | if (!USER_VERSION_ATLEAST(267, 0)) { | ||||
| if (U.tweak_threshold == 0) | if (U.tweak_threshold == 0) | ||||
| U.tweak_threshold = 10; | U.tweak_threshold = 10; | ||||
| } | } | ||||
| /* NOTE!! from now on use U.versionfile and U.subversionfile */ | /* NOTE!! from now on use U.versionfile and U.subversionfile */ | ||||
| #undef USER_VERSION_ATLEAST | #undef USER_VERSION_ATLEAST | ||||
| #define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_ATLEAST((&(U)), ver, subver) | #define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_ATLEAST((&(U)), ver, subver) | ||||
| if (!USER_VERSION_ATLEAST(269, 9)) { | |||||
| /* grease pencil - new layer color */ | |||||
| if (U.gpencil_new_layer_col[3] < 0.1f) { | |||||
| /* defaults to black, but must at least be visible! */ | |||||
| U.gpencil_new_layer_col[3] = 0.9f; | |||||
| } | |||||
| } | |||||
| if (!USER_VERSION_ATLEAST(271, 5)) { | if (!USER_VERSION_ATLEAST(271, 5)) { | ||||
| U.pie_menu_radius = 100; | U.pie_menu_radius = 100; | ||||
| U.pie_menu_threshold = 12; | U.pie_menu_threshold = 12; | ||||
| U.pie_animation_timeout = 6; | U.pie_animation_timeout = 6; | ||||
| } | } | ||||
| if (!USER_VERSION_ATLEAST(275, 2)) { | if (!USER_VERSION_ATLEAST(275, 2)) { | ||||
| U.ndof_deadzone = 0.1; | U.ndof_deadzone = 0.1; | ||||
| Show All 21 Lines | #define USER_VERSION_ATLEAST(ver, subver) MAIN_VERSION_ATLEAST((&(U)), ver, subver) | ||||
| if (!USER_VERSION_ATLEAST(280, 20)) { | if (!USER_VERSION_ATLEAST(280, 20)) { | ||||
| U.gpu_viewport_quality = 0.6f; | U.gpu_viewport_quality = 0.6f; | ||||
| /* Reset theme, old themes will not be compatible with minor version updates from now on. */ | /* Reset theme, old themes will not be compatible with minor version updates from now on. */ | ||||
| for (bTheme *btheme = U.themes.first; btheme; btheme = btheme->next) { | for (bTheme *btheme = U.themes.first; btheme; btheme = btheme->next) { | ||||
| memcpy(btheme, &U_theme_default, sizeof(*btheme)); | memcpy(btheme, &U_theme_default, sizeof(*btheme)); | ||||
| } | } | ||||
| /* Annotations - new layer color | |||||
| * Replace anything that used to be set if it looks like was left | |||||
| * on the old default (i.e. black), which most users used | |||||
| */ | |||||
| if ((U.gpencil_new_layer_col[3] < 0.1f) || (U.gpencil_new_layer_col[0] < 0.1f)) { | |||||
| /* - New color matches the annotation pencil icon | |||||
| * - Non-full alpha looks better! | |||||
| */ | |||||
| ARRAY_SET_ITEMS(U.gpencil_new_layer_col, 0.38f, 0.61f, 0.78f, 0.9f); | |||||
| } | |||||
| } | } | ||||
| /** | /** | ||||
| * Include next version bump. | * Include next version bump. | ||||
| */ | */ | ||||
| { | { | ||||
| /* (keep this block even if it becomes empty). */ | /* (keep this block even if it becomes empty). */ | ||||
| } | } | ||||
| Show All 21 Lines | |||||