GIMP Script-fu

Check-in [260a9faba6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Float layer added to useful functions.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:260a9faba64afe3da90bcc53d0ac49b1ce45e590
User & Date: saul 2015-05-22 21:34:55
Context
2015-07-09
12:03
Added a new mode to get-layers which includes fundaments for nested groups. Leaf check-in: db8f2ac5bf user: saul tags: trunk
2015-05-22
21:34
Float layer added to useful functions. check-in: 260a9faba6 user: saul tags: trunk
2015-04-05
05:05
merged from branch. check-in: 9e56fa2e77 user: saul tags: trunk
2014-12-07
00:21
Error in menu registration. Leaf check-in: 2dad2a57f4 user: saul tags: sg-float-layer
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added sg-float-layer.scm.



















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.


(define (script-fu-sg-float-layer image layer)
  (gimp-image-undo-group-start image)
  (gimp-selection-none image)
  (when (zero? (car (gimp-drawable-has-alpha layer)))
    (gimp-layer-add-alpha layer) )
  (let ((buffer (car (gimp-edit-named-copy layer "dynamic layer"))))
    (gimp-edit-clear layer)
    (gimp-edit-named-paste layer buffer FALSE)
    (gimp-buffer-delete buffer) )
  (gimp-image-undo-group-end image) )
  
  
(script-fu-register "script-fu-sg-float-layer"
 _"Float Layer"
 _"Float entire layer ignoring selection"
 "Saul Goode"
 "Saul Goode"
 "December 2014"
 "*"
 SF-IMAGE    "Image"    0
 SF-DRAWABLE "Drawable" 0
 )
 
(script-fu-menu-register "script-fu-sg-float-layer"
 "<Image>/Layer"
 )

(script-fu-menu-register "script-fu-sg-float-layer"
 "<Layers>"
 )