[Bf-blender-cvs] [183c4af6923] soc-2020-io-performance: Cleanup: edit comments, spellings.
Ankit Meel
noreply at git.blender.org
Tue Oct 6 20:45:23 CEST 2020
Commit: 183c4af692355ac0b4596ddd0594f96625839752
Author: Ankit Meel
Date: Tue Oct 6 23:07:58 2020 +0530
Branches: soc-2020-io-performance
https://developer.blender.org/rB183c4af692355ac0b4596ddd0594f96625839752
Cleanup: edit comments, spellings.
===================================================================
M source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc
M source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh
M source/blender/io/wavefront_obj/intern/obj_export_mtl.cc
===================================================================
diff --git a/source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc b/source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc
index 050ddf1e0a1..ee5fbf0b78c 100644
--- a/source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc
+++ b/source/blender/io/wavefront_obj/intern/obj_export_file_writer.cc
@@ -320,7 +320,7 @@ void OBJWriter::write_vertex_group(const OBJMesh &obj_mesh_data,
}
/**
- * Select which syntax to write polygon elements with.
+ * Select which OBJ syntax to write polygon elements with.
*/
OBJWriter::func_vert_uv_normal_indices OBJWriter::get_poly_element_writer(
const OBJMesh &obj_mesh_data)
@@ -420,21 +420,22 @@ void OBJWriter::write_nurbs_curve(const OBJCurve &obj_nurbs_data) const
nurbs_name,
nurbs_degree);
/**
- * The numbers here are indices into the point vertex coordinates written above.
+ * The numbers here are indices into the vertex coordinates written
+ * above, relative to the line that is going to be written.
+ * [0.0 - 1.0] is the curve parameter range.
* 0.0 1.0 -1 -2 -3 -4 for a non-cyclic curve with 4 points.
* 0.0 1.0 -1 -2 -3 -4 -1 -2 -3 for a cyclic curve with 4 points.
*/
const int total_control_points = obj_nurbs_data.get_nurbs_num(i);
- /* [0.0 - 1.0] is the curve parameter range. */
fputs("curv 0.0 1.0", outfile_);
for (int i = 0; i < total_control_points; i++) {
- /* + 1 to keep indices one-based, even if they're negative. */
+ /* "+1" to keep indices one-based, even if they're negative. */
fprintf(outfile_, " %d", -((i % tot_points) + 1));
}
fputs("\n", outfile_);
/**
- * In "parm u 0 0.1 .." line:, total control points + 2 equidistant numbers in the paramter
+ * In "parm u 0 0.1 .." line:, total control points + 2 equidistant numbers in the parameter
* range are inserted.
*/
fputs("parm u 0.000000 ", outfile_);
diff --git a/source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh b/source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh
index f72da42e3a8..332c30f3780 100644
--- a/source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh
+++ b/source/blender/io/wavefront_obj/intern/obj_export_file_writer.hh
@@ -86,12 +86,12 @@ class OBJWriter {
void update_index_offsets(const OBJMesh &obj_mesh_data);
private:
- /* Based on export parameters, a writer function with correct OBJ syntax is needed. */
+ /* Based on export parameters, a writer function with appropriate OBJ syntax is needed. */
typedef void (OBJWriter::*func_vert_uv_normal_indices)(Span<int> vert_indices,
Span<int> uv_indices,
Span<int> normal_indices) const;
-
func_vert_uv_normal_indices get_poly_element_writer(const OBJMesh &obj_mesh_data);
+
void write_vert_uv_normal_indices(Span<int> vert_indices,
Span<int> uv_indices,
Span<int> normal_indices) const;
diff --git a/source/blender/io/wavefront_obj/intern/obj_export_mtl.cc b/source/blender/io/wavefront_obj/intern/obj_export_mtl.cc
index d432e3c5e5c..bfb8e0e7cd1 100644
--- a/source/blender/io/wavefront_obj/intern/obj_export_mtl.cc
+++ b/source/blender/io/wavefront_obj/intern/obj_export_mtl.cc
@@ -131,7 +131,7 @@ static const bNode *get_node_of_type(Span<const nodes::OutputSocketRef *> socket
/**
* From a texture image shader node, get the image's filepath.
- * Returned filepath is stripped of inital "//". If packed image is found,
+ * Returned filepath is stripped of initial "//". If packed image is found,
* only the file "name" is returned.
*/
static const char *get_image_filepath(const bNode *tex_node)
@@ -159,7 +159,7 @@ static const char *get_image_filepath(const bNode *tex_node)
}
/**
- * Find the Principled-BSDF from the object's node tree & initialise class member.
+ * Find the Principled-BSDF from the object's node tree & initialize class member.
*/
void MaterialWrap::init_bsdf_node(StringRefNull object_name)
{
More information about the Bf-blender-cvs
mailing list