Skip to content

Commit

Permalink
More dataclass changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTov committed May 14, 2024
1 parent e9bc6cd commit 89fd0f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions znvis/material/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Material parent class.
"""

from dataclasses import dataclass
from dataclasses import dataclass, field

import numpy as np

Expand Down Expand Up @@ -50,7 +50,9 @@ class Material:
Mitsuba bsdf object.
"""

colour: np.ndarray = np.array([59.0, 53.0, 97.0]) / 255
colour: np.ndarray = field(
default_factory=lambda: np.array([59.0, 53.0, 97.0]) / 255
)
alpha: float = 1.0
roughness: float = 0.5
metallic: float = 0.0
Expand Down

0 comments on commit 89fd0f1

Please sign in to comment.