From 1e66938d7a3b22ece58eb4d1af4ac7611448a7ff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Nov 2023 11:31:04 +1100 Subject: [PATCH] Cleanup: spelling in comments, format --- scripts/startup/bl_ui/properties_object.py | 2 +- source/blender/blenlib/BLI_math_geom.h | 8 ++------ source/blender/blenlib/intern/math_geom.cc | 8 +++----- .../blender/nodes/composite/nodes/node_composite_image.cc | 6 +++--- source/blender/nodes/shader/materialx/node_parser.cc | 2 +- 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/scripts/startup/bl_ui/properties_object.py b/scripts/startup/bl_ui/properties_object.py index 095f0285ab6..1dddc9e229a 100644 --- a/scripts/startup/bl_ui/properties_object.py +++ b/scripts/startup/bl_ui/properties_object.py @@ -394,7 +394,7 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel): layout.separator() col = layout.column(heading="Ray Visibility") col.prop(ob, "visible_shadow", text="Shadow", toggle=False) - + if ob.type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT', 'CURVES', 'POINTCLOUD', 'VOLUME', 'LIGHT'}: layout.separator() col = layout.column(heading="Light Probes") diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 7239e2ab723..f23c49d23ea 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -788,12 +788,8 @@ bool isect_ray_line_v3(const float ray_origin[3], /* Point in polygon. */ -bool isect_point_poly_v2(const float pt[2], - const float verts[][2], - unsigned int nr); -bool isect_point_poly_v2_int(const int pt[2], - const int verts[][2], - unsigned int nr); +bool isect_point_poly_v2(const float pt[2], const float verts[][2], unsigned int nr); +bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], unsigned int nr); /** * Point in quad - only convex quads. diff --git a/source/blender/blenlib/intern/math_geom.cc b/source/blender/blenlib/intern/math_geom.cc index 7051acc711f..01df242508c 100644 --- a/source/blender/blenlib/intern/math_geom.cc +++ b/source/blender/blenlib/intern/math_geom.cc @@ -1359,16 +1359,14 @@ int isect_line_sphere_v3(const float l1[3], float r_p1[3], float r_p2[3]) { - /* adapted for use in blender by Campbell Barton - 2011 + /* Adapted for use in blender by Campbell Barton, 2011. * - * atelier iebele abel - 2001 - * * http://www.iebele.nl + * `Atelier Iebele Abel ` - 2001. * * sphere_line_intersection function adapted from: * http://astronomy.swin.edu.au/pbourke/geometry/sphereline - * Paul Bourke - */ + * `Paul Bourke `. */ const float ldir[3] = { l2[0] - l1[0], diff --git a/source/blender/nodes/composite/nodes/node_composite_image.cc b/source/blender/nodes/composite/nodes/node_composite_image.cc index f8226311d26..239fe265317 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.cc +++ b/source/blender/nodes/composite/nodes/node_composite_image.cc @@ -575,10 +575,10 @@ class ImageOperation : public NodeOperation { } } - /* Compositor image inputs are expected to be always premultiplied, so identify if the GPU - * texture returned by the image module is straight and needs to be premultiplied. An exception + /* Compositor image inputs are expected to be always pre-multiplied, so identify if the GPU + * texture returned by the image module is straight and needs to be pre-multiplied. An exception * is when the image has an alpha mode of channel packed or alpha ignore, in which case, we - * always ignore premultiplication. */ + * always ignore pre-multiplication. */ bool should_premultiply_alpha(ImageUser &image_user) { Image *image = get_image(); diff --git a/source/blender/nodes/shader/materialx/node_parser.cc b/source/blender/nodes/shader/materialx/node_parser.cc index c0f3ec1064a..e1313b770d6 100644 --- a/source/blender/nodes/shader/materialx/node_parser.cc +++ b/source/blender/nodes/shader/materialx/node_parser.cc @@ -64,7 +64,7 @@ std::string NodeParser::node_name(bool with_out_socket) const { auto valid_name = [](const std::string &name) { /* Node name should suite to MatX and USD valid names. - * It shouldn't start from '_', due to error occured in Storm delegate. */ + * It shouldn't start from '_', due to error occurred in Storm delegate. */ std::string res = MaterialX::createValidName(pxr::TfMakeValidIdentifier(name)); if (res[0] == '_') { res = "node" + res;