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>2021-08-04 03:03:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-04 03:03:07 +0300
commit0d2589d08c615d1bc07e5156b41b9ffda6c3ba27 (patch)
treebfe3c62930cf43bfd6fb7f3b2f35e7ca62ed9fb5 /source/blender/io/usd
parentfb87d236edb7e98c5fc526b9829e6bc6b8916828 (diff)
Cleanup: spelling
Diffstat (limited to 'source/blender/io/usd')
-rw-r--r--source/blender/io/usd/intern/usd_capi_import.cc5
-rw-r--r--source/blender/io/usd/intern/usd_reader_material.h21
-rw-r--r--source/blender/io/usd/intern/usd_reader_mesh.cc18
3 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc
index 8255fca284c..789ff20ba82 100644
--- a/source/blender/io/usd/intern/usd_capi_import.cc
+++ b/source/blender/io/usd/intern/usd_capi_import.cc
@@ -365,8 +365,7 @@ bool USD_import(struct bContext *C,
{
blender::io::usd::ensure_usd_plugin_path_registered();
- /* Using new here since MEM_* funcs do not call ctor to properly initialize
- * data. */
+ /* Using new here since `MEM_*` functions do not call constructor to properly initialize data. */
ImportJobData *job = new ImportJobData();
job->bmain = CTX_data_main(C);
job->scene = CTX_data_scene(C);
@@ -496,7 +495,7 @@ CacheReader *CacheReader_open_usd_object(CacheArchiveHandle *handle,
USDPrimReader *usd_reader = archive->create_reader(prim);
if (usd_reader == nullptr) {
- /* This object is not supported */
+ /* This object is not supported. */
return nullptr;
}
usd_reader->object(object);
diff --git a/source/blender/io/usd/intern/usd_reader_material.h b/source/blender/io/usd/intern/usd_reader_material.h
index 3e8fc675931..a17504bd590 100644
--- a/source/blender/io/usd/intern/usd_reader_material.h
+++ b/source/blender/io/usd/intern/usd_reader_material.h
@@ -55,28 +55,29 @@ struct NodePlacementContext {
/* Converts USD materials to Blender representation. */
-/* By default, the USDMaterialReader creates a Blender material with
+/**
+ By default, the #USDMaterialReader creates a Blender material with
* the same name as the USD material. If the USD material has a
- * UsdPreviewSurface source, the Blender material's viewport display
+ * #UsdPreviewSurface source, the Blender material's viewport display
* color, roughness and metallic properties are set to the corresponding
- * UsdPreoviewSurface inputs.
+ * #UsdPreoviewSurface inputs.
*
* If the Import USD Preview option is enabled, the current implementation
- * converts UsdPreviewSurface to Blender nodes as follows:
+ * converts #UsdPreviewSurface to Blender nodes as follows:
*
- * UsdPreviewSurface -> Pricipled BSDF
- * UsdUVTexture -> Texture Image + Normal Map
- * UsdPrimvarReader_float2 -> UV Map
+ * - #UsdPreviewSurface -> Principled BSDF
+ * - #UsdUVTexture -> Texture Image + Normal Map
+ * - UsdPrimvarReader_float2 -> UV Map
*
* Limitations: arbitrary primvar readers or UsdTransform2d not yet
- * supported. For UsdUVTexture, only the file, st and sourceColorSpace
+ * supported. For #UsdUVTexture, only the file, st and #sourceColorSpace
* inputs are handled.
*
* TODO(makowalski): Investigate adding support for converting additional
* shaders and inputs. Supporting certain types of inputs, such as texture
* scale and bias, will probably require creating Blender Group nodes with
- * the corresponding inputs. */
-
+ * the corresponding inputs.
+ */
class USDMaterialReader {
protected:
USDImportParams params_;
diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc
index f13da4680e2..9c75bc8afae 100644
--- a/source/blender/io/usd/intern/usd_reader_mesh.cc
+++ b/source/blender/io/usd/intern/usd_reader_mesh.cc
@@ -61,7 +61,7 @@ static const pxr::TfToken normalsPrimvar("normals", pxr::TfToken::Immortal);
} // namespace usdtokens
namespace utils {
-/* Very similar to abc mesh utils. */
+/* Very similar to #blender::io::alembic::utils. */
static void build_mat_map(const Main *bmain, std::map<std::string, Material *> *r_mat_map)
{
if (r_mat_map == nullptr) {
@@ -71,7 +71,7 @@ static void build_mat_map(const Main *bmain, std::map<std::string, Material *> *
Material *material = static_cast<Material *>(bmain->materials.first);
for (; material; material = static_cast<Material *>(material->id.next)) {
- /* We have to do this because the stored material name is coming directly from usd. */
+ /* We have to do this because the stored material name is coming directly from USD. */
(*r_mat_map)[pxr::TfMakeValidIdentifier(material->id.name + 2)] = material;
}
}
@@ -212,7 +212,7 @@ void USDMeshReader::read_object_data(Main *bmain, const double motionSampleTime)
is_initial_load_ = false;
if (read_mesh != mesh) {
- /* XXX fixme after 2.80; mesh->flag isn't copied by BKE_mesh_nomain_to_mesh() */
+ /* FIXME: after 2.80; `mesh->flag` isn't copied by #BKE_mesh_nomain_to_mesh() */
/* read_mesh can be freed by BKE_mesh_nomain_to_mesh(), so get the flag before that happens. */
short autosmooth = (read_mesh->flag & ME_AUTOSMOOTH);
BKE_mesh_nomain_to_mesh(read_mesh, mesh, object_, &CD_MASK_MESH, true);
@@ -334,7 +334,7 @@ void USDMeshReader::read_uvs(Mesh *mesh, const double motionSampleTime, const bo
pxr::TfToken uv_token;
- /* If first time seeing uv token, store in map of <layer->uid, TfToken> */
+ /* If first time seeing uv token, store in map of `<layer->uid, TfToken>`. */
if (uv_token_map_.find(layer_name) == uv_token_map_.end()) {
uv_token = pxr::TfToken(layer_name);
uv_token_map_.insert(std::make_pair(layer_name, uv_token));
@@ -347,7 +347,7 @@ void USDMeshReader::read_uvs(Mesh *mesh, const double motionSampleTime, const bo
if (uv_token.IsEmpty()) {
continue;
}
- /* Early out if not first load and uvs arent animated. */
+ /* Early out if not first load and UVs aren't animated. */
if (!load_uvs && primvar_varying_map_.find(uv_token) != primvar_varying_map_.end() &&
!primvar_varying_map_.at(uv_token)) {
continue;
@@ -630,7 +630,7 @@ void USDMeshReader::read_mesh_sample(ImportSettings *settings,
const bool new_mesh)
{
/* Note that for new meshes we always want to read verts and polys,
- * regradless of the value of the read_flag, to avoid a crash downstream
+ * regardless of the value of the read_flag, to avoid a crash downstream
* in code that expect this data to be there. */
if (new_mesh || (settings->read_flag & MOD_MESHSEQ_READ_VERT) != 0) {
@@ -684,7 +684,7 @@ void USDMeshReader::assign_facesets_to_mpoly(double motionSampleTime,
}
/* Find the geom subsets that have bound materials.
- * We don't call pxr::UsdShadeMaterialBindingAPI::GetMaterialBindSubsets()
+ * We don't call #pxr::UsdShadeMaterialBindingAPI::GetMaterialBindSubsets()
* because this function returns only those subsets that are in the 'materialBind'
* family, but, in practice, applications (like Houdini) might export subsets
* in different families that are bound to materials.
@@ -780,7 +780,7 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh,
bool is_uv = false;
- /* Assume all uvs are stored in one of these primvar types */
+ /* Assume all UVs are stored in one of these primvar types */
if (type == pxr::SdfValueTypeNames->TexCoord2hArray ||
type == pxr::SdfValueTypeNames->TexCoord2fArray ||
type == pxr::SdfValueTypeNames->TexCoord2dArray) {
@@ -817,7 +817,7 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh,
Mesh *active_mesh = existing_mesh;
bool new_mesh = false;
- /* TODO(makowalski): inmplement the optimization of only updating the mesh points when
+ /* TODO(makowalski): implement the optimization of only updating the mesh points when
* the topology is consistent, as in the Alembic importer. */
ImportSettings settings;