Skip to content

Commit

Permalink
fix export of lights in particle systems
Browse files Browse the repository at this point in the history
  • Loading branch information
Theverat committed Sep 26, 2018
1 parent 59a6552 commit f3351a7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions export/duplis.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,16 @@ def convert(exporter, duplicator, scene, context, luxcore_scene, engine=None):
name = name_prefix + utils.get_luxcore_name(dupli.object, context)
matrix_list = utils.matrix_to_list(dupli.matrix, scene, apply_worldscale=True)

if dupli.object.type == "LAMP" and not dupli.object.data.type == "AREA":
if dupli.object.type == "LAMP":
# It is a light
name_suffix = _get_name_suffix(name_prefix, dupli, context)
light_props, exported_light = blender_object.convert(exporter, dupli.object, scene, context, luxcore_scene,
update_mesh=True, dupli_suffix=name_suffix)
for luxcore_name in exported_light.luxcore_names:
key = "scene.lights." + luxcore_name + ".transformation"
light_props.Set(pyluxcore.Property(key, matrix_list))

light_props, exported_light = blender_object.convert(exporter, dupli.object, scene, context,
luxcore_scene, update_mesh=True,
dupli_suffix=name_suffix,
dupli_matrix=dupli.matrix)
dupli_props.Set(light_props)
else:
# It is an object or area light
# It is an object
try:
# Already exported, just update the Duplis info
exported_duplis[name].add(matrix_list)
Expand Down

0 comments on commit f3351a7

Please sign in to comment.