一夜的睡眠後,我想出了一個解決辦法:
我重新在環路中的每個卡,所有的層和文本層保持完好基本映像文件。這阻止了我需要撤消。
順便說一句,這是我創建4 * 13張撲克牌(從那些自己base_card.xcf)腳本:
basefile = "/home/[...]/base_card.xcf"
basesave = "/home/[...]/"
color_blue = [ (32.0 /255.0, 74.0/255.0,135.0/255.0,1.0),
(52.0 /255.0,101.0/255.0,164.0/255.0,1.0)]
color_red = [ (164.0/255.0, 0.0/255.0, 0.0/255.0,1.0),
(204.0/255.0, 0.0/255.0, 0.0/255.0,1.0)]
color_yellow = [ (196.0/255.0,160.0/255.0, 0.0/255.0,1.0),
(237.0/255.0,212.0/255.0, 0.0/255.0,1.0)]
color_green = [ (78.0/255.0,154.0/255.0, 6.0/255.0,1.0),
(115.0/255.0,210.0/255.0, 22.0/255.0,1.0)]
def createCard(color_list, color_name, number):
pdb.gimp_context_set_foreground(color_list[1])
image = pdb.gimp_file_load(basefile, basefile)
textlayers = image.layers[0:3]
for layer in textlayers:
pdb.gimp_text_layer_set_text(layer, number)
pdb.gimp_text_layer_set_color(layer, color_list[0])
layer = image.layers[3]
pdb.gimp_edit_bucket_fill(layer, 0, 0, 100, 0, 0, 30, 30)
layer = pdb.gimp_image_merge_visible_layers(image, 0)
savename = "%s%s_%s.png" % (basesave, color_name, number)
pdb.file_png_save(image, layer, savename, savename, 0, 0, 0, 0, 0, 0, 0)
image = None
for c in range(1,14):
createCard(color_blue, "BLUE", c)
for c in range(1,14):
createCard(color_yellow, "YELLOW", c)
for c in range(1,14):
createCard(color_red, "RED", c)
for c in range(1,14):
createCard(color_green, "GREEN", c)
我建議重命名和編輯這個問題,或者你的答案應該是downvoted - 它與撤消無關 – jmetz 2015-07-29 09:12:19