Skip to content

Commit

Permalink
Loader.js loadTexture method looks for 'repeat' or 'mirror' strings b…
Browse files Browse the repository at this point in the history
…ut Blender JSON exporter write them as 'RepeatWrapping' and 'MirrorerRepeatWrapping'.

Loader code:
     if ( wrap[ 0 ] === 'repeat' ) texture.wrapS = RepeatWrapping;
     if ( wrap[ 0 ] === 'mirror' ) texture.wrapS = MirroredRepeatWrapping;

     if ( wrap[ 1 ] === 'repeat' ) texture.wrapT = RepeatWrapping;
     if ( wrap[ 1 ] === 'mirror' ) texture.wrapT = MirroredRepeatWrapping;

Current blender json export output:
     "mapDiffuse":"window.png",
     "mapDiffuseWrap":["RepeatWrapping","RepeatWrapping"], //loaded texture use ClampToEdgeWrapping

After fix:
     "mapDiffuse":"window.png",
     "mapDiffuseWrap":["repeat","repeat"], //loaded texture use RepeatWrapping
  • Loading branch information
Erman Geliboluoğlu committed Jan 17, 2017
1 parent fce1ecf commit c878e57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/exporters/blender/addons/io_three/constants.py
Expand Up @@ -257,9 +257,9 @@
WRAP = 'wrap'
REPEAT = 'repeat'
WRAPPING = type('Wrapping', (), {
'REPEAT': 'RepeatWrapping',
'CLAMP': 'ClampToEdgeWrapping',
'MIRROR': 'MirroredRepeatWrapping'
'REPEAT': 'repeat',
'CLAMP': 'clamp',
'MIRROR': 'mirror'
})
ANISOTROPY = 'anisotropy'
MAG_FILTER = 'magFilter'
Expand Down

0 comments on commit c878e57

Please sign in to comment.