I mean no disrespect, but this comment is pretty useless.
Besides the fact that averaging all the items in a list is something i already know how to do (your code does seems a bit odd though), I said that I don’t know much about blender, not about coding and machine logic in general.
This is what i understand from your code:
#define [I]Samples</i> (idk what exactly goes inside it though) Samples = [list of samples] #if the current object doesn't have the property <i>"colorSampleList"</i> If "colorSampleList" not in own: #Then define a property of <i>own</i> called <i>"colorSampleList"</i> as equal to <i>Samples</i>? idk what <i>[Samples]</i> means though own['colorSampleList'] = [Samples] #if the current object does have the property <i>"colorSampleList"</i> else: #Then iterate through all elements in <i>"colorSampleList"</i> for i in range(len(own['colorSampleList'])): #and set each one of them to the average between itself and the element of <i>Samples</i> with the same index own['colorSampleList'] <i> = (own['colorSampleList'][i] + Samples[i]) / 2 # why do you average like that? shouldn't it average all the samples in [I]own['colorSampleList']</i> into a single variable? maybe I'm just not getting something
For instance: i have no idea where that code should be (i assume it should be in a text datablock referenced by a python logic brick though).
I also don’t know how to translate and store the result that my filter spits out into something that your code could refer to as “own[‘colorSampleList’]”.
And, as a mainly non-Python programmer, i don’t really get this line: own[‘ColorSampleList’] = [samples], i get that you are setting the property ColorSampleList of the current object, but i don’t understand what you mean by [Samples].
If you could clarify that for me i would gladly implement it.
Thanks for your time!