[Bf-blender-cvs] [1b0dd5a2150] master: Cleanup: style, spelling

Campbell Barton noreply at git.blender.org
Sat Sep 7 13:28:36 CEST 2019


Commit: 1b0dd5a2150c2207768ba74c1a25b842f3d4ece1
Author: Campbell Barton
Date:   Sat Sep 7 21:08:20 2019 +1000
Branches: master
https://developer.blender.org/rB1b0dd5a2150c2207768ba74c1a25b842f3d4ece1

Cleanup: style, spelling

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

M	intern/cycles/kernel/svm/svm_noise.h
M	release/scripts/modules/bpy_extras/view3d_utils.py
M	release/scripts/startup/bl_operators/add_mesh_torus.py
M	release/scripts/startup/bl_ui/space_topbar.py
M	source/blender/blendthumb/src/BlenderThumb.cpp
M	source/blender/blenkernel/intern/shrinkwrap.c
M	source/blender/blenloader/intern/versioning_cycles.c
M	source/blender/draw/engines/eevee/eevee_shadows_cube.c
M	source/blender/draw/engines/eevee/eevee_volumes.c
M	source/blender/editors/sculpt_paint/paint_cursor.c
M	source/blender/editors/transform/transform_convert_sequencer.c
M	source/blender/imbuf/intern/colormanagement.c
M	source/blender/makesdna/DNA_screen_types.h
M	source/blender/render/intern/source/pipeline.c
M	source/blender/windowmanager/intern/wm_event_system.c
M	source/blender/windowmanager/intern/wm_files.c
M	source/blender/windowmanager/intern/wm_init_exit.c
M	tests/python/bl_pyapi_idprop_datablock.py

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

diff --git a/intern/cycles/kernel/svm/svm_noise.h b/intern/cycles/kernel/svm/svm_noise.h
index 73d9e83ae0f..8d832247b18 100644
--- a/intern/cycles/kernel/svm/svm_noise.h
+++ b/intern/cycles/kernel/svm/svm_noise.h
@@ -281,7 +281,7 @@ ccl_device_noinline_cpu float perlin_4d(float x, float y, float z, float w)
  *    (v2, v3) is generated by moving v2 and v3 to the first and second
  *    places of the ssef using the shuffle mask <2, 3, 2, 3>. The third and
  *    fourth values are unused.
- * 2. Interplate g0 and g1 along the y axis to get the final value.
+ * 2. Interpolate g0 and g1 along the y axis to get the final value.
  *    g1 is generated by populating an ssef with the second value of g.
  *    Only the first value is important in the final ssef.
  *
diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py
index a2e394b270f..9e4958802f1 100644
--- a/release/scripts/modules/bpy_extras/view3d_utils.py
+++ b/release/scripts/modules/bpy_extras/view3d_utils.py
@@ -47,10 +47,11 @@ def region_2d_to_vector_3d(region, rv3d, coord):
     if rv3d.is_perspective:
         persinv = rv3d.perspective_matrix.inverted()
 
-        out = Vector(((2.0 * coord[0] / region.width) - 1.0,
-                      (2.0 * coord[1] / region.height) - 1.0,
-                      -0.5
-                      ))
+        out = Vector((
+            (2.0 * coord[0] / region.width) - 1.0,
+            (2.0 * coord[1] / region.height) - 1.0,
+            -0.5
+        ))
 
         w = out.dot(persinv[3].xyz) + persinv[3][3]
 
@@ -99,9 +100,11 @@ def region_2d_to_origin_3d(region, rv3d, coord, clamp=None):
         dx = (2.0 * coord[0] / region.width) - 1.0
         dy = (2.0 * coord[1] / region.height) - 1.0
         persinv = persmat.inverted()
-        origin_start = ((persinv.col[0].xyz * dx) +
-                        (persinv.col[1].xyz * dy) +
-                        persinv.translation)
+        origin_start = (
+            (persinv.col[0].xyz * dx) +
+            (persinv.col[1].xyz * dy) +
+            persinv.translation
+        )
 
         if clamp != 0.0:
             if rv3d.view_perspective != 'CAMERA':
@@ -149,17 +152,19 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
         from mathutils.geometry import intersect_line_plane
         viewinv = rv3d.view_matrix.inverted()
         view_vec = viewinv.col[2].copy()
-        return intersect_line_plane(origin_start,
-                                    origin_end,
-                                    depth_location,
-                                    view_vec, 1,
-                                    )
+        return intersect_line_plane(
+            origin_start,
+            origin_end,
+            depth_location,
+            view_vec, 1,
+        )
     else:
         from mathutils.geometry import intersect_point_line
-        return intersect_point_line(depth_location,
-                                    origin_start,
-                                    origin_end,
-                                    )[0]
+        return intersect_point_line(
+            depth_location,
+            origin_start,
+            origin_end,
+        )[0]
 
 
 def location_3d_to_region_2d(region, rv3d, coord, default=None):
@@ -184,8 +189,9 @@ def location_3d_to_region_2d(region, rv3d, coord, default=None):
         width_half = region.width / 2.0
         height_half = region.height / 2.0
 
-        return Vector((width_half + width_half * (prj.x / prj.w),
-                       height_half + height_half * (prj.y / prj.w),
-                       ))
+        return Vector((
+            width_half + width_half * (prj.x / prj.w),
+            height_half + height_half * (prj.y / prj.w),
+        ))
     else:
         return default
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py
index bd727ec3e83..316ad152a32 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -252,10 +252,12 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
             self.major_radius = self.abso_minor_rad + extra_helper
             self.minor_radius = extra_helper
 
-        verts_loc, faces = add_torus(self.major_radius,
-                                     self.minor_radius,
-                                     self.major_segments,
-                                     self.minor_segments)
+        verts_loc, faces = add_torus(
+            self.major_radius,
+            self.minor_radius,
+            self.major_segments,
+            self.minor_segments,
+        )
 
         mesh = bpy.data.meshes.new(data_("Torus"))
 
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index f66a363e6ca..0374a563532 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -563,7 +563,7 @@ class TOPBAR_MT_help(Menu):
 
         show_developer = context.preferences.view.show_developer_ui
 
-        layout.operator("wm.url_open_preset", text="Manual", icon='HELP',).type = 'MANUAL'
+        layout.operator("wm.url_open_preset", text="Manual", icon='HELP').type = 'MANUAL'
 
         layout.operator(
             "wm.url_open", text="Tutorials", icon='URL',
diff --git a/source/blender/blendthumb/src/BlenderThumb.cpp b/source/blender/blendthumb/src/BlenderThumb.cpp
index 94dae437260..bfb13d98f45 100644
--- a/source/blender/blendthumb/src/BlenderThumb.cpp
+++ b/source/blender/blendthumb/src/BlenderThumb.cpp
@@ -174,11 +174,13 @@ IFACEMETHODIMP CBlendThumb::GetThumbnail(UINT cx, HBITMAP *phbmp, WTS_ALPHATYPE
   char version[4];
   version[3] = '\0';
   _pStream->Read(&version, 3, &BytesRead);
-  if (BytesRead != 3)
+  if (BytesRead != 3) {
     return E_UNEXPECTED;
+  }
   int iVersion = atoi(version);
-  if (iVersion < 250)
+  if (iVersion < 250) {
     return S_FALSE;
+  }
 
   // 32 or 64 bit blend?
   SeekPos.QuadPart = 7;
@@ -208,8 +210,9 @@ IFACEMETHODIMP CBlendThumb::GetThumbnail(UINT cx, HBITMAP *phbmp, WTS_ALPHATYPE
         continue;
       }
     }
-    else
+    else {
       break;  // eof
+    }
 
     // Found the block
     SeekPos.QuadPart = BlockOffset + HeaderSize;
@@ -224,8 +227,9 @@ IFACEMETHODIMP CBlendThumb::GetThumbnail(UINT cx, HBITMAP *phbmp, WTS_ALPHATYPE
     char *pRGBA = new char[BlockSize];
     _pStream->Read(pRGBA, BlockSize, &BytesRead);
 
-    if (BytesRead != (ULONG)BlockSize)
+    if (BytesRead != (ULONG)BlockSize) {
       return E_UNEXPECTED;
+    }
 
     // Convert to BGRA for Windows
     for (int i = 0; i < BlockSize; i += 4) {
@@ -244,16 +248,18 @@ IFACEMETHODIMP CBlendThumb::GetThumbnail(UINT cx, HBITMAP *phbmp, WTS_ALPHATYPE
       if (0 != memcpy_s(&FlippedImage[(height - i - 1) * LineSize],
                         LineSize,
                         &pRGBA[i * LineSize],
-                        LineSize))
+                        LineSize)) {
         return E_UNEXPECTED;
+      }
     }
     delete[] pRGBA;
     pRGBA = FlippedImage;
 
     // Create image
     *phbmp = CreateBitmap(width, height, 1, 32, pRGBA);
-    if (!*phbmp)
+    if (!*phbmp) {
       return E_FAIL;
+    }
     *pdwAlpha = WTSAT_ARGB;  // it's actually BGRA, not sure why this works
 
     // Scale down if required
@@ -297,16 +303,18 @@ IFACEMETHODIMP CBlendThumb::GetThumbnail(UINT cx, HBITMAP *phbmp, WTS_ALPHATYPE
           DeleteObject(*phbmp);
           *phbmp = ResizedHBmp;
         }
-        else
+        else {
           DeleteObject(ResizedHBmp);
+        }
 
         pIScaler->Release();
       }
       WICBmp->Release();
       pImgFac->Release();
     }
-    else
+    else {
       hr = S_OK;
+    }
     break;
   }
   return hr;
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index 9b9fd33f52d..014a2c6d6ac 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -1408,7 +1408,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd,
     Object *ob_target = DEG_get_evaluated_object(ctx->depsgraph, smd->target);
     calc.target = BKE_modifier_get_evaluated_mesh_from_evaluated_object(ob_target, false);
 
-    /* TODO there might be several "bugs" on non-uniform scales matrixs
+    /* TODO there might be several "bugs" with non-uniform scales matrices
      * because it will no longer be nearest surface, not sphere projection
      * because space has been deformed */
     BLI_SPACE_TRANSFORM_SETUP(&calc.local2target, ob, ob_target);
diff --git a/source/blender/blenloader/intern/versioning_cycles.c b/source/blender/blenloader/intern/versioning_cycles.c
index 52be5b2ce74..1abf099b4c2 100644
--- a/source/blender/blenloader/intern/versioning_cycles.c
+++ b/source/blender/blenloader/intern/versioning_cycles.c
@@ -788,7 +788,7 @@ static void update_noise_node_dimensions(bNodeTree *ntree)
  * Since the RNA paths of the properties changed, we also have to update the
  * rna_path of the FCurves if they exist. To do that, we loop over FCurves
  * and check if they control a property of the node, if they do, we update
- * the path to be that of the corrsponding socket in the node or the added
+ * the path to be that of the corresponding socket in the node or the added
  * minimum/maximum node.
  *
  */
diff --git a/source/blender/draw/engines/eevee/eevee_shadows_cube.c b/source/blender/draw/engines/eevee/eevee_shadows_cube.c
index b10c206703a..a355e7e0792 100644
--- a/source/blender/draw/engines/eevee/eevee_shadows_cube.c
+++ b/source/blender/draw/engines/eevee/eevee_shadows_cube.c
@@ -116,12 +116,12 @@ bool EEVEE_shadows_cube_setup(EEVEE_LightsInfo *linfo, const EEVEE_Light *evli,
     /**
      * Anti-Aliasing jitter: Add random rotation.
      *
-     * The 2.0 factor is because texel angular size is not even across the cubemap,
+     * The 2.0 factor is because texel angular size is not even across the cube-map,
      * so we make the rotation range a bit bigger.
      * This will not blur the shadow even if the spread is too big since we are just
-  

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list