Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-10 10:19:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-10 14:04:51 +0300
commit2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch)
treee7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/io/usd/intern
parentc735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff)
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/io/usd/intern')
-rw-r--r--source/blender/io/usd/intern/usd_capi.cc14
-rw-r--r--source/blender/io/usd/intern/usd_writer_abstract.cc12
-rw-r--r--source/blender/io/usd/intern/usd_writer_camera.cc2
-rw-r--r--source/blender/io/usd/intern/usd_writer_hair.cc2
-rw-r--r--source/blender/io/usd/intern/usd_writer_mesh.cc8
-rw-r--r--source/blender/io/usd/intern/usd_writer_transform.cc4
6 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc
index 4717f27dbd9..7b375689543 100644
--- a/source/blender/io/usd/intern/usd_capi.cc
+++ b/source/blender/io/usd/intern/usd_capi.cc
@@ -88,7 +88,7 @@ static void export_startjob(void *customdata,
WM_set_locked_interface(data->wm, true);
G.is_break = false;
- // Construct the depsgraph for exporting.
+ /* Construct the depsgraph for exporting. */
Scene *scene = DEG_get_input_scene(data->depsgraph);
if (data->params.visible_objects_only) {
DEG_graph_build_from_view_layer(data->depsgraph);
@@ -101,7 +101,7 @@ static void export_startjob(void *customdata,
*progress = 0.0f;
*do_update = true;
- // For restoring the current frame after exporting animation is done.
+ /* For restoring the current frame after exporting animation is done. */
const int orig_frame = CFRA;
pxr::UsdStageRefPtr usd_stage = pxr::UsdStage::CreateNew(data->filename);
@@ -120,7 +120,7 @@ static void export_startjob(void *customdata,
usd_stage->GetRootLayer()->SetDocumentation(std::string("Blender v") +
BKE_blender_version_string());
- // Set up the stage for animated data.
+ /* Set up the stage for animated data. */
if (data->params.export_animation) {
usd_stage->SetTimeCodesPerSecond(FPS);
usd_stage->SetStartTimeCode(scene->r.sfra);
@@ -130,7 +130,7 @@ static void export_startjob(void *customdata,
USDHierarchyIterator iter(data->depsgraph, usd_stage, data->params);
if (data->params.export_animation) {
- // Writing the animated frames is not 100% of the work, but it's our best guess.
+ /* Writing the animated frames is not 100% of the work, but it's our best guess. */
float progress_per_frame = 1.0f / std::max(1, (scene->r.efra - scene->r.sfra + 1));
for (float frame = scene->r.sfra; frame <= scene->r.efra; frame++) {
@@ -138,7 +138,7 @@ static void export_startjob(void *customdata,
break;
}
- // Update the scene for the next frame to render.
+ /* Update the scene for the next frame to render. */
scene->r.cfra = static_cast<int>(frame);
scene->r.subframe = frame - scene->r.cfra;
BKE_scene_graph_update_for_newframe(data->depsgraph);
@@ -151,14 +151,14 @@ static void export_startjob(void *customdata,
}
}
else {
- // If we're not animating, a single iteration over all objects is enough.
+ /* If we're not animating, a single iteration over all objects is enough. */
iter.iterate_and_write();
}
iter.release_writers();
usd_stage->GetRootLayer()->Save();
- // Finish up by going back to the keyframe that was current before we started.
+ /* Finish up by going back to the keyframe that was current before we started. */
if (CFRA != orig_frame) {
CFRA = orig_frame;
BKE_scene_graph_update_for_newframe(data->depsgraph);
diff --git a/source/blender/io/usd/intern/usd_writer_abstract.cc b/source/blender/io/usd/intern/usd_writer_abstract.cc
index 3f5babdee56..17d51c9b7cc 100644
--- a/source/blender/io/usd/intern/usd_writer_abstract.cc
+++ b/source/blender/io/usd/intern/usd_writer_abstract.cc
@@ -25,7 +25,7 @@
/* TfToken objects are not cheap to construct, so we do it once. */
namespace usdtokens {
-// Materials
+/* Materials */
static const pxr::TfToken diffuse_color("diffuseColor", pxr::TfToken::Immortal);
static const pxr::TfToken metallic("metallic", pxr::TfToken::Immortal);
static const pxr::TfToken preview_shader("previewShader", pxr::TfToken::Immortal);
@@ -58,8 +58,8 @@ pxr::UsdTimeCode USDAbstractWriter::get_export_time_code() const
if (is_animated_) {
return usd_export_context_.hierarchy_iterator->get_export_time_code();
}
- // By using the default timecode USD won't even write a single `timeSample` for non-animated
- // data. Instead, it writes it as non-timesampled.
+ /* By using the default timecode USD won't even write a single `timeSample` for non-animated
+ * data. Instead, it writes it as non-timesampled. */
static pxr::UsdTimeCode default_timecode = pxr::UsdTimeCode::Default();
return default_timecode;
}
@@ -90,7 +90,7 @@ pxr::UsdShadeMaterial USDAbstractWriter::ensure_usd_material(Material *material)
static pxr::SdfPath material_library_path("/_materials");
pxr::UsdStageRefPtr stage = usd_export_context_.stage;
- // Construct the material.
+ /* Construct the material. */
pxr::TfToken material_name(usd_export_context_.hierarchy_iterator->get_id_name(&material->id));
pxr::SdfPath usd_path = material_library_path.AppendChild(material_name);
pxr::UsdShadeMaterial usd_material = pxr::UsdShadeMaterial::Get(stage, usd_path);
@@ -99,7 +99,7 @@ pxr::UsdShadeMaterial USDAbstractWriter::ensure_usd_material(Material *material)
}
usd_material = pxr::UsdShadeMaterial::Define(stage, usd_path);
- // Construct the shader.
+ /* Construct the shader. */
pxr::SdfPath shader_path = usd_path.AppendChild(usdtokens::preview_shader);
pxr::UsdShadeShader shader = pxr::UsdShadeShader::Define(stage, shader_path);
shader.CreateIdAttr(pxr::VtValue(usdtokens::preview_surface));
@@ -108,7 +108,7 @@ pxr::UsdShadeMaterial USDAbstractWriter::ensure_usd_material(Material *material)
shader.CreateInput(usdtokens::roughness, pxr::SdfValueTypeNames->Float).Set(material->roughness);
shader.CreateInput(usdtokens::metallic, pxr::SdfValueTypeNames->Float).Set(material->metallic);
- // Connect the shader and the material together.
+ /* Connect the shader and the material together. */
usd_material.CreateSurfaceOutput().ConnectToSource(shader, usdtokens::surface);
return usd_material;
diff --git a/source/blender/io/usd/intern/usd_writer_camera.cc b/source/blender/io/usd/intern/usd_writer_camera.cc
index f21a0444888..677be9a7fc4 100644
--- a/source/blender/io/usd/intern/usd_writer_camera.cc
+++ b/source/blender/io/usd/intern/usd_writer_camera.cc
@@ -96,7 +96,7 @@ void USDCameraWriter::do_write(HierarchyContext &context)
usd_camera.CreateClippingRangeAttr().Set(
pxr::VtValue(pxr::GfVec2f(camera->clip_start, camera->clip_end)), timecode);
- // Write DoF-related attributes.
+ /* Write DoF-related attributes. */
if (camera->dof.flag & CAM_DOF_ENABLED) {
usd_camera.CreateFStopAttr().Set(camera->dof.aperture_fstop, timecode);
diff --git a/source/blender/io/usd/intern/usd_writer_hair.cc b/source/blender/io/usd/intern/usd_writer_hair.cc
index df09aa2f187..5de8f3cefef 100644
--- a/source/blender/io/usd/intern/usd_writer_hair.cc
+++ b/source/blender/io/usd/intern/usd_writer_hair.cc
@@ -44,7 +44,7 @@ void USDHairWriter::do_write(HierarchyContext &context)
pxr::UsdGeomBasisCurves curves = pxr::UsdGeomBasisCurves::Define(usd_export_context_.stage,
usd_export_context_.usd_path);
- // TODO(Sybren): deal with (psys->part->flag & PART_HAIR_BSPLINE)
+ /* TODO(Sybren): deal with (psys->part->flag & PART_HAIR_BSPLINE) */
curves.CreateBasisAttr(pxr::VtValue(pxr::UsdGeomTokens->bspline));
curves.CreateTypeAttr(pxr::VtValue(pxr::UsdGeomTokens->cubic));
diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc
index 3f9cb78ea3b..17c41e0edc1 100644
--- a/source/blender/io/usd/intern/usd_writer_mesh.cc
+++ b/source/blender/io/usd/intern/usd_writer_mesh.cc
@@ -180,8 +180,8 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh)
true);
if (!attr_points.HasValue()) {
- // Provide the initial value as default. This makes USD write the value as constant if they
- // don't change over time.
+ /* Provide the initial value as default. This makes USD write the value as constant if they
+ * don't change over time. */
attr_points.Set(usd_mesh_data.points, defaultTime);
attr_face_vertex_counts.Set(usd_mesh_data.face_vertex_counts, defaultTime);
attr_face_vertex_indices.Set(usd_mesh_data.face_indices, defaultTime);
@@ -221,7 +221,7 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh)
}
write_surface_velocity(context.object, mesh, usd_mesh);
- // TODO(Sybren): figure out what happens when the face groups change.
+ /* TODO(Sybren): figure out what happens when the face groups change. */
if (frame_has_been_written_) {
return;
}
@@ -342,7 +342,7 @@ void USDGenericMeshWriter::assign_materials(const HierarchyContext &context,
return;
}
- // Define a geometry subset per material.
+ /* Define a geometry subset per material. */
for (const MaterialFaceGroups::value_type &face_group : usd_face_groups) {
short material_number = face_group.first;
const pxr::VtIntArray &face_indices = face_group.second;
diff --git a/source/blender/io/usd/intern/usd_writer_transform.cc b/source/blender/io/usd/intern/usd_writer_transform.cc
index 632a6dd0f3f..136b5c477a2 100644
--- a/source/blender/io/usd/intern/usd_writer_transform.cc
+++ b/source/blender/io/usd/intern/usd_writer_transform.cc
@@ -36,10 +36,10 @@ USDTransformWriter::USDTransformWriter(const USDExporterContext &ctx) : USDAbstr
void USDTransformWriter::do_write(HierarchyContext &context)
{
- float parent_relative_matrix[4][4]; // The object matrix relative to the parent.
+ float parent_relative_matrix[4][4]; /* The object matrix relative to the parent. */
mul_m4_m4m4(parent_relative_matrix, context.parent_matrix_inv_world, context.matrix_world);
- // Write the transform relative to the parent.
+ /* Write the transform relative to the parent. */
pxr::UsdGeomXform xform = pxr::UsdGeomXform::Define(usd_export_context_.stage,
usd_export_context_.usd_path);
if (!xformOp_) {