Skip to content

Commit

Permalink
Fix typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed May 26, 2024
1 parent 4ec9ff6 commit 0ff7393
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/tydra/obj-export.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ bool export_to_obj(const RenderScene &scene, const int mesh_id,
ss << "Kd " << col[0] << " " << col[1] << " " << col[2] << "\n";
}

if (scene.materials[mat_id].surfaceShader.useSpecularWorkFlow) {
if (scene.materials[mat_id].surfaceShader.useSpecularWorkflow) {
if (scene.materials[mat_id].surfaceShader.specularColor.is_texture()) {
int32_t texId = scene.materials[mat_id].surfaceShader.specularColor.texture_id;
if ((texId < 0) || (texId >= int(scene.textures.size()))) {
Expand Down
6 changes: 3 additions & 3 deletions src/tydra/render-data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4827,11 +4827,11 @@ bool RenderSceneConverter::ConvertPreviewSurfaceShader(
int val;
if (!shader.useSpecularWorkflow.get_value().get(env.timecode, &val)) {
PUSH_ERROR_AND_RETURN(
fmt::format("Failed to get useSpcularWorkFlow value at time `{}`.",
fmt::format("Failed to get useSpcularWorkflow value at time `{}`.",
env.timecode));
}

rshader.useSpecularWorkFlow = val ? true : false;
rshader.useSpecularWorkflow = val ? true : false;
}
}

Expand Down Expand Up @@ -6882,7 +6882,7 @@ std::string DumpPreviewSurface(const PreviewSurfaceShader &shader,
ss << "PreviewSurfaceShader {\n";

ss << pprint::Indent(indent + 1)
<< "useSpecularWorkFlow = " << std::to_string(shader.useSpecularWorkFlow)
<< "useSpecularWorkflow = " << std::to_string(shader.useSpecularWorkflow)
<< "\n";

ss << pprint::Indent(indent + 1) << "diffuseColor = ";
Expand Down
2 changes: 1 addition & 1 deletion src/tydra/render-data.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ struct ShaderParam {

// UsdPreviewSurface
struct PreviewSurfaceShader {
bool useSpecularWorkFlow{false};
bool useSpecularWorkflow{false};

ShaderParam<vec3> diffuseColor{{0.18f, 0.18f, 0.18f}};
ShaderParam<vec3> emissiveColor{{0.0f, 0.0f, 0.0f}};
Expand Down
2 changes: 1 addition & 1 deletion src/tydra/usd-export.cc
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ static bool ToMaterialPrim(const RenderScene &scene, const std::string &abs_path
surfaceShader.outputsSurface.set_authored(
true); // Author `token outputs:surface`

surfaceShader.useSpecularWorkflow = rmat.surfaceShader.useSpecularWorkFlow ? 1 : 0;
surfaceShader.useSpecularWorkflow = rmat.surfaceShader.useSpecularWorkflow ? 1 : 0;

if (rmat.surfaceShader.diffuseColor.is_texture()) {

Expand Down

0 comments on commit 0ff7393

Please sign in to comment.