New addon: Import_max #19
@ -2,10 +2,10 @@
|
||||
# Copyright 2005 Bob Holcomb
|
||||
|
||||
import os
|
||||
import time
|
||||
import struct
|
||||
import bpy
|
||||
import time
|
||||
import math
|
||||
import struct
|
||||
import mathutils
|
||||
from bpy_extras.image_utils import load_image
|
||||
from bpy_extras.node_shader_utils import PrincipledBSDFWrapper
|
||||
@ -293,16 +293,12 @@ def add_texture_to_material(image, contextWrapper, pct, extend, alpha, scale, of
|
||||
img_wrap.rotation[2] = angle
|
||||
|
||||
if extend == 'mirror':
|
||||
# 3DS mirror flag can be emulated by these settings (at least so it seems)
|
||||
# TODO: bring back mirror
|
||||
pass
|
||||
# texture.repeat_x = texture.repeat_y = 2
|
||||
# texture.use_mirror_x = texture.use_mirror_y = True
|
||||
img_wrap.extension = 'MIRROR'
|
||||
elif extend == 'decal':
|
||||
# 3DS' decal mode maps best to Blenders EXTEND
|
||||
img_wrap.extension = 'EXTEND'
|
||||
elif extend == 'noWrap':
|
||||
img_wrap.extension = 'CLIP'
|
||||
|
||||
if alpha == 'alpha':
|
||||
for link in links:
|
||||
if link.from_node.type == 'TEX_IMAGE' and link.to_node.type == 'MIX_RGB':
|
||||
@ -386,6 +382,7 @@ def process_next_chunk(context, file, previous_chunk, imported_objects, CONSTRAI
|
||||
for v1, v2, v3 in myContextMesh_facels:
|
||||
eekadoodle_faces.extend((v3, v1, v2) if v3 == 0 else (v1, v2, v3))
|
||||
bmesh.polygons.foreach_set("loop_start", range(0, nbr_faces * 3, 3))
|
||||
bmesh.polygons.foreach_set("loop_total", (3,) * nbr_faces)
|
||||
bmesh.loops.foreach_set("vertex_index", eekadoodle_faces)
|
||||
|
||||
if bmesh.polygons and contextMeshUV:
|
||||
@ -1447,4 +1444,4 @@ def load(operator,
|
||||
CONVERSE=global_matrix,
|
||||
)
|
||||
|
||||
return {'FINISHED'}
|
||||
return {'FINISHED'}
|
Reference in New Issue
Block a user