Works on Coot (Will be installed in Extension menu)
Works on Coot (Will be installed in Extension menu)
## # This script works on Coot. # Save screen image with white background and black mesh for Gakusei Jikken. # # by yam_cpp, 2011-09-30 # def save_png_gakusei(arg): def get_displayed_maps(): displayed_maps = [] for i in range(graphics_n_molecules()): if map_is_displayed(i): print i, "is displayed map." displayed_maps.append(i) return displayed_maps # get_displayed_maps() # Assuming only one map is displayed displayed_map = get_displayed_maps()[0] # save map colour to restore later save_previous_map_colour(displayed_map) # change map & background colour and save image set_map_colour(displayed_map, 0, 0, 0) set_background_colour(255,255,255) screendump_image(time.strftime("~/Desktop/coot-%Y%m%d_%H%M%S.png")) # restore set_background_colour(0,0,0) restore_previous_map_colour(displayed_map) add_simple_coot_menu_menuitem(coot_menubar_menu("Extensions"), "Save Image", save_png_gakusei)