svn merge ^/trunk/blender -r46340:46350
authorOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Mon, 7 May 2012 23:36:22 +0000 (23:36 +0000)
committerOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Mon, 7 May 2012 23:36:22 +0000 (23:36 +0000)
14 files changed:
1  2 
intern/cycles/kernel/kernel_types.h
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/text.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/windowmanager/intern/wm_operators.c

Simple merge
@@@ -136,12 -136,12 +136,12 @@@ void BKE_camera_free(Camera *ca
  
  void BKE_camera_object_mode(RenderData *rd, Object *cam_ob)
  {
-       rd->mode &= ~(R_ORTHO|R_PANORAMA);
+       rd->mode &= ~(R_ORTHO | R_PANORAMA);
  
-       if (cam_ob && cam_ob->type==OB_CAMERA) {
-               Camera *cam= cam_ob->data;
+       if (cam_ob && cam_ob->type == OB_CAMERA) {
+               Camera *cam = cam_ob->data;
                if (cam->type == CAM_ORTHO) rd->mode |= R_ORTHO;
 -              if (cam->type == CAM_PANO) rd->mode |= R_PANORAMA;
 +              if (cam->flag & CAM_PANORAMA) rd->mode |= R_PANORAMA;
        }
  }
  
@@@ -1007,16 -1007,16 +1007,16 @@@ static void cddm_draw_attrib_vertex(DMV
  
        /* vertex colors */
        for (b = 0; b < attribs->totmcol; b++) {
-               MCol *cp = &attribs->mcol[b].array[a*4 + vert];
+               MCol *cp = &attribs->mcol[b].array[a * 4 + vert];
                GLubyte col[4];
-               col[0]= cp->b; col[1]= cp->g; col[2]= cp->r; col[3]= cp->a;
+               col[0] = cp->b; col[1] = cp->g; col[2] = cp->r; col[3] = cp->a;
 -              glVertexAttrib4ubvARB(attribs->mcol[b].gl_index, col);
 +              glVertexAttrib4ubvARB(attribs->mcol[b].glIndex, col);
        }
  
        /* tangent for normal mapping */
        if (attribs->tottang) {
-               float *tang = attribs->tang.array[a*4 + vert];
+               float *tang = attribs->tang.array[a * 4 + vert];
 -              glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
 +              glVertexAttrib4fvARB(attribs->tang.glIndex, tang);
        }
  
        /* vertex normal */
@@@ -2580,12 -2579,16 +2578,12 @@@ static void dag_id_flush_update(Scene *
                }
  
                if (idtype == ID_MC) {
-                       for (obt=bmain->object.first; obt; obt= obt->id.next) {
 -                      MovieClip *clip = (MovieClip *) id;
 -
 -                      BKE_tracking_dopesheet_tag_update(&clip->tracking);
 -
+                       for (obt = bmain->object.first; obt; obt = obt->id.next) {
                                bConstraint *con;
-                               for (con = obt->constraints.first; con; con=con->next) {
-                                       bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+                               for (con = obt->constraints.first; con; con = con->next) {
+                                       bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
                                        if (ELEM3(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER,
-                                                CONSTRAINT_TYPE_OBJECTSOLVER))
+                                                 CONSTRAINT_TYPE_OBJECTSOLVER))
                                        {
                                                obt->recalc |= OB_RECALC_OB;
                                                break;
@@@ -1224,22 -1224,24 +1224,22 @@@ static void fillBevelCap(Curve *cu, Nur
  {
        DispList *dl;
        float *data;
 -      int b;
  
-       dl= MEM_callocN(sizeof(DispList), "makeDispListbev2");
-       dl->verts= data= MEM_callocN(3*sizeof(float)*dlb->nr, "dlverts");
+       dl = MEM_callocN(sizeof(DispList), "makeDispListbev2");
+       dl->verts = data = MEM_callocN(3 * sizeof(float) * dlb->nr, "dlverts");
  
-       dl->type= DL_POLY;
+       dl->type = DL_POLY;
  
-       dl->parts= 1;
-       dl->nr= dlb->nr;
-       dl->col= nu->mat_nr;
-       dl->charidx= nu->charidx;
+       dl->parts = 1;
+       dl->nr = dlb->nr;
+       dl->col = nu->mat_nr;
+       dl->charidx = nu->charidx;
  
        /* dl->rt will be used as flag for render face and */
        /* CU_2D conflicts with R_NOPUNOFLIP */
-       dl->rt= nu->flag & ~CU_2D;
+       dl->rt = nu->flag & ~CU_2D;
  
 -      for (b = 0; b < dlb->nr; b++, prev_fp += 3, data += 3)
 -              copy_v3_v3(data, prev_fp);
 +      rotateBevelPiece(cu, bevp, dlb, widfac, fac, &data);
  
        BLI_addtail(dispbase, dl);
  }
@@@ -1350,16 -1369,18 +1367,16 @@@ static void do_makeDispListCurveTypes(S
  
                                                        /* dl->rt will be used as flag for render face and */
                                                        /* CU_2D conflicts with R_NOPUNOFLIP */
-                                                       dl->rt= nu->flag & ~CU_2D;
+                                                       dl->rt = nu->flag & ~CU_2D;
  
-                                                       dl->bevelSplitFlag= MEM_callocN(sizeof(*dl->col2)*((bl->nr+0x1F)>>5), "bevelSplitFlag");
+                                                       dl->bevelSplitFlag = MEM_callocN(sizeof(*dl->col2) * ((steps + 0x1F) >> 5), "bevelSplitFlag");
        
                                                        /* for each point of poly make a bevel piece */
-                                                       bevp= (BevPoint *)(bl+1);
-                                                       for (a=0; a<bl->nr; a++, bevp++) {
-                                                               float fac=1.0;
-                                                               if (cu->taperobj==NULL) {
-                                                                       if ( (cu->bevobj!=NULL) || !((cu->flag & CU_FRONT) || (cu->flag & CU_BACK)) )
+                                                       bevp = (BevPoint *)(bl + 1) + start;
+                                                       for (i = start, a = 0; a < steps; i++, bevp++, a++) {
+                                                               float fac = 1.0;
 -                                                              float *cur_data = data;
 -
+                                                               if (cu->taperobj == NULL) {
+                                                                       if ( (cu->bevobj != NULL) || !((cu->flag & CU_FRONT) || (cu->flag & CU_BACK)) )
                                                                                fac = bevp->radius;
                                                                }
                                                                else {
@@@ -2015,9 -2015,9 +2015,9 @@@ static void bm_corners_to_loops(Mesh *m
                else {
                        side = sqrt(fd->totdisp / corners);
                
-                       for (i=0; i<tot; i++, disps += side*side, ld++) {
-                               ld->totdisp = side*side;
+                       for (i = 0; i < tot; i++, disps += side * side, ld++) {
+                               ld->totdisp = side * side;
 -                              ld->level = (int)(logf(side - 1.0f) / (float)M_LN2) + 1;
 +                              ld->level = (int)(logf(side - 1.0f) / M_LN2) + 1;
                        
                                if (ld->disps)
                                        MEM_freeN(ld->disps);
@@@ -1058,8 -1058,8 +1058,8 @@@ void BKE_movieclip_update_scopes(MovieC
                                        }
  
                                        /* NOTE: margin should be kept in sync with value from ui_draw_but_TRACKPREVIEW */
 -                                      tmpibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, &undist_marker, 3 /* margin */,
 +                                      tmpibuf= BKE_tracking_get_pattern_imbuf(ibuf, track, &undist_marker, 3 /* margin */,
-                                                       1 /* anchor */, scopes->track_pos, NULL);
+                                                                                1 /* anchor */, scopes->track_pos, NULL);
  
                                        if (tmpibuf->rect_float)
                                                IMB_rect_from_float(tmpibuf);
@@@ -888,12 -888,10 +888,12 @@@ void BKE_scene_base_deselect_all(Scene 
  
  void BKE_scene_base_select(Scene *sce, Base *selbase)
  {
 +      scene_deselect_all(sce);
 +
        selbase->flag |= SELECT;
-       selbase->object->flag= selbase->flag;
+       selbase->object->flag = selbase->flag;
  
-       sce->basact= selbase;
+       sce->basact = selbase;
  }
  
  /* checks for cycle, returns 1 if it's all OK */
@@@ -2127,20 -2127,20 +2127,20 @@@ void txt_do_undo(Text *text
                        break;
  
                case UNDO_IBLOCK:
-                       linep= txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
+                       linep = txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
                        txt_delete_sel(text);
 -                      
 +
                        /* txt_backspace_char removes utf8-characters, not bytes */
-                       buf= MEM_mallocN(linep+1, "iblock buffer");
-                       for (i=0; i < linep; i++) {
-                               buf[(linep-1)-i]= text->undo_buf[text->undo_pos]; 
+                       buf = MEM_mallocN(linep + 1, "iblock buffer");
+                       for (i = 0; i < linep; i++) {
+                               buf[(linep - 1) - i] = text->undo_buf[text->undo_pos];
                                text->undo_pos--;
                        }
-                       buf[i]= 0;
-                       linep= txt_utf8_len(buf);
+                       buf[i] = 0;
+                       linep = txt_utf8_len(buf);
                        MEM_freeN(buf);
 -                      
 +
-                       while (linep>0) {
+                       while (linep > 0) {
                                txt_backspace_char(text);
                                linep--;
                        }
                        //set the selection for this now
                        text->selc = charp;
                        text->sell = text->lines.first;
-                       for (i= 0; i < linep; i++) {
+                       for (i = 0; i < linep; i++) {
                                text->sell = text->sell->next;
                        }
 -                      
 +
-                       linep= txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
+                       linep = txt_undo_read_uint32(text->undo_buf, &text->undo_pos);
                        //first line to be selected
                        
                        charp = txt_undo_read_uint16(text->undo_buf, &text->undo_pos);
                        for (i = 0; i < linep; i++) {
                                text->curl = text->curl->next;
                        }
 -                      
 +
                        
-                       if (op==UNDO_INDENT) {
+                       if (op == UNDO_INDENT) {
                                txt_unindent(text);
                        }
-                       else if (op== UNDO_UNINDENT) {
+                       else if (op == UNDO_UNINDENT) {
                                txt_indent(text);
                        }
                        else if (op == UNDO_COMMENT) {
                case UNDO_DUPLICATE:
                        txt_delete_line(text, text->curl->next);
                        break;
 -              case UNDO_MOVE_LINES_UP:
 -                      txt_move_lines(text, TXT_MOVE_LINE_DOWN);
 -                      break;
 -              case UNDO_MOVE_LINES_DOWN:
 -                      txt_move_lines(text, TXT_MOVE_LINE_UP);
 -                      break;
                default:
                        //XXX error("Undo buffer error - resetting");
-                       text->undo_pos= -1;
+                       text->undo_pos = -1;
                        
                        break;
        }
@@@ -2400,10 -2406,16 +2400,10 @@@ void txt_do_redo(Text *text
                case UNDO_DUPLICATE:
                        txt_duplicate_line(text);
                        break;
 -              case UNDO_MOVE_LINES_UP:
 -                      txt_move_lines(text, TXT_MOVE_LINE_UP);
 -                      break;
 -              case UNDO_MOVE_LINES_DOWN:
 -                      txt_move_lines(text, TXT_MOVE_LINE_DOWN);
 -                      break;
                default:
                        //XXX error("Undo buffer error - resetting");
-                       text->undo_pos= -1;
+                       text->undo_pos = -1;
 -                      
 +
                        break;
        }