I am trying to use the recordPixelInfo(event) within a def pointerLocation(self, event) function. This seg faults so I trying to replicate the function to see where it is going wrong as:
def recordPixelInfoTEST(self, event):
print "--------- recordPixelInfoTEST"
state = data()
print dir(data())
setActiveState()
pi = imagesAtPixel(event.pointer(), "", True)
if pi and state.pixelInfo:
if not pi.size() == state.pixelInfo.size():
redraw()
else:
#for_index (i; pi)
print "--------- pi = %s" % pi
if not pi[i].name == state.pixelInfo[i].name:
redraw()
#break
elif pi or state.pixelInfo:
redraw()
.............
"state = data()" seems to make a blank state with no properties such that state.pixelInfo is undefined and it errors. I have been through the mu code and cannot figure this out.
Help greatly appreciated.