Skip to content

Commit bfec26c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b6f95ef commit bfec26c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/omniverse/utility.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,25 +214,25 @@ def convert_mesh_to_usd(input_file, output_file):
214214
s = 0.7 + 0.3 * random.random() # Saturation between 0.7-1.0
215215
v = 0.7 + 0.3 * random.random() # Value between 0.7-1.0
216216
r, g, b = colorsys.hsv_to_rgb(h, s, v)
217-
217+
218218
# Create a material with the random color
219219
mat_name = f"{node_name}_material"
220220
mat_path = f"{materials_path}/{mat_name}"
221221
material = UsdShade.Material.Define(stage, mat_path)
222-
222+
223223
# Create shader
224224
shader = UsdShade.Shader.Define(stage, f"{mat_path}/PreviewSurface")
225225
shader.CreateIdAttr("UsdPreviewSurface")
226-
226+
227227
# Set the random color
228228
shader.CreateInput("diffuseColor", Sdf.ValueTypeNames.Color3f).Set(Gf.Vec3f(r, g, b))
229229
shader.CreateInput("roughness", Sdf.ValueTypeNames.Float).Set(0.4)
230-
230+
231231
# Connect shader to material
232232
material_output = material.CreateOutput("surface", Sdf.ValueTypeNames.Token)
233233
shader_output = shader.CreateOutput("surface", Sdf.ValueTypeNames.Token)
234234
material_output.ConnectToSource(shader_output)
235-
235+
236236
# Bind material to mesh
237237
UsdShade.MaterialBindingAPI(usd_mesh).Bind(material)
238238

0 commit comments

Comments
 (0)