Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Fri, 28 Jul 2017 15:46:27 +0000 (01:46 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 28 Jul 2017 15:46:27 +0000 (01:46 +1000)
1  2 
release/scripts/startup/bl_ui/space_userpref.py
source/blender/blenkernel/intern/particle_system.c
source/blender/blenloader/intern/versioning_defaults.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/resources.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_userdef.c

@@@ -2892,26 -2757,25 +2892,44 @@@ void init_userdef_do_versions(void
                        btheme->ttime.time_keyframe[3] = btheme->ttime.time_gp_keyframe[3] = 255;
                }
        }
 +      if (!USER_VERSION_ATLEAST(280, 1)) {
 +              /* interface_widgets.c */
 +              struct uiWidgetColors wcol_tab = {
 +                      {255, 255, 255, 255},
 +                      {83, 83, 83, 255},
 +                      {114, 114, 114, 255},
 +                      {90, 90, 90, 255},
 +
 +                      {0, 0, 0, 255},
 +                      {0, 0, 0, 255},
 +
 +                      0,
 +                      0, 0
 +              };
 +
 +              for (bTheme *btheme = U.themes.first; btheme; btheme = btheme->next) {
 +                      btheme->tui.wcol_tab = wcol_tab;
 +              }
 +      }
  
+       if (!USER_VERSION_ATLEAST(278, 6)) {
+               /* Clear preference flags for re-use. */
+               U.flag &= ~(
+                   (1 << 1) | (1 << 2) | (1 << 3) |
+                   (1 << 6) | (1 << 7) |
+                   (1 << 9) | (1 << 10));
+               U.uiflag &= ~(
+                   (1 << 7));
+               U.transopts &= ~(
+                   (1 << 2) | (1 << 3) | (1 << 4) |
+                   (1 << 7));
+               U.gameflags &= ~(
+                   (1 << 0) | (1 << 1) |
+                   (1 << 3) | (1 << 4));
+               U.uiflag |= USER_LOCK_CURSOR_ADJUST;
+       }
        /**
         * Include next version bump.
         *
@@@ -491,13 -494,12 +494,13 @@@ typedef struct UserDef 
        short undosteps;
        short undomemory;
        short gp_manhattendist, gp_euclideandist, gp_eraser;
-       short gp_settings;
+       short gp_settings;  /* eGP_UserdefSettings */
        short tb_leftmouse, tb_rightmouse;
        struct SolidLight light[3];
 -      short tw_hotspot, tw_flag, tw_handlesize, tw_size;
 +      short manipulator_flag, manipulator_size;
 +      int pad3;
        short textimeout, texcollectrate;
-       short wmdrawmethod; /* removed wmpad */
+       short wmdrawmethod; /* eWM_DrawMethod */
        short dragthreshold;
        int memcachelimit;
        int prefetchframes;
@@@ -594,19 -597,15 +598,15 @@@ typedef enum eUserPref_Section 
        USER_SECTION_ADDONS     = 6,
  } eUserPref_Section;
  
- /* flag */
+ /* UserDef.flag */
  typedef enum eUserPref_Flag {
        USER_AUTOSAVE                   = (1 << 0),
- /*    USER_AUTOGRABGRID               = (1 << 1),     deprecated */
- /*    USER_AUTOROTGRID                = (1 << 2),     deprecated */
- /*    USER_AUTOSIZEGRID               = (1 << 3),     deprecated */
+       /* 1..3 */
 -      USER_SCENEGLOBAL                = (1 << 4),
 +/*    USER_SCENEGLOBAL         = (1 << 4), deprecated */
        USER_TRACKBALL                  = (1 << 5),
- /*    USER_DUPLILINK          = (1 << 6),     deprecated */
- /*    USER_FSCOLLUM                   = (1 << 7),     deprecated */
+       /* 6..7 */
        USER_MAT_ON_OB                  = (1 << 8),
- /*    USER_NO_CAPSLOCK                = (1 << 9), */  /* not used anywhere */
- /*    USER_VIEWMOVE                   = (1 << 10), */ /* not used anywhere */
+       /* 9..10 */
        USER_TOOLTIPS                   = (1 << 11),
        USER_TWOBUTTONMOUSE             = (1 << 12),
        USER_NONUMPAD                   = (1 << 13),
@@@ -795,12 -795,8 +796,13 @@@ typedef enum eGP_UserdefSettings 
        GP_PAINT_DOSIMPLIFY             = (1 << 1),
  } eGP_UserdefSettings;
  
- /* color picker types */
 +enum {
 +      USER_MANIPULATOR_DRAW        = (1 << 0),
 +      USER_MANIPULATOR_SHADED      = (1 << 1),
 +};
 +
+ /* Color Picker Types.
+  * UserDef.color_picker_type */
  typedef enum eColorPicker_Types {
        USER_CP_CIRCLE_HSV      = 0,
        USER_CP_SQUARE_SV       = 1,