Skip to content

Commit

Permalink
Update pre-commit and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTov committed May 14, 2024
1 parent bf9fcaf commit ae83e47
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fail_fast: true

repos:
- repo: https://github.com/psf/black
rev: 24.2.0
rev: 24.4.2
hooks:
- id: black

Expand Down
1 change: 1 addition & 0 deletions examples/material_spheres.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
-------
Tutorial script to visualize simple spheres over a random trajectory.
"""

import mitsuba as mi
import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion znvis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
-------
init file for the main ZnVis package.
"""
from znvis import rendering

from znvis import rendering
from znvis.bounding_objects.bounding_box import BoundingBox
from znvis.material.material import Material
from znvis.mesh.custom import CustomMesh
Expand Down
1 change: 1 addition & 0 deletions znvis/rendering/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
-------
Init file for the rendering module.
"""

from znvis.rendering.mitsuba import Mitsuba

__all__ = [Mitsuba.__name__]
7 changes: 4 additions & 3 deletions znvis/rendering/mitsuba.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
-------
Mitsuba rendering module.
"""

import os

import mitsuba as mi
Expand Down Expand Up @@ -149,9 +150,9 @@ def render_mesh_objects(
mesh.material.vector_properties["base_color"] = material.base_color
mesh.material.scalar_properties["roughness"] = material.base_roughness
mesh.material.scalar_properties["metallic"] = material.base_metallic
mesh.material.scalar_properties[
"reflectance"
] = material.base_reflectance
mesh.material.scalar_properties["reflectance"] = (
material.base_reflectance
)
mesh.material.scalar_properties["anisotropy"] = material.base_anisotropy

# Convert to Mitsuba mesh
Expand Down
1 change: 1 addition & 0 deletions znvis/visualizer/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
-------
Main visualizer class.
"""

import os

os.environ["OPENCV_IO_ENABLE_OPENEXR"] = "1"
Expand Down

0 comments on commit ae83e47

Please sign in to comment.