Tue Feb 16, 2021 2:34 am
Tue Feb 16, 2021 3:17 am
Tue Feb 16, 2021 6:27 am
Tue Feb 16, 2021 8:52 am
Issabella wrote:Fransua, I hope this explanation can help you.
Tue Feb 16, 2021 10:09 am
for displayID in range(1,image.ID+50):
display=gimp._id2display(displayID)
if isinstance(display,gimp.Display):
#print 'Image: %d; display %d' % (image.ID,displayID)
break
if not display:
raise Exception('Display not found')
gimp.delete(display)
Tue Feb 16, 2021 10:26 am
ofnuts wrote:I used this in one of my scripts:
- Code:
for displayID in range(1,image.ID+50):
display=gimp._id2display(displayID)
if isinstance(display,gimp.Display):
#print 'Image: %d; display %d' % (image.ID,displayID)
break
if not display:
raise Exception('Display not found')
gimp.delete(display)
However, there is no way to make sure that the display you found really belongs to the image (even if starting at image.ID instead of 0 covers your *ss as long as there is only one display for each image opened before the one you are working with).