basilisk-engine 0.1.34__py3-none-any.whl → 0.1.36__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of basilisk-engine might be problematic. Click here for more details.
- basilisk/__init__.py +26 -26
- basilisk/audio/sound.py +27 -27
- basilisk/bsk_assets/cube.obj +48 -48
- basilisk/collisions/broad/broad_aabb.py +102 -102
- basilisk/collisions/broad/broad_bvh.py +137 -137
- basilisk/collisions/collider.py +95 -95
- basilisk/collisions/collider_handler.py +225 -224
- basilisk/collisions/narrow/contact_manifold.py +95 -95
- basilisk/collisions/narrow/dataclasses.py +34 -34
- basilisk/collisions/narrow/deprecated.py +46 -46
- basilisk/collisions/narrow/epa.py +91 -91
- basilisk/collisions/narrow/gjk.py +66 -66
- basilisk/collisions/narrow/graham_scan.py +24 -24
- basilisk/collisions/narrow/helper.py +29 -29
- basilisk/collisions/narrow/line_intersections.py +106 -106
- basilisk/collisions/narrow/sutherland_hodgman.py +75 -75
- basilisk/config.py +54 -4
- basilisk/draw/draw.py +100 -100
- basilisk/draw/draw_handler.py +175 -175
- basilisk/draw/font_renderer.py +28 -28
- basilisk/engine.py +165 -165
- basilisk/generic/abstract_bvh.py +15 -15
- basilisk/generic/abstract_custom.py +133 -133
- basilisk/generic/collisions.py +70 -70
- basilisk/generic/input_validation.py +82 -74
- basilisk/generic/math.py +6 -6
- basilisk/generic/matrices.py +35 -35
- basilisk/generic/meshes.py +72 -72
- basilisk/generic/quat.py +142 -142
- basilisk/generic/quat_methods.py +7 -7
- basilisk/generic/raycast_result.py +26 -26
- basilisk/generic/vec3.py +143 -143
- basilisk/input_output/IO_handler.py +91 -91
- basilisk/input_output/clock.py +49 -49
- basilisk/input_output/keys.py +43 -43
- basilisk/input_output/mouse.py +90 -89
- basilisk/input_output/path.py +14 -14
- basilisk/mesh/cube.py +33 -33
- basilisk/mesh/mesh.py +233 -233
- basilisk/mesh/mesh_from_data.py +150 -150
- basilisk/mesh/model.py +271 -271
- basilisk/mesh/narrow_aabb.py +89 -89
- basilisk/mesh/narrow_bvh.py +91 -91
- basilisk/mesh/narrow_primative.py +23 -23
- basilisk/nodes/helper.py +28 -28
- basilisk/nodes/node.py +704 -695
- basilisk/nodes/node_handler.py +97 -97
- basilisk/particles/particle_handler.py +64 -64
- basilisk/particles/particle_renderer.py +92 -92
- basilisk/physics/impulse.py +112 -112
- basilisk/physics/physics_body.py +43 -43
- basilisk/physics/physics_engine.py +35 -35
- basilisk/render/batch.py +103 -103
- basilisk/render/bloom.py +108 -0
- basilisk/render/camera.py +260 -260
- basilisk/render/chunk.py +108 -106
- basilisk/render/chunk_handler.py +167 -165
- basilisk/render/frame.py +107 -95
- basilisk/render/framebuffer.py +203 -192
- basilisk/render/image.py +120 -120
- basilisk/render/image_handler.py +120 -120
- basilisk/render/light.py +96 -96
- basilisk/render/light_handler.py +58 -58
- basilisk/render/material.py +232 -221
- basilisk/render/material_handler.py +133 -133
- basilisk/render/post_process.py +139 -139
- basilisk/render/shader.py +134 -134
- basilisk/render/shader_handler.py +85 -83
- basilisk/render/sky.py +120 -120
- basilisk/scene.py +289 -289
- basilisk/shaders/batch.frag +289 -276
- basilisk/shaders/batch.vert +117 -115
- basilisk/shaders/bloom_downsample.frag +43 -0
- basilisk/shaders/bloom_frame.frag +25 -0
- basilisk/shaders/bloom_upsample.frag +34 -0
- basilisk/shaders/crt.frag +31 -31
- basilisk/shaders/draw.frag +25 -22
- basilisk/shaders/draw.vert +25 -25
- basilisk/shaders/filter.frag +22 -22
- basilisk/shaders/frame.frag +12 -12
- basilisk/shaders/frame.vert +13 -13
- basilisk/shaders/geometry.frag +8 -8
- basilisk/shaders/geometry.vert +41 -41
- basilisk/shaders/normal.frag +59 -59
- basilisk/shaders/normal.vert +96 -96
- basilisk/shaders/particle.frag +71 -71
- basilisk/shaders/particle.vert +84 -84
- basilisk/shaders/sky.frag +23 -9
- basilisk/shaders/sky.vert +13 -13
- basilisk_engine-0.1.36.dist-info/METADATA +89 -0
- basilisk_engine-0.1.36.dist-info/RECORD +110 -0
- {basilisk_engine-0.1.34.dist-info → basilisk_engine-0.1.36.dist-info}/WHEEL +1 -1
- basilisk/input/__init__.py +0 -0
- basilisk/input/mouse.py +0 -62
- basilisk/input/path.py +0 -14
- basilisk_engine-0.1.34.dist-info/METADATA +0 -45
- basilisk_engine-0.1.34.dist-info/RECORD +0 -109
- {basilisk_engine-0.1.34.dist-info → basilisk_engine-0.1.36.dist-info}/top_level.txt +0 -0
basilisk/render/material.py
CHANGED
|
@@ -1,222 +1,233 @@
|
|
|
1
|
-
import glm
|
|
2
|
-
import numpy as np
|
|
3
|
-
from ..render.image import Image
|
|
4
|
-
from ..generic.input_validation import *
|
|
5
|
-
|
|
6
|
-
class Material():
|
|
7
|
-
material_handler: ...
|
|
8
|
-
"""Back reference to the parent material handler"""
|
|
9
|
-
name: str = None
|
|
10
|
-
"""Name of the material"""
|
|
11
|
-
index: 0
|
|
12
|
-
"""Index of the material in the material uniform"""
|
|
13
|
-
|
|
14
|
-
# Base Material Attributes
|
|
15
|
-
color: glm.vec3 = glm.vec3(255.0, 255.0, 255.0)
|
|
16
|
-
"""Color multiplier of the material"""
|
|
17
|
-
texture: Image = None
|
|
18
|
-
"""Key/name of the texture image in the image handler. If the image given does not exist, it must be loaded"""
|
|
19
|
-
normal: Image = None
|
|
20
|
-
"""Key/name of the normal image in the image handler. If the image given does not exist, it must be loaded"""
|
|
21
|
-
|
|
22
|
-
# PBR Material Attributes
|
|
23
|
-
roughness: float
|
|
24
|
-
"""The roughness of the material, controlls both the specular and diffuse response"""
|
|
25
|
-
subsurface: float
|
|
26
|
-
"""Amount of subsurface scattering the material exhibits. Value in range [0, 1]. Lerps between diffuse and subsurface lobes"""
|
|
27
|
-
sheen: float
|
|
28
|
-
"""Amount of sheen the material exhibits. Additive lobe"""
|
|
29
|
-
sheen_tint: float
|
|
30
|
-
"""Amount that the sheen is tinted to the base color. Set to white by default"""
|
|
31
|
-
anisotropic: float
|
|
32
|
-
"""The amount of anisotropic behaviour the materials specular lobe exhibits"""
|
|
33
|
-
specular: float
|
|
34
|
-
"""The strength of the specular lobe of the material"""
|
|
35
|
-
metallicness: float
|
|
36
|
-
"""The metallicness of the material, which dictates how much light the surfaces diffuses"""
|
|
37
|
-
specular_tint: float
|
|
38
|
-
"""Amount that the specular is tinted to the base color. Set to white by default"""
|
|
39
|
-
clearcoat: float
|
|
40
|
-
"""Amount of clearcoat the material exhibits. Additive lobe"""
|
|
41
|
-
clearcoat_gloss: float
|
|
42
|
-
"""The glossiness of the clearcoat layer. 0 For a satin appearance, 1 for a gloss appearance"""
|
|
43
|
-
|
|
44
|
-
def __init__(self, name: str=None, color: tuple=(255.0, 255.0, 255.0), texture: Image=None, normal: Image=None, roughness_map: Image=None, ao_map: Image=None,
|
|
45
|
-
roughness: float=0.7, subsurface: float=0.2, sheen: float=0.5, sheen_tint: float=0.5,
|
|
46
|
-
anisotropic: float=0.0, specular: float=1.0, metallicness: float=0.0, specular_tint: float=0.0,
|
|
47
|
-
clearcoat: float=0.5, clearcoat_gloss: float=0.25) -> None:
|
|
48
|
-
"""
|
|
49
|
-
Basilisk Material object. Contains the data and images references used by the material.
|
|
50
|
-
Args:
|
|
51
|
-
name: str
|
|
52
|
-
Identifier to be used by user
|
|
53
|
-
color: tuple
|
|
54
|
-
Base color of the material. Applies to textures as well
|
|
55
|
-
texture: Basilisk Image
|
|
56
|
-
The albedo map (color texture) of the material
|
|
57
|
-
normal: Basilisk Image
|
|
58
|
-
The normal map of the material.
|
|
59
|
-
"""
|
|
60
|
-
|
|
61
|
-
# Set handler only when used by a scene
|
|
62
|
-
self.material_handler = None
|
|
63
|
-
|
|
64
|
-
self.index = 0
|
|
65
|
-
|
|
66
|
-
self.name = name if name else ''
|
|
67
|
-
self.color = color
|
|
68
|
-
self.texture = texture
|
|
69
|
-
self.normal = normal
|
|
70
|
-
self.roughness_map = roughness_map
|
|
71
|
-
self.ao_map = ao_map
|
|
72
|
-
self.roughness = roughness
|
|
73
|
-
self.subsurface = subsurface
|
|
74
|
-
self.sheen = sheen
|
|
75
|
-
self.sheen_tint = sheen_tint
|
|
76
|
-
self.anisotropic = anisotropic
|
|
77
|
-
self.specular = specular
|
|
78
|
-
self.metallicness = metallicness
|
|
79
|
-
self.specular_tint = specular_tint
|
|
80
|
-
self.clearcoat = clearcoat
|
|
81
|
-
self.clearcoat_gloss = clearcoat_gloss
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
@property
|
|
120
|
-
def
|
|
121
|
-
@property
|
|
122
|
-
def
|
|
123
|
-
@property
|
|
124
|
-
def
|
|
125
|
-
@property
|
|
126
|
-
def
|
|
127
|
-
@property
|
|
128
|
-
def
|
|
129
|
-
@property
|
|
130
|
-
def
|
|
131
|
-
@property
|
|
132
|
-
def
|
|
133
|
-
@property
|
|
134
|
-
def
|
|
135
|
-
@property
|
|
136
|
-
def
|
|
137
|
-
@property
|
|
138
|
-
def
|
|
139
|
-
@property
|
|
140
|
-
def
|
|
141
|
-
@property
|
|
142
|
-
def
|
|
143
|
-
@property
|
|
144
|
-
def
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
@
|
|
148
|
-
def
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
self.material_handler.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
self.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
1
|
+
import glm
|
|
2
|
+
import numpy as np
|
|
3
|
+
from ..render.image import Image
|
|
4
|
+
from ..generic.input_validation import *
|
|
5
|
+
|
|
6
|
+
class Material():
|
|
7
|
+
material_handler: ...
|
|
8
|
+
"""Back reference to the parent material handler"""
|
|
9
|
+
name: str = None
|
|
10
|
+
"""Name of the material"""
|
|
11
|
+
index: 0
|
|
12
|
+
"""Index of the material in the material uniform"""
|
|
13
|
+
|
|
14
|
+
# Base Material Attributes
|
|
15
|
+
color: glm.vec3 = glm.vec3(255.0, 255.0, 255.0)
|
|
16
|
+
"""Color multiplier of the material"""
|
|
17
|
+
texture: Image = None
|
|
18
|
+
"""Key/name of the texture image in the image handler. If the image given does not exist, it must be loaded"""
|
|
19
|
+
normal: Image = None
|
|
20
|
+
"""Key/name of the normal image in the image handler. If the image given does not exist, it must be loaded"""
|
|
21
|
+
|
|
22
|
+
# PBR Material Attributes
|
|
23
|
+
roughness: float
|
|
24
|
+
"""The roughness of the material, controlls both the specular and diffuse response"""
|
|
25
|
+
subsurface: float
|
|
26
|
+
"""Amount of subsurface scattering the material exhibits. Value in range [0, 1]. Lerps between diffuse and subsurface lobes"""
|
|
27
|
+
sheen: float
|
|
28
|
+
"""Amount of sheen the material exhibits. Additive lobe"""
|
|
29
|
+
sheen_tint: float
|
|
30
|
+
"""Amount that the sheen is tinted to the base color. Set to white by default"""
|
|
31
|
+
anisotropic: float
|
|
32
|
+
"""The amount of anisotropic behaviour the materials specular lobe exhibits"""
|
|
33
|
+
specular: float
|
|
34
|
+
"""The strength of the specular lobe of the material"""
|
|
35
|
+
metallicness: float
|
|
36
|
+
"""The metallicness of the material, which dictates how much light the surfaces diffuses"""
|
|
37
|
+
specular_tint: float
|
|
38
|
+
"""Amount that the specular is tinted to the base color. Set to white by default"""
|
|
39
|
+
clearcoat: float
|
|
40
|
+
"""Amount of clearcoat the material exhibits. Additive lobe"""
|
|
41
|
+
clearcoat_gloss: float
|
|
42
|
+
"""The glossiness of the clearcoat layer. 0 For a satin appearance, 1 for a gloss appearance"""
|
|
43
|
+
|
|
44
|
+
def __init__(self, name: str=None, color: tuple=(255.0, 255.0, 255.0), texture: Image=None, normal: Image=None, roughness_map: Image=None, ao_map: Image=None,
|
|
45
|
+
roughness: float=0.7, subsurface: float=0.2, sheen: float=0.5, sheen_tint: float=0.5,
|
|
46
|
+
anisotropic: float=0.0, specular: float=1.0, metallicness: float=0.0, specular_tint: float=0.0,
|
|
47
|
+
clearcoat: float=0.5, clearcoat_gloss: float=0.25, emissive_color: tuple=(0.0, 0.0, 0.0)) -> None:
|
|
48
|
+
"""
|
|
49
|
+
Basilisk Material object. Contains the data and images references used by the material.
|
|
50
|
+
Args:
|
|
51
|
+
name: str
|
|
52
|
+
Identifier to be used by user
|
|
53
|
+
color: tuple
|
|
54
|
+
Base color of the material. Applies to textures as well
|
|
55
|
+
texture: Basilisk Image
|
|
56
|
+
The albedo map (color texture) of the material
|
|
57
|
+
normal: Basilisk Image
|
|
58
|
+
The normal map of the material.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
# Set handler only when used by a scene
|
|
62
|
+
self.material_handler = None
|
|
63
|
+
|
|
64
|
+
self.index = 0
|
|
65
|
+
|
|
66
|
+
self.name = name if name else ''
|
|
67
|
+
self.color = color
|
|
68
|
+
self.texture = texture
|
|
69
|
+
self.normal = normal
|
|
70
|
+
self.roughness_map = roughness_map
|
|
71
|
+
self.ao_map = ao_map
|
|
72
|
+
self.roughness = roughness
|
|
73
|
+
self.subsurface = subsurface
|
|
74
|
+
self.sheen = sheen
|
|
75
|
+
self.sheen_tint = sheen_tint
|
|
76
|
+
self.anisotropic = anisotropic
|
|
77
|
+
self.specular = specular
|
|
78
|
+
self.metallicness = metallicness
|
|
79
|
+
self.specular_tint = specular_tint
|
|
80
|
+
self.clearcoat = clearcoat
|
|
81
|
+
self.clearcoat_gloss = clearcoat_gloss
|
|
82
|
+
self.emissive_color = emissive_color
|
|
83
|
+
|
|
84
|
+
def get_data(self) -> list:
|
|
85
|
+
"""
|
|
86
|
+
Returns a list containing all the gpu data in the material.
|
|
87
|
+
Used by the material handler
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
# Add color and PBR data
|
|
91
|
+
data = [self.color.x / 255.0, self.color.y / 255.0, self.color.z / 255.0, self.roughness, self.subsurface, self.sheen,
|
|
92
|
+
self.sheen_tint, self.anisotropic, self.specular, self.metallicness, self.specular_tint, self.clearcoat, self.clearcoat_gloss]
|
|
93
|
+
|
|
94
|
+
# Add texture data
|
|
95
|
+
if self.texture: data.extend([1, self.texture.index.x, self.texture.index.y])
|
|
96
|
+
else: data.extend([0, 0, 0])
|
|
97
|
+
|
|
98
|
+
# Add normal data
|
|
99
|
+
if self.normal: data.extend([1, self.normal.index.x, self.normal.index.y])
|
|
100
|
+
else: data.extend([0, 0, 0])
|
|
101
|
+
|
|
102
|
+
# Add roughness data
|
|
103
|
+
if self.roughness_map: data.extend([1, self.roughness_map.index.x, self.roughness_map.index.y])
|
|
104
|
+
else: data.extend([0, 0, 0])
|
|
105
|
+
|
|
106
|
+
# Add ao data
|
|
107
|
+
if self.ao_map: data.extend([1, self.ao_map.index.x, self.ao_map.index.y])
|
|
108
|
+
else: data.extend([0, 0, 0])
|
|
109
|
+
|
|
110
|
+
# Add emissive data
|
|
111
|
+
data.extend([self.emissive_color.x / 255.0, self.emissive_color.y / 255.0, self.emissive_color.z / 255.0])
|
|
112
|
+
|
|
113
|
+
return data
|
|
114
|
+
|
|
115
|
+
def __repr__(self) -> str:
|
|
116
|
+
return f'<Basilisk Material | {self.name}, ({self.color.x}, {self.color.y}, {self.color.z}), {self.texture}>'
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def color(self): return self._color
|
|
121
|
+
@property
|
|
122
|
+
def texture(self): return self._texture
|
|
123
|
+
@property
|
|
124
|
+
def normal(self): return self._normal
|
|
125
|
+
@property
|
|
126
|
+
def roughness_map(self): return self._roughness_map
|
|
127
|
+
@property
|
|
128
|
+
def ao_map(self): return self._ao_map
|
|
129
|
+
@property
|
|
130
|
+
def roughness(self): return self._roughness
|
|
131
|
+
@property
|
|
132
|
+
def subsurface(self): return self._subsurface
|
|
133
|
+
@property
|
|
134
|
+
def sheen(self): return self._sheen
|
|
135
|
+
@property
|
|
136
|
+
def sheen_tint(self): return self._sheen_tint
|
|
137
|
+
@property
|
|
138
|
+
def anisotropic(self): return self._anisotropic
|
|
139
|
+
@property
|
|
140
|
+
def specular(self): return self._specular
|
|
141
|
+
@property
|
|
142
|
+
def metallicness(self): return self._metallicness
|
|
143
|
+
@property
|
|
144
|
+
def specular_tint(self): return self._specular_tint
|
|
145
|
+
@property
|
|
146
|
+
def clearcoat(self): return self._clearcoat
|
|
147
|
+
@property
|
|
148
|
+
def clearcoat_gloss(self): return self._clearcoat_gloss
|
|
149
|
+
@property
|
|
150
|
+
def emissive_color(self): return self._emissive_color
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
@color.setter
|
|
154
|
+
def color(self, value: tuple | list | glm.vec3 | np.ndarray):
|
|
155
|
+
self._color = validate_glm_vec3("Material", "color", value)
|
|
156
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
157
|
+
|
|
158
|
+
@texture.setter
|
|
159
|
+
def texture(self, value: Image | None):
|
|
160
|
+
self._texture = validate_image("Material", "texture", value)
|
|
161
|
+
if not self.material_handler: return
|
|
162
|
+
self.material_handler.image_handler.add(value)
|
|
163
|
+
self.material_handler.write(regenerate=True)
|
|
164
|
+
|
|
165
|
+
@normal.setter
|
|
166
|
+
def normal(self, value: Image | None):
|
|
167
|
+
self._normal = validate_image("Material", "normal map", value)
|
|
168
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
169
|
+
|
|
170
|
+
@roughness_map.setter
|
|
171
|
+
def roughness_map(self, value: Image | None):
|
|
172
|
+
self._roughness_map = validate_image("Material", "roughness_map", value)
|
|
173
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
174
|
+
|
|
175
|
+
@ao_map.setter
|
|
176
|
+
def ao_map(self, value: Image | None):
|
|
177
|
+
self._ao_map = validate_image("Material", "ao_map map", value)
|
|
178
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
179
|
+
|
|
180
|
+
@roughness.setter
|
|
181
|
+
def roughness(self, value: float | int | glm.float32):
|
|
182
|
+
self._roughness = validate_float("Material", "roughness", value)
|
|
183
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
184
|
+
|
|
185
|
+
@subsurface.setter
|
|
186
|
+
def subsurface(self, value: float | int | glm.float32):
|
|
187
|
+
self._subsurface = validate_float("Material", "subsurface", value)
|
|
188
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
189
|
+
|
|
190
|
+
@sheen.setter
|
|
191
|
+
def sheen(self, value: float | int | glm.float32):
|
|
192
|
+
self._sheen = validate_float("Material", "sheen", value)
|
|
193
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
194
|
+
|
|
195
|
+
@sheen_tint.setter
|
|
196
|
+
def sheen_tint(self, value: float | int | glm.float32):
|
|
197
|
+
self._sheen_tint = validate_float("Material", "sheen tint", value)
|
|
198
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
199
|
+
|
|
200
|
+
@anisotropic.setter
|
|
201
|
+
def anisotropic(self, value: float | int | glm.float32):
|
|
202
|
+
self._anisotropic = validate_float("Material", "anisotropic", value)
|
|
203
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
204
|
+
|
|
205
|
+
@specular.setter
|
|
206
|
+
def specular(self, value: float | int | glm.float32):
|
|
207
|
+
self._specular = validate_float("Material", "specular", value)
|
|
208
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
209
|
+
|
|
210
|
+
@metallicness.setter
|
|
211
|
+
def metallicness(self, value: float | int | glm.float32):
|
|
212
|
+
self._metallicness = validate_float("Material", "metallicness", value)
|
|
213
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
214
|
+
|
|
215
|
+
@specular_tint.setter
|
|
216
|
+
def specular_tint(self, value: float | int | glm.float32):
|
|
217
|
+
self._specular_tint = validate_float("Material", "specular tint", value)
|
|
218
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
219
|
+
|
|
220
|
+
@clearcoat.setter
|
|
221
|
+
def clearcoat(self, value: float | int | glm.float32):
|
|
222
|
+
self._clearcoat = validate_float("Material", "clearcoat", value)
|
|
223
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
224
|
+
|
|
225
|
+
@clearcoat_gloss.setter
|
|
226
|
+
def clearcoat_gloss(self, value: float | int | glm.float32):
|
|
227
|
+
self._clearcoat_gloss = validate_float("Material", "clearcoat gloss", value)
|
|
228
|
+
if self.material_handler: self.material_handler.write(regenerate=True)
|
|
229
|
+
|
|
230
|
+
@emissive_color.setter
|
|
231
|
+
def emissive_color(self, value: tuple | list | glm.vec3 | np.ndarray):
|
|
232
|
+
self._emissive_color = validate_glm_vec3("Material", "emissive color", value)
|
|
222
233
|
if self.material_handler: self.material_handler.write(regenerate=True)
|