X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fscene.py;h=8f4f285b195d3af543b1a2b64c9ef592a626b6d3;hb=9b371e56adc1d6be89f2d30881c3759a0d5f8eca;hp=50ccb7c2d694fd91632ea6e36eeacdb93a1fd80f;hpb=0c59e9ddb9e4030b72bf271f4a88985932b02ef5;p=libs%2Fgl.git diff --git a/blender/io_mspgl/scene.py b/blender/io_mspgl/scene.py index 50ccb7c2..8f4f285b 100644 --- a/blender/io_mspgl/scene.py +++ b/blender/io_mspgl/scene.py @@ -18,17 +18,20 @@ class Instance: class Scene: def __init__(self, scene, obj_filter=None): self.name = scene.name - self.scene_type = scene.scene_type self.export_disposition = scene.export_disposition self.background_set = None self.camera = scene.camera self.prototypes = [] self.instances = [] + self.blended_instances = [] self.lights = [] self.ambient_light = mathutils.Color((0.0, 0.0, 0.0)) self.exposure = scene.view_settings.exposure self.use_hdr = scene.use_hdr + self.use_ao = scene.eevee.use_gtao + self.ao_distance = scene.eevee.gtao_distance + self.ao_samples = scene.ao_samples if scene.world: out_node = next((n for n in scene.world.node_tree.nodes if n.type=='OUTPUT_WORLD'), None) if out_node: @@ -53,8 +56,11 @@ class Scene: if o.type=='MESH': clones = [c for c in objects if is_same_object(o, c)] self.prototypes.append(o) + instance_list = self.instances + if o.material_slots and o.material_slots[0].material and o.material_slots[0].material.blend_method=='BLEND': + instance_list = self.blended_instances for c in clones: - self.instances.append(Instance(c, o)) + instance_list.append(Instance(c, o)) processed.add(c.name) elif o.type=='LIGHT': self.lights.append(o)