Commit: d7fa60ad1495fa452e6f6f6d20d24f9616d489b0
Author: Julian Eisel
Date:   Thu Nov 5 12:48:18 2015 +0100
Branches: wiggly-widgets
https://developer.blender.org/rBd7fa60ad1495fa452e6f6f6d20d24f9616d489b0

Merge branch 'master' into wiggly-widgets

Conflicts:
        source/blender/blenloader/intern/versioning_270.c
        source/blender/editors/include/ED_view3d.h
        source/blender/editors/interface/resources.c
        source/blender/editors/space_graph/space_graph.c
        source/blender/editors/space_image/image_draw.c
        source/blender/editors/transform/transform_manipulator.c

===================================================================



===================================================================

diff --cc source/blender/blenkernel/intern/customdata.c
index 1525087,f210d34..eb372a9
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@@ -1326,11 -1316,8 +1326,10 @@@ static const LayerTypeInfo LAYERTYPEINF
        {sizeof(short[4][3]), "", 0, NULL, NULL, NULL, NULL, layerSwap_flnor, 
NULL},
        /* 41: CD_CUSTOMLOOPNORMAL */
        {sizeof(short[2]), "vec2s", 1, NULL, NULL, NULL, NULL, NULL, NULL},
 +    /* 42: CD_FACEMAP */
 +      {sizeof(int), "", 0, NULL, NULL, NULL, NULL, NULL, layerDefault_fmap, 
NULL},
  };
  
- /* note, numbers are from trunk and need updating for bmesh */
  
  static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
        /*   0-4 */ "CDMVert", "CDMSticky", "CDMDeformVert", "CDMEdge", 
"CDMFace",
diff --cc source/blender/blenloader/intern/versioning_270.c
index fabef39,b5199e1..ddc8c34
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -867,25 -868,52 +868,64 @@@ void blo_do_versions_270(FileData *fd, 
                                }
                        }
                }
+ 
+               {
+                       bScreen *screen;
+ #define RV3D_VIEW_PERSPORTHO   7
+                       for (screen = main->screen.first; screen; screen = 
screen->id.next) {
+                               ScrArea *sa;
+                               for (sa = screen->areabase.first; sa; sa = 
sa->next) {
+                                       SpaceLink *sl;
+                                       for (sl = sa->spacedata.first; sl; sl = 
sl->next) {
+                                               if (sl->spacetype == 
SPACE_VIEW3D) {
+                                                       ARegion *ar;
+                                                       ListBase *lb = (sl == 
sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
+                                                       for (ar = lb->first; 
ar; ar = ar->next) {
+                                                               if 
(ar->regiontype == RGN_TYPE_WINDOW) {
+                                                                       if 
(ar->regiondata) {
+                                                                               
RegionView3D *rv3d = ar->regiondata;
+                                                                               
if (rv3d->view == RV3D_VIEW_PERSPORTHO) {
+                                                                               
        rv3d->view = RV3D_VIEW_USER;
+                                                                               
}
+                                                                       }
+                                                               }
+                                                       }
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+ #undef RV3D_VIEW_PERSPORTHO
+               }
+ 
+               {
+                       Lamp *lamp;
+ #define LA_YF_PHOTON  5
+                       for (lamp = main->lamp.first; lamp; lamp = 
lamp->id.next) {
+                               if (lamp->type == LA_YF_PHOTON) {
+                                       lamp->type = LA_LOCAL;
+                               }
+                       }
 -#undef LA_YF_PHOTON
+               }
 +      }
  
 -              {
 -                      Object *ob;
 -                      for (ob = main->object.first; ob; ob = ob->id.next) {
 -                              if (ob->body_type == OB_BODY_TYPE_CHARACTER && 
(ob->gameflag & OB_BOUNDS) && ob->collision_boundtype == 
OB_BOUND_TRIANGLE_MESH) {
 -                                      ob->boundtype = ob->collision_boundtype 
= OB_BOUND_BOX;
 +      {
 +              if (!DNA_struct_elem_find(fd->filesdna, "SpaceNode", "float", 
"backdrop_zoom")) {
 +                      bScreen *sc;
 +                      for (sc = main->screen.first; sc; sc = sc->id.next) {
 +                              ScrArea *sa;
 +                              for (sa = sc->areabase.first; sa; sa = 
sa->next) {
 +                                      SpaceLink *sl;
 +                                      for (sl = sa->spacedata.first; sl; sl = 
sl->next) {
 +                                              if (sl->spacetype == 
SPACE_NODE) {
 +                                                      SpaceNode *snode = 
(SpaceNode *)sl;
 +                                                      snode->backdrop_zoom = 
1.0;
 +                                              }
 +                                              if (sl->spacetype == SPACE_SEQ) 
{
 +                                                      SpaceSeq *sseq = 
(SpaceSeq *)sl;
 +                                                      sseq->overdrop_zoom = 
1.0;
 +                                              }
 +                                      }
                                }
                        }
                }
diff --cc source/blender/editors/include/ED_view3d.h
index 97696c8,9da1221..7d228c3
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@@ -323,7 -319,8 +323,9 @@@ void ED_view3d_check_mats_rv3d(struct R
  #endif
  int ED_view3d_scene_layer_set(int lay, const int *values, int *active);
  
+ void *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d);
+ void  ED_view3d_mats_rv3d_restore(struct RegionView3D *rv3d, void 
*rv3dmat_pt);
 +void ED_draw_object_facemap(struct Scene *scene, struct Object *ob, int 
facemap);
  
  bool ED_view3d_context_activate(struct bContext *C);
  void ED_view3d_draw_offscreen_init(struct Scene *scene, struct View3D *v3d);
diff --cc source/blender/editors/interface/resources.c
index 4f5285f,f4051da..b974112
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@@ -1608,10 -1608,12 +1608,6 @@@ void init_userdef_do_versions(void
                U.savetime = 1;
  // XXX                error(STRINGIFY(BLENDER_STARTUP_FILE)" is buggy, please 
consider removing it.\n");
        }
--      /* transform widget settings */
-       if (U.tw_size == 0) {
 -      if (U.tw_hotspot == 0) {
 -              U.tw_hotspot = 14;
--              U.tw_size = 25;          /* percentage of window size */
 -              U.tw_handlesize = 16;    /* percentage of widget radius */
--      }
        if (U.pad_rot_angle == 0.0f)
                U.pad_rot_angle = 15.0f;
        
@@@ -2637,12 -2649,12 +2633,21 @@@
        if (!USER_VERSION_ATLEAST(276, 2)) {
                bTheme *btheme;
                for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+                       rgba_char_args_set(btheme->tclip.gp_vertex, 0, 0, 0, 
255);
+                       rgba_char_args_set(btheme->tclip.gp_vertex_select, 255, 
133, 0, 255);
+                       btheme->tclip.gp_vertex_size = 3;
+               }
+       }
+ 
++      if (!USER_VERSION_ATLEAST(276, 3)) {
++              bTheme *btheme;
++              for (btheme = U.themes.first; btheme; btheme = btheme->next) {
 +                      rgba_char_args_set_fl(btheme->tui.xaxis, 1.0f, 0.27f, 
0.27f, 1.0f); /* red */
 +                      rgba_char_args_set_fl(btheme->tui.yaxis, 0.27f, 1.0f, 
0.27f, 1.0f); /* green */
 +                      rgba_char_args_set_fl(btheme->tui.zaxis, 0.27f, 0.27f, 
1.0f, 1.0f); /* blue */
 +              }
 +      }
 +
        if (U.pixelsize == 0.0f)
                U.pixelsize = 1.0f;
        
diff --cc source/blender/editors/space_graph/space_graph.c
index 5bbd13f,2f1f72b..683a976
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@@ -251,8 -240,8 +251,8 @@@ static void graph_main_area_draw(const 
        UI_view2d_view_ortho(v2d);
        
        /* grid */
-       unitx = (sipo->flag & SIPO_DRAWTIME) ? V2D_UNIT_SECONDS : 
V2D_UNIT_FRAMESCALE;
+       unitx = ((sipo->mode == SIPO_MODE_ANIMATION) && (sipo->flag & 
SIPO_DRAWTIME)) ? V2D_UNIT_SECONDS : V2D_UNIT_FRAMESCALE;
 -      grid = UI_view2d_grid_calc(CTX_data_scene(C), v2d, unitx, 
V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP, ar->winx, ar->winy);
 +      grid = UI_view2d_grid_calc(scene, v2d, unitx, V2D_GRID_NOCLAMP, unity, 
V2D_GRID_NOCLAMP, ar->winx, ar->winy);
        UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL);
        
        ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW);
diff --cc source/blender/editors/space_image/image_draw.c
index 4f5fa6c,81711df..6778367
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@@ -513,7 -526,27 +526,27 @@@ static void draw_image_buffer(const bCo
                        fdrawcheckerboard(x, y, x + ibuf->x * zoomx, y + 
ibuf->y * zoomy);
                }
  
-               glaDrawImBuf_glsl_ctx(C, ibuf, x, y, GL_NEAREST, 1.0f);
+               if ((sima->flag & (SI_SHOW_R | SI_SHOW_G | SI_SHOW_B)) == 0) {
 -                      glaDrawImBuf_glsl_ctx(C, ibuf, x, y, GL_NEAREST);
++                      glaDrawImBuf_glsl_ctx(C, ibuf, x, y, GL_NEAREST, 1.0f);
+               }
+               else {
+                       unsigned char *display_buffer;
+                       void *cache_handle;
+ 
+                       /* TODO(sergey): Ideally GLSL shading should be capable 
of either
+                        * disabling some channels or displaying buffer with 
custom offset.
+                        */
+                       display_buffer = IMB_display_buffer_acquire_ctx(C, 
ibuf, &cache_handle);
+ 
+                       if (display_buffer != NULL) {
+                               int channel_offset = 
draw_image_channel_offset(sima);
+                               glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, 
ibuf->x, GL_LUMINANCE, GL_UNSIGNED_INT,
+                                                 display_buffer + 
channel_offset);
+                       }
+                       if (cache_handle != NULL) {
+                               IMB_display_buffer_release(cache_handle);
+                       }
+               }
  
                if (sima->flag & SI_USE_ALPHA)
                        glDisable(GL_BLEND);
diff --cc source/blender/editors/space_view3d/space_view3d.c
index 1b46040,e276a46..a26552b
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@@ -407,9 -394,9 +407,9 @@@ static SpaceLink *view3d_new(const bCon
        rv3d = ar->regiondata;
        rv3d->viewquat[0] = 1.0f;
        rv3d->persp = RV3D_PERSP;
-       rv3d->view = RV3D_VIEW_PERSPORTHO;
+       rv3d->view = RV3D_VIEW_USER;
        rv3d->dist = 10.0;
 -      
 +              
        return (SpaceLink *)v3d;
  }
  
diff --cc source/blender/editors/transform/transform_manipulator.c
index 436e44b,5e5dbfd..6a474ce
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@@ -547,15 -264,14 +547,14 @@@ bool gimbal_axis(Object *ob, float gmat
  /* returns total items selected */
  static int calc_manipulator_stats(const bContext *C)
  {
 -      ScrArea *sa = CTX_wm_area(C);
 -      ARegion *ar = CTX_wm_region(C);
 +      const ScrArea *sa = CTX_wm_area(C);
 +      const ARegion *ar = CTX_wm_region(C);
-       const ToolSettings *ts = CTX_data_tool_settings(C);
 +      const View3D *v3d = sa->spacedata.first;
 +      RegionView3D *rv3d = ar->regiondata;
        Scene *scene = CTX_data_scene(C);
        Object *obedit = CTX_data_edit_object(C);
 -      View3D *v3d = sa->spacedata.first;
 -      RegionView3D *rv3d = ar->regiondata;
 -      Base *base;
        Object *ob = OBACT;
 +      Base *base;
        int a, totsel = 0;
  
        /* transform widget matrix */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to