|
41 | 41 |
|
42 | 42 |
|
43 | 43 | class Material: |
| 44 | + texture_cls = Texture |
| 45 | + |
44 | 46 | def __init__(self, name, is_default=False, has_faces=False): |
45 | 47 | """ |
46 | 48 | Create a new material |
@@ -131,22 +133,22 @@ def set_emissive(self, values=None): |
131 | 133 | self.emissive = self.pad_light(values or []) |
132 | 134 |
|
133 | 135 | def set_texture(self, name, search_path): |
134 | | - self.texture = Texture(name, search_path) |
| 136 | + self.texture = self.texture_cls(name, search_path) |
135 | 137 |
|
136 | 138 | def set_texture_ambient(self, name, search_path): |
137 | | - self.texture_ambient = Texture(name, search_path) |
| 139 | + self.texture_ambient = self.texture_cls(name, search_path) |
138 | 140 |
|
139 | 141 | def set_texture_specular_color(self, name, search_path): |
140 | | - self.texture_specular_color = Texture(name, search_path) |
| 142 | + self.texture_specular_color = self.texture_cls(name, search_path) |
141 | 143 |
|
142 | 144 | def set_texture_specular_highlight(self, name, search_path): |
143 | | - self.texture_specular_highlight = Texture(name, search_path) |
| 145 | + self.texture_specular_highlight = self.texture_cls(name, search_path) |
144 | 146 |
|
145 | 147 | def set_texture_alpha(self, name, search_path): |
146 | | - self.texture_alpha = Texture(name, search_path) |
| 148 | + self.texture_alpha = self.texture_cls(name, search_path) |
147 | 149 |
|
148 | 150 | def set_texture_bump(self, name, search_path): |
149 | | - self.texture_bump = Texture(name, search_path) |
| 151 | + self.texture_bump = self.texture_cls(name, search_path) |
150 | 152 |
|
151 | 153 | def unset_texture(self): |
152 | 154 | self.texture = None |
|
0 commit comments