[Bf-blender-cvs] [ce2dc6ef2bc] master: Cleanup: formatting, spelling

Campbell Barton noreply at git.blender.org
Tue Mar 3 12:25:52 CET 2020


Commit: ce2dc6ef2bce1fdd038989e0a7841600daccfd49
Author: Campbell Barton
Date:   Tue Mar 3 22:06:52 2020 +1100
Branches: master
https://developer.blender.org/rBce2dc6ef2bce1fdd038989e0a7841600daccfd49

Cleanup: formatting, spelling

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

M	source/blender/blenkernel/intern/dynamicpaint.c
M	source/blender/blenlib/intern/math_color_inline.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/versioning_cycles.c
M	source/blender/draw/engines/eevee/eevee_lightprobes.c
M	source/blender/draw/engines/overlay/overlay_armature.c
M	source/blender/draw/engines/overlay/shaders/extra_groundline_vert.glsl
M	source/blender/draw/engines/overlay/shaders/extra_vert.glsl
M	source/blender/draw/intern/draw_manager_data.c
M	source/blender/draw/intern/shaders/common_globals_lib.glsl
M	source/blender/editors/armature/armature_relations.c
M	source/blender/editors/curve/editcurve.c

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

diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 48c5aff721d..c434a97b890 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -6377,8 +6377,8 @@ static int dynamicPaint_doStep(Depsgraph *depsgraph,
   return ret;
 }
 
-/*
- * Calculate a single frame and included subframes for surface
+/**
+ * Calculate a single frame and included sub-frames for surface.
  */
 int dynamicPaint_calculateFrame(DynamicPaintSurface *surface,
                                 struct Depsgraph *depsgraph,
diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c
index 52ca229fe27..66fd2780cf8 100644
--- a/source/blender/blenlib/intern/math_color_inline.c
+++ b/source/blender/blenlib/intern/math_color_inline.c
@@ -323,7 +323,7 @@ MINLINE int compare_rgb_uchar(const unsigned char col_a[3],
 MINLINE float dither_random_value(float s, float t)
 {
   /* Original code from https://www.shadertoy.com/view/4t2SDh */
-  /* The nois reshaping technique does not work on CPU.
+  /* The noise reshaping technique does not work on CPU.
    * We generate and merge two distribution instead */
   /* Uniform noise in [0..1[ range */
   float nrnd0 = sinf(s * 12.9898f + t * 78.233f) * 43758.5453f;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4adce2d796c..d97fe900679 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7676,8 +7676,8 @@ static void *restore_pointer_by_name_main(Main *mainp, ID *id, ePointerUserMode
  * Only for undo files, or to restore a screen after reading without UI...
  *
  * \param user:
- * - USER_IGNORE: no usercount change
- * - USER_REAL: ensure a real user (even if a fake one is set)
+ * - USER_IGNORE: no user-count change.
+ * - USER_REAL: ensure a real user (even if a fake one is set).
  * \param id_map: lookup table, use when performing many lookups.
  * this could be made an optional argument (falling back to a full lookup),
  * however at the moment it's always available.
diff --git a/source/blender/blenloader/intern/versioning_cycles.c b/source/blender/blenloader/intern/versioning_cycles.c
index 77167d887cf..ab5ce67615d 100644
--- a/source/blender/blenloader/intern/versioning_cycles.c
+++ b/source/blender/blenloader/intern/versioning_cycles.c
@@ -1250,12 +1250,13 @@ static void update_noise_and_wave_distortion(bNodeTree *ntree)
   }
 }
 
-/* Wave Texture node: Restore previous texture directions and offset.
+/**
+ * Wave Texture node: Restore previous texture directions and offset.
  * 1. In 2.81, Wave texture had fixed diagonal direction (Bands) or
  *    mapping along distance (Rings). Now, directions are customizable
  *    properties, with X axis being new default. To fix this we set new
  *    direction options to Diagonal and Spherical.
- * 2. Sine profile is now negatively offseted by PI/2 to better match
+ * 2. Sine profile is now negatively offset by PI/2 to better match
  *    other profiles. To fix this we set new Phase Offset input to PI/2
  *    in nodes with Sine profile.
  */
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 5e6c11833d3..1f12ef1f379 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -789,10 +789,10 @@ void EEVEE_lightprobes_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *ved
         if (pinfo->do_grid_update) {
           scene_orig->eevee.light_cache->flag |= LIGHTCACHE_UPDATE_GRID;
         }
-        /* If we update grid we need to update the cubemaps too.
-         * So always refresh cubemaps. */
+        /* If we update grid we need to update the cube-maps too.
+         * So always refresh cube-maps. */
         scene_orig->eevee.light_cache->flag |= LIGHTCACHE_UPDATE_CUBE;
-        /* Tag the lightcache to auto update. */
+        /* Tag the light-cache to auto update. */
         scene_orig->eevee.light_cache->flag |= LIGHTCACHE_UPDATE_AUTO;
         /* Use a notifier to trigger the operator after drawing. */
         WM_event_add_notifier(draw_ctx->evil_C, NC_LIGHTPROBE, scene_orig);
diff --git a/source/blender/draw/engines/overlay/overlay_armature.c b/source/blender/draw/engines/overlay/overlay_armature.c
index 537698c7789..3bf91b0d0be 100644
--- a/source/blender/draw/engines/overlay/overlay_armature.c
+++ b/source/blender/draw/engines/overlay/overlay_armature.c
@@ -1284,9 +1284,8 @@ static void draw_axes(ArmatureDrawContext *ctx,
   final_col[3] = (ctx->const_color) ? 1.0 : (BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? 0.1 : 0.65;
 
   if (pchan && pchan->custom && !(arm->flag & ARM_NO_CUSTOM)) {
-    /** Special case: Custom bones can have different scale than the bone.
-     * Recompute display matrix without the custom scalling applied. (T65640)
-     **/
+    /* Special case: Custom bones can have different scale than the bone.
+     * Recompute display matrix without the custom scaling applied. (T65640). */
     float axis_mat[4][4];
     float length = pchan->bone->length;
     copy_m4_m4(axis_mat, pchan->custom_tx ? pchan->custom_tx->pose_mat : pchan->pose_mat);
diff --git a/source/blender/draw/engines/overlay/shaders/extra_groundline_vert.glsl b/source/blender/draw/engines/overlay/shaders/extra_groundline_vert.glsl
index 738f0025f07..a82c13b9fb7 100644
--- a/source/blender/draw/engines/overlay/shaders/extra_groundline_vert.glsl
+++ b/source/blender/draw/engines/overlay/shaders/extra_groundline_vert.glsl
@@ -12,7 +12,7 @@ void main()
 {
   finalColor = colorLight;
 
-  /* Relative to DPI scalling. Have constant screen size. */
+  /* Relative to DPI scaling. Have constant screen size. */
   vec3 screen_pos = screenVecs[0].xyz * pos.x + screenVecs[1].xyz * pos.y;
   vec3 p = inst_pos;
   p.z *= (pos.z == 0.0) ? 0.0 : 1.0;
diff --git a/source/blender/draw/engines/overlay/shaders/extra_vert.glsl b/source/blender/draw/engines/overlay/shaders/extra_vert.glsl
index 92db27ea6dd..035fab1040e 100644
--- a/source/blender/draw/engines/overlay/shaders/extra_vert.glsl
+++ b/source/blender/draw/engines/overlay/shaders/extra_vert.glsl
@@ -137,11 +137,11 @@ void main()
   }
   /* Empties */
   else if ((vclass & VCLASS_EMPTY_SCALED) != 0) {
-    /* This is a bit silly but we avoid scalling the object matrix on CPU (saving a mat4 mul) */
+    /* This is a bit silly but we avoid scaling the object matrix on CPU (saving a mat4 mul) */
     vpos *= empty_scale;
   }
   else if ((vclass & VCLASS_EMPTY_SIZE) != 0) {
-    /* This is a bit silly but we avoid scalling the object matrix on CPU (saving a mat4 mul) */
+    /* This is a bit silly but we avoid scaling the object matrix on CPU (saving a mat4 mul) */
     vpos *= empty_size;
   }
   else if ((vclass & VCLASS_EMPTY_AXES) != 0) {
@@ -177,7 +177,7 @@ void main()
 
   vec3 world_pos;
   if ((vclass & VCLASS_SCREENSPACE) != 0) {
-    /* Relative to DPI scalling. Have constant screen size. */
+    /* Relative to DPI scaling. Have constant screen size. */
     vec3 screen_pos = screenVecs[0].xyz * vpos.x + screenVecs[1].xyz * vpos.y;
     vec3 p = (obmat * vec4(vofs, 1.0)).xyz;
     float screen_size = mul_project_m4_v3_zfac(p) * sizePixel;
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index 43e8e2a4733..6f2a9cc056f 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -514,7 +514,7 @@ static void drw_call_obinfos_init(DRWObjectInfos *ob_infos, Object *ob)
   ob_infos->ob_flag += (ob->base_flag & BASE_FROM_DUPLI) ? (1 << 2) : 0;
   ob_infos->ob_flag += (ob->base_flag & BASE_FROM_SET) ? (1 << 3) : 0;
   ob_infos->ob_flag += (ob == DST.draw_ctx.obact) ? (1 << 4) : 0;
-  /* Negative scalling. */
+  /* Negative scaling. */
   ob_infos->ob_flag *= (ob->transflag & OB_NEG_SCALE) ? -1.0f : 1.0f;
   /* Object Color. */
   copy_v4_v4(ob_infos->ob_color, ob->color);
diff --git a/source/blender/draw/intern/shaders/common_globals_lib.glsl b/source/blender/draw/intern/shaders/common_globals_lib.glsl
index 1777b5e23fc..6a3bf150095 100644
--- a/source/blender/draw/intern/shaders/common_globals_lib.glsl
+++ b/source/blender/draw/intern/shaders/common_globals_lib.glsl
@@ -104,7 +104,7 @@ layout(std140) uniform globalsBlock
   vec4 screenVecs[2];
   vec4 sizeViewport; /* Inverted size in zw. */
 
-  float sizePixel; /* This one is for dpi scalling */
+  float sizePixel; /* This one is for dpi scaling */
   float pixelFac;  /* To use with mul_project_m4_v3_zfac() */
   float sizeObjectCenter;
   float sizeLightCenter;
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index b800714cd14..2c2bf3cd283 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -667,7 +667,8 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
 
     /* 2) duplicate base */
 
-    /* Only duplicate linked armature but take into account user preferences for duplicating actions. */
+    /* Only duplicate linked armature but take into account
+     * user preferences for duplicating actions. */
     short dupflag = USER_DUP_ARM | (U.dupflag & USER_DUP_ACT);
     Base *base_new = ED_object_add_duplicate(bmain, scene, view_layer, base_old, dupflag);
     Object *ob_new = base_new->object;
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 902e45dde5a..a37063a076d 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1409,11 +1409,7 @@ static int separate_exec(bContext *C, wmOperator *op)
     /* Take into account user preferences for duplicating actions. */
     short dupflag = (U.dupflag & USER_DUP_ACT);
 
-    newbase = ED_object_add_duplicate(bmain,
-                                      scene,
-                                      view_layer,
-                                    

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list