Commit: a717e49c4632a6e799087b6174e4dcc33cb89ea1
Author: Mateusz Grzeliński
Date:   Wed Aug 12 12:05:54 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rBa717e49c4632a6e799087b6174e4dcc33cb89ea1

Merge branch 'master' into soc-2020-info-editor

# Conflicts:
#       source/blender/blenkernel/intern/ipo.c
#       source/blender/blenkernel/intern/mask_rasterize.c
#       source/blender/blenkernel/intern/nla.c
#       source/blender/blenkernel/intern/particle.c
#       source/blender/blenkernel/intern/softbody.c
#       source/blender/blenloader/intern/readfile.c
#       source/blender/bmesh/tools/bmesh_bevel.c
#       source/blender/editors/interface/interface.c
#       source/blender/editors/interface/interface_anim.c
#       source/blender/modifiers/intern/MOD_datatransfer.c
#       source/blender/python/intern/bpy_rna.c
#       source/blender/python/intern/bpy_rna_anim.c

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



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

diff --cc source/blender/blenkernel/intern/mask_rasterize.c
index 358c15b1af9,92885535f57..fb957e3cbb2
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@@ -354,43 -354,38 +354,38 @@@ static bool layer_bucket_isect_test(con
      if (isect_point_tri_v2(cent, v1, v2, v3)) {
        return true;
      }
-     else {
-       if ((dist_squared_to_line_segment_v2(cent, v1, v2) < 
bucket_max_rad_squared) ||
-           (dist_squared_to_line_segment_v2(cent, v2, v3) < 
bucket_max_rad_squared) ||
-           (dist_squared_to_line_segment_v2(cent, v3, v1) < 
bucket_max_rad_squared)) {
-         return true;
-       }
-       else {
-         CLOG_DEBUG(&LOG, 0, "skip tri");
-         return false;
-       }
-     }
-   }
-   else {
-     const float *v1 = cos[face[0]];
-     const float *v2 = cos[face[1]];
-     const float *v3 = cos[face[2]];
-     const float *v4 = cos[face[3]];
  
-     if (isect_point_tri_v2(cent, v1, v2, v3)) {
+     if ((dist_squared_to_line_segment_v2(cent, v1, v2) < 
bucket_max_rad_squared) ||
+         (dist_squared_to_line_segment_v2(cent, v2, v3) < 
bucket_max_rad_squared) ||
+         (dist_squared_to_line_segment_v2(cent, v3, v1) < 
bucket_max_rad_squared)) {
        return true;
      }
-     else if (isect_point_tri_v2(cent, v1, v3, v4)) {
-       return true;
-     }
-     else {
-       if ((dist_squared_to_line_segment_v2(cent, v1, v2) < 
bucket_max_rad_squared) ||
-           (dist_squared_to_line_segment_v2(cent, v2, v3) < 
bucket_max_rad_squared) ||
-           (dist_squared_to_line_segment_v2(cent, v3, v4) < 
bucket_max_rad_squared) ||
-           (dist_squared_to_line_segment_v2(cent, v4, v1) < 
bucket_max_rad_squared)) {
-         return true;
-       }
-       else {
-         CLOG_DEBUG(&LOG, 0, "skip quad");
-         return false;
-       }
-     }
+ 
 -    // printf("skip tri\n");
++    CLOG_DEBUG(&LOG, 0, "skip tri");
+     return false;
+   }
+ 
+   const float *v1 = cos[face[0]];
+   const float *v2 = cos[face[1]];
+   const float *v3 = cos[face[2]];
+   const float *v4 = cos[face[3]];
+ 
+   if (isect_point_tri_v2(cent, v1, v2, v3)) {
+     return true;
+   }
+   if (isect_point_tri_v2(cent, v1, v3, v4)) {
+     return true;
    }
+ 
+   if ((dist_squared_to_line_segment_v2(cent, v1, v2) < 
bucket_max_rad_squared) ||
+       (dist_squared_to_line_segment_v2(cent, v2, v3) < 
bucket_max_rad_squared) ||
+       (dist_squared_to_line_segment_v2(cent, v3, v4) < 
bucket_max_rad_squared) ||
+       (dist_squared_to_line_segment_v2(cent, v4, v1) < 
bucket_max_rad_squared)) {
+     return true;
+   }
+ 
 -  // printf("skip quad\n");
++  CLOG_DEBUG(&LOG, 0, "skip quad");
+   return false;
  }
  
  static void layer_bucket_init_dummy(MaskRasterLayer *layer)
diff --cc source/blender/blenkernel/intern/nla.c
index 0801f09c2df,1ba82b352d1..45984149649
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@@ -1034,15 -1023,14 +1023,13 @@@ NlaTrack *BKE_nlatrack_find_tweaked(Ani
        if (BLI_findindex(&nlt->strips, adt->actstrip) != -1) {
          return nlt;
        }
-       else {
-         CLOG_VERBOSE(&LOG,
-                      1,
-                      "Active strip (%p, %s) not in NLA track found (%p, %s)",
-                      adt->actstrip,
-                      (adt->actstrip) ? adt->actstrip->name : "<None>",
-                      nlt,
-                      nlt->name);
 -      if (G.debug & G_DEBUG) {
 -        printf("%s: Active strip (%p, %s) not in NLA track found (%p, %s)\n",
 -               __func__,
 -               adt->actstrip,
 -               (adt->actstrip) ? adt->actstrip->name : "<None>",
 -               nlt,
 -               nlt->name);
--      }
++      CLOG_VERBOSE(&LOG,
++                   1,
++                   "Active strip (%p, %s) not in NLA track found (%p, %s)",
++                   adt->actstrip,
++                   (adt->actstrip) ? adt->actstrip->name : "<None>",
++                   nlt,
++                   nlt->name);
      }
    }
  
diff --cc source/blender/blenkernel/intern/particle.c
index 6a8b3dc41bb,b3da6c53b34..9a7dfd2aead
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@@ -1653,15 -1649,14 +1652,14 @@@ int psys_particle_dm_face_lookup(Mesh *
    if (osface_final == NULL) {
      /* Assume we don't need osface_final data, and we get a direct 1-1 
mapping... */
      if (findex_orig < totface_final) {
 -      // printf("\tNO CD_ORIGSPACE, assuming not needed\n");
 +      CLOG_VERBOSE(&LOG, 0, "\tNO CD_ORIGSPACE, assuming not needed");
        return findex_orig;
      }
-     else {
-       CLOG_ERROR(&LOG, "\tNO CD_ORIGSPACE, error out of range");
-       return DMCACHE_NOTFOUND;
-     }
+ 
 -    printf("\tNO CD_ORIGSPACE, error out of range\n");
++    CLOG_ERROR(&LOG, "\tNO CD_ORIGSPACE, error out of range");
+     return DMCACHE_NOTFOUND;
    }
-   else if (findex_orig >= mesh_original->totface) {
+   if (findex_orig >= mesh_original->totface) {
      return DMCACHE_NOTFOUND; /* index not in the original mesh */
    }
  
diff --cc source/blender/blenkernel/intern/particle_system.c
index cce8f2c9823,7bfc0ca764f..ff5b08fe656
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@@ -4402,28 -4392,20 +4395,28 @@@ static void particles_fluid_step(Partic
            sub_v3_v3(tmp, tmp2);
            mul_v3_v3(tmp, ob->scale);
            add_v3_v3(pa->state.co, tmp);
 -#  if 0
 +
            /* Debugging: Print particle coordinates. */
 -          printf("pa->state.co[0]: %f, pa->state.co[1]: %f, pa->state.co[2]: 
%f\n",
 -          pa->state.co[0], pa->state.co[1], pa->state.co[2]);
 -#  endif
 +          CLOG_DEBUG(&LOG,
 +                     2,
 +                     "pa->state.co[0]: %f, pa->state.co[1]: %f, 
pa->state.co[2]: %f",
 +                     pa->state.co[0],
 +                     pa->state.co[1],
 +                     pa->state.co[2]);
 +
            /* Set particle velocity. */
-           float velParticle[3] = {velX, velY, velZ};
+           const float velParticle[3] = {velX, velY, velZ};
            copy_v3_v3(pa->state.vel, velParticle);
            mul_v3_fl(pa->state.vel, fds->dx);
 -#  if 0
 +
            /* Debugging: Print particle velocity. */
 -          printf("pa->state.vel[0]: %f, pa->state.vel[1]: %f, 
pa->state.vel[2]: %f\n",
 -          pa->state.vel[0], pa->state.vel[1], pa->state.vel[2]);
 -#  endif
 +          CLOG_DEBUG(&LOG,
 +                     2,
 +                     "pa->state.vel[0]: %f, pa->state.vel[1]: %f, 
pa->state.vel[2]: %f",
 +                     pa->state.vel[0],
 +                     pa->state.vel[1],
 +                     pa->state.vel[2]);
 +
            /* Set default angular velocity and particle rotation. */
            zero_v3(pa->state.ave);
            unit_qt(pa->state.rot);
diff --cc source/blender/blenkernel/intern/softbody.c
index cdcf7370f9b,1ab9766a7ec..6c3a6f1ab23
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@@ -1996,8 -1996,8 +1996,8 @@@ static int _softbody_calc_forces_slice_
  
    /* debugerin */
    if (sb->totpoint < ifirst) {
 -    printf("Aye 998");
 +    CLOG_VERBOSE(&LOG, 0, "Aye 998");
-     return (998);
+     return 998;
    }
    /* debugerin */
  
diff --cc source/blender/blenloader/intern/readfile.c
index a2494bf5f4b,42b97550db1..1b3eb4dbf63
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -1479,8 -1484,8 +1476,8 @@@ static int fd_read_gzip_from_memory(Fil
    if (err == Z_STREAM_END) {
      return 0;
    }
-   else if (err != Z_OK) {
+   if (err != Z_OK) {
 -    printf("fd_read_gzip_from_memory: zlib error\n");
 +    CLOG_ERROR(&BLENLOADER_LOG_READFILE, "zlib error: %d", err);
      return 0;
    }
  
@@@ -9281,23 -9251,16 +9279,22 @@@ static bool read_libblock_undo_restore
      *r_id_old = id_old;
      return true;
    }
-   else if (id_old != NULL) {
+   if (id_old != NULL) {
      /* Local datablock was changed. Restore at the address of the old 
datablock. */
 -    DEBUG_PRINTF("read to old existing address\n");
 +    CLOG_INFO(&BLENLOADER_LOG_UNDO,
 +              "read %s (uuid %u) -> read to old existing address",
 +              id->name,
 +              id->session_uuid);
      *r_id_old = id_old;
      return false;
    }
-   else {
-     /* Local datablock does not exist in the undo step, so read from scratch. 
*/
-     CLOG_INFO(&BLENLOADER_LOG_UNDO,
+ 
+   /* Local datablock does not exist in the undo step, so read from scratch. */
 -  DEBUG_PRINTF("read at new address\n");
++  CLOG_INFO(&BLENLOADER_LOG_UNDO,
 +              "read %s (uuid %u) -> read at new address",
 +              id->name,
 +              id->session_uuid);
-     return false;
-   }
+   return false;
  }
  
  /* This routine reads a datablock and its direct data, and advances bhead to
diff --cc source/blender/bmesh/tools/bmesh_bevel.c
index 40121282072,b9c9aa3aec8..9a6679ccf6e
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@@ -3068,35 -3001,27 +3025,28 @@@ static void build_boundary(BevelParams 
  #ifdef DEBUG_ADJUST
  static void print_adjust_stats(BoundVert *vstart)
  {
-   BoundVert *v;
-   EdgeHalf *eleft, *eright;
-   double even_residual2, spec_residual2;
-   double max_even_r, max_even_r_pct;
-   double max_spec_r, max_spec_r_pct;
-   double delta, delta_pct;
- 
 -  printf("\nSolution analysis\n");
 +  CLOG_ADJUST(1, "Solution analysis");
-   even_residual2 = 0.0;
-   spec_residual2 = 0.0;
-   max_even_r = 0.0;
-   max_even_r_pct = 0.0;
-   max_spec_r = 0.0;
-   max_spec_r_pct = 0.0;
+   double even_residual2 = 0.0;
+   double spec_residual2 = 0.0;
+   double max_even_r = 0.0;
+   double max_even_r_pct = 0.0;
+   double max_spec_r = 0.0;
+   double max_spec_r_pct = 0.0;
 -  printf("width matching\n");
 +  CLOG_ADJUST(1, "width matching");
-   v = vstart;
+   BoundVert *v = vstart;
    do {
      if (v->adjchain != NULL) {
-       eright = v->efirst;
-       eleft = v->adjchain->elast;
-       delta = fabs(eright->offset_r - eleft

@@ Diff output truncated at 10240 characters. @@

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

Reply via email to