Skip to content

Commit

Permalink
fix: fix colored static CSV import
Browse files Browse the repository at this point in the history
  • Loading branch information
vasarhelyi committed Jul 10, 2023
1 parent 89c0061 commit 3d74ece
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,13 @@ def execute_on_formation(self, formation, context):
)
light_effect = light_effects.active_entry
light_effect.output = "INDEXED_BY_FORMATION"
colors = [item.color.as_vector() for item in imported_data.values()]
image = light_effect.create_color_image(
name="Image for light effect '{}'".format(formation.name),
width=1,
height=len(colors),
)
image.pixels.foreach_set(
list(
chain(
*[
list(item.color.as_vector())
for item in imported_data.values()
]
)
)
)
image.pixels.foreach_set(list(chain(*colors)))

return {"FINISHED"}

Expand Down

0 comments on commit 3d74ece

Please sign in to comment.