Paste Storyboards from ClipBoard | More convenient way to search a shot .blend file.

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2022-10-23 18:47:07 +00:00
parent 29e0dc2501
commit 6d1898a4c9

View file

@ -2516,6 +2516,36 @@ def layer(win):
fill=False)
layer.stroke()
else:
# If there is no image to show we can put one. Using a clipboard.
def do():
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
im = clipboard.wait_for_image()
if not im:
return
Px = im.get_width()
Py = im.get_height()
Pc = cairo.ImageSurface(cairo.FORMAT_ARGB32, Px, Py)
Pb = cairo.Context(Pc)
Gdk.cairo_set_source_pixbuf( Pb, im, 0, 0)
Pb.paint()
imageurl = win.project+"/rnd"+win.cur+"/"+win.current[shotis+"_active_folder"]+"/0001.png"
Pc.write_to_png(imageurl)
UI_elements.roundrect(layer, win,
x+5+(width/2)-20,
y+win.scroll["script_shots"]+current_Y_shots-7+80,
40,
40,
10,
button=do,
icon="image_new")
current_Y_shots = current_Y_shots + 210
@ -2993,7 +3023,7 @@ def layer(win):
studio_dialogs.file_select(win, shotis+"_blends", after, force=True,
IMAGE=False, BLEND=True, VIDEO=False, FILE=False, CHR=False, VEH=False,
LOC=False, OBJ=False, RND=True, FOLDER=False, SEARCH=scene)
LOC=False, OBJ=False, RND=True, FOLDER=False, SEARCH=scene+" ")
UI_elements.roundrect(layer, win,
x+tileX,