提交 736729fc 编写于 作者: M Matt Hirsch

export textures from blender with correct clip/repeat mode

上级 754b780f
...@@ -155,12 +155,20 @@ def wrap(texture): ...@@ -155,12 +155,20 @@ def wrap(texture):
""" """
logger.debug("texture.wrap(%s)", texture) logger.debug("texture.wrap(%s)", texture)
wrapping = {
True: constants.WRAPPING.MIRROR, if(texture.extension == "REPEAT"):
False: constants.WRAPPING.REPEAT wrapping = {
} True: constants.WRAPPING.MIRROR,
return (wrapping[texture.use_mirror_x], False: constants.WRAPPING.REPEAT
wrapping[texture.use_mirror_y]) }
return (wrapping[texture.use_mirror_x],
wrapping[texture.use_mirror_y])
# provide closest available three.js behavior.
# other possible values: "CLIP", "EXTEND", "CLIP_CUBE", "CHECKER",
# best match CLAMP behavior
else:
return (constants.WRAPPING.CLAMP, constants.WRAPPING.CLAMP);
def textures(): def textures():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册