vedo icon indicating copy to clipboard operation
vedo copied to clipboard

2D images become non-pickable after changing cmap

Open sudmat opened this issue 1 year ago • 2 comments

Hi, I found a strange thing when running the spline_draw example.

Below is the officially provided code (vedo\examples\advanced\spline_draw.py) which works fine. image

But when I changed the pic cmap to binary_r, I could no longer select the points on the image because the event.actor became None. image

I am not sure if this is a feature or bug, but it seems not making sense if the pickability depends on the cmap. Any information would be appreciated!

sudmat avatar Sep 03 '24 22:09 sudmat

This is quite strange ! I don't understand why that happens.. one possible way around is to create a quad mesh from the image, and that works:

pic.cmap("binary_r")
pic = pic.tomesh()

marcomusy avatar Sep 10 '24 10:09 marcomusy

This is quite strange ! I don't understand why that happens.. one possible way around is to create a quad mesh from the image, and that works:

pic.cmap("binary_r")
pic = pic.tomesh()

Thank you and I'll try!

sudmat avatar Sep 19 '24 19:09 sudmat