[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] [gimp.pingus] push by address@hidden - Name layers "Frame #
From: |
pingus |
Subject: |
[Pingus-CVS] [gimp.pingus] push by address@hidden - Name layers "Frame #%02d" on 2011-09-13 15:09 GMT |
Date: |
Tue, 13 Sep 2011 15:14:39 +0000 |
Revision: 3cc303332c24
Author: Ingo Ruhnke <address@hidden>
Date: Tue Sep 13 08:09:27 2011
Log: Name layers "Frame #%02d"
http://code.google.com/p/pingus/source/detail?r=3cc303332c24&repo=gimp
Modified:
/pingus_unflatten_animation.scm
=======================================
--- /pingus_unflatten_animation.scm Mon Sep 12 11:27:52 2011
+++ /pingus_unflatten_animation.scm Tue Sep 13 08:09:27 2011
@@ -14,6 +14,10 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http:;;www.gnu.org/licenses/>.
+(define (number->string-04d num)
+ (cond ((< num 10) (string-append "0" (number->string num)))
+ (t (number->string num))))
+
(define (script-fu-pingus-unflatten-animation image drawable num-frames
multi-directional)
(let* ((width (car (gimp-image-width image)))
(height (car (gimp-image-height image)))
@@ -45,6 +49,10 @@
(gimp-layer-translate layer
(- (* frame frame-width))
0)
+
+ ;; set layer name
+ (gimp-drawable-set-name layer (string-append "Frame #"
(number->string-04d frame)))
+
(set! frame (+ frame 1))))))
(gimp-image-resize image frame-width frame-height 0 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] [gimp.pingus] push by address@hidden - Name layers "Frame #%02d" on 2011-09-13 15:09 GMT,
pingus <=