Hi @sean, first of all, welcome in the plugincafe community.
So the main issue is light[c4d.LIGHT_LENSEFFECTS_GLOW] returns you a copy of the GlowStruct and GlowStruct.streak also return you a copy of the list (unfortunately this can't be changed it's on our implementation for some safeties reason).
So here is how to do it.
def UpdateStreak(light, streakId, color):
# Retrieves the copy of the glow struct
glowStruct = light[c4d.LIGHT_LENSEFFECTS_GLOW]
# Retrieves the copy of the list
streakList = glowStruct.streak
if streakId >= len(streakList):
raise ValueError("Streak Id is bigger than the number of streak.")
# Defines the color
streakList[streakId]['col'] = c4d.Vector(1, 0, 0)
# Defines the modified list of streak
glowStruct.streak = streakList
# Defines the modified GlowStruct
light[c4d.LIGHT_LENSEFFECTS_GLOW] = glowStruct
print "Assignment before: 'col' = ", op[c4d.LIGHT_LENSEFFECTS_GLOW].streak['col']
UpdateStreak(op, 0, c4d.Vector(1, 0, 0))
print "Assignment After: 'col' = ", op[c4d.LIGHT_LENSEFFECTS_GLOW].streak['col']
# Execute main()
Documentation will be improved.
Finally, few rules, don't worry I've setup correctly your topic since its the first one, but please try to follow them for your next topics.
- Q&A New Functionality.
- How to Post Questions.
If you have any question, please let me know.