forked from bartvdbraak/blender
Cleanup: spelling
This commit is contained in:
parent
fb87d236ed
commit
0d2589d08c
@ -156,7 +156,7 @@ void _bli_array_grow_func(void **arr_p,
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* not part of the 'API' but handy funcs,
|
||||
* Not part of the 'API' but handy functions,
|
||||
* same purpose as #BLI_array_staticdeclare()
|
||||
* but use when the max size is known ahead of time */
|
||||
#define BLI_array_fixedstack_declare(arr, maxstatic, realsize, allocstr) \
|
||||
|
@ -25,7 +25,7 @@
|
||||
* on a simple polygon representation where we _know_:
|
||||
*
|
||||
* - The polygon is primitive with no holes with a continuous boundary.
|
||||
* - Tris have consistent winding.
|
||||
* - Triangles have consistent winding.
|
||||
* - 2d (saves some hassles projecting face pairs on an axis for every edge-rotation)
|
||||
* also saves us having to store all previous edge-states (see #EdRotState in bmesh_beautify.c)
|
||||
*
|
||||
|
@ -935,9 +935,9 @@ static bool bm_edge_collapse_is_degenerate_topology(BMEdge *e_first)
|
||||
}
|
||||
|
||||
/**
|
||||
* special, highly limited edge collapse function
|
||||
* Special, highly limited edge collapse function
|
||||
* intended for speed over flexibility.
|
||||
* can only collapse edges connected to (1, 2) tris.
|
||||
* can only collapse edges connected to (1, 2) triangles.
|
||||
*
|
||||
* Important - don't add vert/edge/face data on collapsing!
|
||||
*
|
||||
|
@ -23,8 +23,8 @@
|
||||
|
||||
namespace blender::compositor {
|
||||
|
||||
/* utility functions used by glare, tonemap and lens distortion */
|
||||
/* soms macros for color handling */
|
||||
/* Utility functions used by glare, tone-map and lens distortion. */
|
||||
/* Some macros for color handling. */
|
||||
typedef float fRGB[4];
|
||||
|
||||
/* TODO: replace with BLI_math_vector. */
|
||||
|
@ -244,8 +244,8 @@ void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *region, bDope
|
||||
UI_block_align_end(block);
|
||||
UI_block_layout_resolve(block, NULL, NULL);
|
||||
|
||||
/* Make sure the events are consumed from the search and dont reach other UI blocks since this is
|
||||
* drawn on top of animchannels. */
|
||||
/* Make sure the events are consumed from the search and don't reach other UI blocks since this
|
||||
* is drawn on top of animation-channels. */
|
||||
UI_block_flag_enable(block, UI_BLOCK_CLIP_EVENTS);
|
||||
UI_block_bounds_set_normal(block, 0);
|
||||
UI_block_end(C, block);
|
||||
|
@ -164,8 +164,8 @@ void ED_mask_select_flush_all(Mask *mask)
|
||||
LISTBASE_FOREACH (MaskSpline *, spline, &mask_layer->splines) {
|
||||
spline->flag &= ~SELECT;
|
||||
|
||||
/* intentionally _dont_ do this in the mask layer loop
|
||||
* so we clear flags on all splines */
|
||||
/* Intentionally *don't* do this in the mask layer loop
|
||||
* so we clear flags on all splines. */
|
||||
if (mask_layer->restrictflag & MASK_RESTRICT_VIEW) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1769,7 +1769,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void
|
||||
|
||||
GPU_blend(GPU_BLEND_ALPHA);
|
||||
|
||||
/* Static Tris */
|
||||
/* Static Triangles. */
|
||||
if (stitch_preview->static_tris) {
|
||||
UI_GetThemeColor4fv(TH_STITCH_PREVIEW_ACTIVE, col);
|
||||
vbo = GPU_vertbuf_create_with_format(&format);
|
||||
|
@ -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);
|
||||
|
@ -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_;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user