Merging r58330 through r58361 from trunk into soc-2013-depsgraph_mt
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 18 Jul 2013 09:29:12 +0000 (09:29 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 18 Jul 2013 09:29:12 +0000 (09:29 +0000)
1  2 
source/blender/blenkernel/intern/curve.c
source/blender/makesdna/DNA_curve_types.h

index b7926e5302f87c422e7fd08bb59163e59d2e07c9,00a479b8b880364073059cd53774ce9df3eea771..fb4d8395777afde309d5eaef2ea0439d94ab07dc
@@@ -2360,11 -2321,12 +2360,12 @@@ void BKE_curve_bevelList_make(Object *o
                 * enforced in the UI but can go wrong possibly */
                if (!BKE_nurb_check_valid_u(nu)) {
                        bl = MEM_callocN(sizeof(BevList) + 1 * sizeof(BevPoint), "makeBevelList1");
 -                      BLI_addtail(&(cu->bev), bl);
 +                      BLI_addtail(bev, bl);
                        bl->nr = 0;
+                       bl->charidx = nu->charidx;
                }
                else {
 -                      if (G.is_rendering && cu->resolu_ren != 0)
 +                      if (for_render && cu->resolu_ren != 0)
                                resolu = cu->resolu_ren;
                        else
                                resolu = nu->resolu;
                        if (nu->type == CU_POLY) {
                                len = nu->pntsu;
                                bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelList2");
 -                              BLI_addtail(&(cu->bev), bl);
 +                              BLI_addtail(bev, bl);
  
-                               if (nu->flagu & CU_NURB_CYCLIC) bl->poly = 0;
-                               else bl->poly = -1;
+                               bl->poly = (nu->flagu & CU_NURB_CYCLIC) ? 0 : -1;
                                bl->nr = len;
                                bl->dupe_nr = 0;
+                               bl->charidx = nu->charidx;
                                bevp = (BevPoint *)(bl + 1);
                                bp = nu->bp;
  
                                /* in case last point is not cyclic */
                                len = resolu * (nu->pntsu + (nu->flagu & CU_NURB_CYCLIC) - 1) + 1;
                                bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelBPoints");
 -                              BLI_addtail(&(cu->bev), bl);
 +                              BLI_addtail(bev, bl);
  
-                               if (nu->flagu & CU_NURB_CYCLIC) bl->poly = 0;
-                               else bl->poly = -1;
+                               bl->poly = (nu->flagu & CU_NURB_CYCLIC) ? 0 : -1;
+                               bl->charidx = nu->charidx;
                                bevp = (BevPoint *)(bl + 1);
  
                                a = nu->pntsu - 1;
                                        len = (resolu * SEGMENTSU(nu));
  
                                        bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelList3");
 -                                      BLI_addtail(&(cu->bev), bl);
 +                                      BLI_addtail(bev, bl);
                                        bl->nr = len;
                                        bl->dupe_nr = 0;
-                                       if (nu->flagu & CU_NURB_CYCLIC) bl->poly = 0;
-                                       else bl->poly = -1;
+                                       bl->poly = (nu->flagu & CU_NURB_CYCLIC) ? 0 : -1;
+                                       bl->charidx = nu->charidx;
                                        bevp = (BevPoint *)(bl + 1);
  
                                        BKE_nurb_makeCurve(nu, &bevp->vec[0],