From 2c10134703cca65b9a4699c3d39950f92a163899 Mon Sep 17 00:00:00 2001 From: izzy lyseggen Date: Thu, 15 Apr 2021 17:02:46 +0100 Subject: [PATCH] feat(objects): add RenderMaterial --- specklepy/objects/other.py | 12 ++++++++++++ specklepy/serialization/base_object_serializer.py | 1 + 2 files changed, 13 insertions(+) create mode 100644 specklepy/objects/other.py diff --git a/specklepy/objects/other.py b/specklepy/objects/other.py new file mode 100644 index 0000000..baf6569 --- /dev/null +++ b/specklepy/objects/other.py @@ -0,0 +1,12 @@ +from .base import Base + +OTHER = "Objects.Other." + + +class RenderMaterial(Base, speckle_type=OTHER + "RenderMaterial"): + name: str = None + opacity: float = 1 + metalness: float = 0 + roughness: float = 1 + diffuse: int = -2894893 # light gray arbg + emissive: int = -16777216 # black arbg diff --git a/specklepy/serialization/base_object_serializer.py b/specklepy/serialization/base_object_serializer.py index e80bd05..2403913 100644 --- a/specklepy/serialization/base_object_serializer.py +++ b/specklepy/serialization/base_object_serializer.py @@ -8,6 +8,7 @@ from specklepy.objects.base import Base, DataChunk from specklepy.logging.exceptions import SerializationException, SpeckleException from specklepy.transports.abstract_transport import AbstractTransport import specklepy.objects.geometry +import specklepy.objects.other PRIMITIVES = (int, float, str, bool)