|
@@ -8,6 +8,8 @@ class Texture(base_classes.BaseNode):
|
|
|
logger.debug("Texture().__init__(%s)", node)
|
|
|
base_classes.BaseNode.__init__(self, node, parent, constants.TEXTURE)
|
|
|
|
|
|
+ num = constants.NUMERIC
|
|
|
+
|
|
|
img_inst = self.scene.image(api.texture.file_name(self.node))
|
|
|
|
|
|
if not img_inst:
|
|
@@ -15,18 +17,19 @@ class Texture(base_classes.BaseNode):
|
|
|
img_inst = image.Image(image_node.name, self.scene)
|
|
|
self.scene[constants.IMAGES].append(img_inst)
|
|
|
|
|
|
+
|
|
|
self[constants.IMAGE] = img_inst[constants.UUID]
|
|
|
|
|
|
- self[constants.WRAP] = api.texture.wrap(self.node)
|
|
|
+ wrap = api.texture.wrap(self.node)
|
|
|
+ self[constants.WRAP] = (num[wrap[0]], num[wrap[1]])
|
|
|
|
|
|
- if constants.WRAPPING.REPEAT in self[constants.WRAP]:
|
|
|
+ if constants.WRAPPING.REPEAT in wrap:
|
|
|
self[constants.REPEAT] = api.texture.repeat(self.node)
|
|
|
|
|
|
self[constants.ANISOTROPY] = api.texture.anisotropy(self.node)
|
|
|
- self[constants.MAG_FILTER] = api.texture.mag_filter(self.node)
|
|
|
- self[constants.MIN_FILTER] = api.texture.min_filter(self.node)
|
|
|
- self[constants.MAPPING] = api.texture.mapping(self.node)
|
|
|
-
|
|
|
+ self[constants.MAG_FILTER] = num[api.texture.mag_filter(self.node)]
|
|
|
+ self[constants.MIN_FILTER] = num[api.texture.min_filter(self.node)]
|
|
|
+ self[constants.MAPPING] = num[api.texture.mapping(self.node)]
|
|
|
|
|
|
@property
|
|
|
def image(self):
|