|
10 | 10 | ;
|
11 | 11 | ; This program is distributed in the hope that it will be useful,
|
12 | 12 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
| -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | 14 | ; GNU General Public License for more details.
|
15 | 15 | ;
|
16 | 16 | ; To view a copy of the GNU General Public License
|
|
25 | 25 | ; Rel 0.03 - Bugfix for text size
|
26 | 26 | ; Rel 0.04.3 - Added Metal type and tint options bugfix for colors and mesh shapes
|
27 | 27 | ; Rel 0.05 - Updated to GIMP-2.10.22
|
| 28 | +; Rel 0.06 - Bug fixes; updated for Gimp-2.10.34 ; this script depends on FU-chrome-image |
28 | 29 | ;
|
29 | 30 | ;scaled pattern fill procedure
|
30 | 31 | (define (scaled-pattern-fill image drawable pattern scale)
|
|
187 | 188 | ;(gimp-displays-flush)
|
188 | 189 | ;(quit)
|
189 | 190 |
|
190 |
| - ;(gimp-message "line 190") |
| 191 | + ;(gimp-message "line 191") |
191 | 192 | (if (< (/ size 6) 2)
|
192 | 193 | (set! tilespac 2.0)
|
193 | 194 | (set! tilespac (round (/ size 6)))
|
|
261 | 262 | (gimp-image-set-active-layer image pattern-layer)
|
262 | 263 | (gimp-context-set-background '(128 128 128))
|
263 | 264 | (gimp-edit-blend pattern-layer BLEND-FG-BG-RGB LAYER-MODE-NORMAL GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE FALSE 3 0.2 TRUE (/ width 2) 0 (/ width 2) height)
|
264 |
| - (gimp-message "264") |
265 |
| - (gimp-displays-flush) |
| 265 | + ;(gimp-message "line265") |
| 266 | + ;(gimp-displays-flush) |
266 | 267 | ;(quit)
|
267 | 268 |
|
268 | 269 | (gimp-selection-none image)
|
269 | 270 | (plug-in-bump-map RUN-NONINTERACTIVE image pattern-layer bump-channel 135 45 32 0 0 0 0 TRUE FALSE 0)
|
270 | 271 | (gimp-displays-flush)
|
271 |
| - ;(gimp-message "line271") |
| 272 | + ;(gimp-message "line272") |
272 | 273 |
|
273 | 274 |
|
274 | 275 | (plug-in-alienmap2 1 image pattern-layer 1 0 1 0 1 0 0 TRUE TRUE TRUE)
|
|
294 | 295 |
|
295 | 296 | (script-fu-drop-shadow image pattern-layer 4 4 15 '(0 0 0) 80 FALSE)
|
296 | 297 | (set! shadow-layer (car (find-layer-by-name image "Drop Shadow")))
|
297 |
| - ;(gimp-message "line297") |
298 |
| - (gimp-displays-flush) |
| 298 | + ;(gimp-message "line298") |
| 299 | + (gimp-progress-pulse) |
| 300 | + ;(gimp-displays-flush) |
299 | 301 | ;(quit)
|
300 | 302 |
|
301 | 303 | (gimp-layer-resize-to-image-size shadow-layer)
|
302 | 304 |
|
303 | 305 | ;;;;finish the script
|
304 | 306 | (if (= conserve FALSE)
|
305 | 307 | (begin
|
306 |
| - (gimp-message "flatten process") |
| 308 | + ;(gimp-message "line 308 flatten process") |
307 | 309 | (set! background (car (gimp-image-merge-down image pattern-layer EXPAND-AS-NECESSARY)))
|
308 | 310 | (set! background (car (gimp-image-merge-down image background EXPAND-AS-NECESSARY)))
|
309 | 311 | (set! background (car (gimp-image-merge-down image background EXPAND-AS-NECESSARY)))
|
|
436 | 438 | (set! final-width (car (gimp-drawable-width size-layer)))
|
437 | 439 | (set! final-height (car (gimp-drawable-height size-layer)))
|
438 | 440 |
|
| 441 | + (gimp-progress-update 0.1) |
439 | 442 | ;;;Add the text layer for a temporary larger Image size
|
440 | 443 | (set! text-layer (car (gimp-text-fontname image -1 0 0 text (round (/ 400 4)) TRUE 400 PIXELS font)))
|
441 | 444 | (gimp-drawable-set-name text-layer "Text")
|
|
449 | 452 | (gimp-image-remove-layer image size-layer)
|
450 | 453 | (gimp-image-resize-to-layers image)
|
451 | 454 |
|
452 |
| - ;(gimp-message "line452") |
| 455 | + ;(gimp-message "line455") |
| 456 | + (gimp-progress-pulse) |
453 | 457 | ;;;create selection-channel (cond ((= ver 2.8) (gimp-image-select-item image 2 selection-channel)) (else (gimp-selection-load selection-channel)))
|
454 | 458 |
|
455 | 459 | ;(gimp-image-select-item image CHANNEL-OP-REPLACE text-layer))
|
|
460 | 464 | (cond ((= ver 2.8) (gimp-item-set-name selection-channel "selection-channel"))
|
461 | 465 | (else (gimp-item-set-name selection-channel "selection-channel"))
|
462 | 466 | ) ;endcond
|
463 |
| - ;(gimp-message "line463") |
| 467 | + ;(gimp-message "line467") |
464 | 468 | (gimp-image-set-active-layer image text-layer)
|
465 | 469 | (gimp-selection-grow image edge-width)
|
466 | 470 | (gimp-edit-fill text-layer FILL-FOREGROUND)
|
467 | 471 | (gimp-selection-none image)
|
468 | 472 |
|
469 | 473 | ;(gimp-context-set-antialias TRUE)
|
| 474 | + (gimp-progress-update 0.2) |
470 | 475 |
|
471 | 476 | ;;;;begin the script
|
472 | 477 |
|
|
479 | 484 |
|
480 | 485 | (set! chrome-layer (car (gimp-layer-copy text-layer TRUE)))
|
481 | 486 | (gimp-image-insert-layer image chrome-layer 0 -1)
|
482 |
| - (gimp-message "line482") |
| 487 | + ;(gimp-message "line487") |
483 | 488 | (gimp-image-select-color image CHANNEL-OP-REPLACE chrome-layer (car (gimp-context-get-foreground)))
|
484 | 489 | ;(gimp-display-new image)
|
485 | 490 |
|
486 |
| - ;(gimp-message "line485") |
| 491 | + ;(gimp-message "line491") |
| 492 | + (gimp-progress-pulse) |
| 493 | + ; this scripts depends on FU-chrome-image |
487 | 494 | (FU-chrome-image image chrome-layer 95.0 16.0 4.0 TRUE TRUE TRUE) ;'(118 112 107)
|
488 |
| - ;(gimp-message "line486") |
489 |
| - |
| 495 | + ;(gimp-message "line495") |
490 | 496 |
|
| 497 | + (gimp-progress-update 0.3) |
491 | 498 | ;
|
492 | 499 | ;(gimp-image-remove-layer image (car (find-layer-by-name image "Background")))
|
493 | 500 | (set! text-layer (car (gimp-image-merge-down image (car (gimp-image-get-active-layer image)) EXPAND-AS-NECESSARY)))
|
|
506 | 513 |
|
507 | 514 | (cond ((= ver 2.8) (gimp-image-select-item image CHANNEL-OP-REPLACE selection-channel)) (else (gimp-selection-load selection-channel)))
|
508 | 515 |
|
| 516 | + ;(gimp-message "line516") |
| 517 | + (gimp-progress-update 0.4) |
509 | 518 | (script-fu-metal-mesh-b image
|
510 | 519 | text-layer ;drawable
|
511 | 520 | text-mesh-type
|
|
516 | 525 | FALSE) ;conserve
|
517 | 526 |
|
518 | 527 | ;(gimp-display-new image)
|
519 |
| - ;(quit) |
| 528 | + (gimp-progress-pulse) |
520 | 529 |
|
521 | 530 | (set! text-layer (car (gimp-image-get-active-layer image)))
|
522 |
| - |
| 531 | + ;(gimp-message "line531") |
523 | 532 | (metal-mesh-easy-3d image
|
524 | 533 | text-layer ;drawable
|
525 | 534 | 3d-size
|
526 | 535 | h-dir
|
527 | 536 | v-dir
|
528 | 537 | FALSE ;keep-selection-in
|
529 | 538 | FALSE) ;conserve
|
530 |
| - |
| 539 | + |
| 540 | + ;(gimp-message "line540") |
| 541 | + (gimp-progress-update 0.5) |
531 | 542 | (set! text-layer (car (gimp-image-get-active-layer image)))
|
532 | 543 |
|
533 |
| - (cond ((not (= bkg-type 4)) |
534 |
| - (mesh-pixel-frame image |
| 544 | + (if (not (= bkg-type 4)) |
| 545 | + (begin |
| 546 | + (mesh-pixel-frame image |
535 | 547 | text-layer ;drawable
|
536 | 548 | border-size
|
537 | 549 | FALSE ;keep-selection-in
|
|
541 | 553 |
|
542 | 554 | (set! text-layer (car (gimp-image-get-active-layer image)))
|
543 | 555 |
|
544 |
| - ;(gimp-message "line544") |
| 556 | + ;(gimp-message "line556") |
545 | 557 | ;;;end
|
| 558 | + (gimp-progress-update 0.6) |
546 | 559 |
|
547 | 560 | ;;;;Scale Image to it's final size;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
548 | 561 | (set! aspect (/ final-width (car (gimp-image-width image))))
|
|
552 | 565 |
|
553 | 566 | (if (= bkg-type 0)
|
554 | 567 | (begin
|
| 568 | + ;(gimp-message "line568") |
| 569 | + (gimp-progress-update 0.64) |
555 | 570 | (script-fu-metal-mesh-b image
|
556 | 571 | text-layer ;drawable
|
557 | 572 | bkg-mesh-type
|
|
564 | 579 | (set! bkg-layer (car (gimp-image-get-active-layer image)))
|
565 | 580 | )
|
566 | 581 | ) ;endif
|
567 |
| - ;(gimp-message "line567") |
568 |
| - |
| 582 | + ;(gimp-message "line582") |
| 583 | + (gimp-progress-update 0.7) |
569 | 584 | ;;;;create the background layer
|
570 |
| - (cond ((not (or (= bkg-type 4) (= bkg-type 0))) |
571 |
| - (set! bkg-layer (car (gimp-layer-new image width height RGBA-IMAGE "Background" 100 LAYER-MODE-NORMAL))) |
572 |
| - (include-layer image bkg-layer text-layer 1) ;stack 0=above 1=below |
| 585 | + (if (not (or (= bkg-type 4) (= bkg-type 0))) |
| 586 | + (begin |
| 587 | + (set! bkg-layer (car (gimp-layer-new image width height RGBA-IMAGE "Background" 100 LAYER-MODE-NORMAL))) |
| 588 | + (include-layer image bkg-layer text-layer 1) ;stack 0=above 1=below |
573 | 589 | )
|
574 | 590 | ) ;endcond
|
575 | 591 |
|
| 592 | + ;(gimp-message "line592") |
| 593 | + |
576 | 594 | (gimp-context-set-pattern pattern)
|
577 | 595 | (gimp-context-set-background bkg-color)
|
578 | 596 | (gimp-context-set-gradient gradient)
|
|
594 | 612 | (gimp-edit-blend bkg-layer BLEND-CUSTOM LAYER-MODE-NORMAL GRADIENT-LINEAR 100 0 REPEAT-NONE reverse FALSE 3 0.2 TRUE x1 y1 x2 y2)
|
595 | 613 | )
|
596 | 614 | )
|
597 |
| - |
| 615 | + (gimp-progress-update 0.95) |
598 | 616 | (if (= merge TRUE)
|
599 | 617 | (begin
|
600 | 618 | (gimp-image-remove-channel image selection-channel)
|
|
604 | 622 | ) ;endcond
|
605 | 623 | )
|
606 | 624 | ) ;endif
|
607 |
| - |
| 625 | + (gimp-progress-update 0.99) |
608 | 626 | (gimp-context-pop)
|
609 | 627 | (gimp-display-new image)
|
610 | 628 | (gimp-message "Good finish OK")
|
|
716 | 734 |
|
717 | 735 | ; (gimp-context-set-foreground color)
|
718 | 736 | ; (gimp-edit-fill image-layer FOREGROUND-FILL)
|
| 737 | + (gimp-progress-pulse) |
719 | 738 |
|
720 | 739 | (plug-in-bump-map
|
721 | 740 | 1
|
|
746 | 765 | (gimp-image-set-active-layer image image-layer)
|
747 | 766 | (set! 3d-layer (car (gimp-layer-copy image-layer TRUE)))
|
748 | 767 | (gimp-image-insert-layer image 3d-layer 0 1)
|
749 |
| - |
| 768 | + (gimp-progress-pulse) |
750 | 769 |
|
751 | 770 | (set! horizontal
|
752 | 771 | (cond
|
|
768 | 787 |
|
769 | 788 | (gimp-selection-none image)
|
770 | 789 | (while (> cnt 0)
|
| 790 | + (gimp-progress-update (* 0.01 (/ 100 cnt))) |
771 | 791 | (gimp-image-set-active-layer image 3d-layer)
|
772 | 792 | (set! copy-layer (car (gimp-layer-copy 3d-layer TRUE)))
|
773 | 793 | (gimp-image-add-layer image copy-layer -1)
|
|
813 | 833 | (if (= keep-selection FALSE) (gimp-selection-none image))
|
814 | 834 | (gimp-image-remove-channel image selection-channel)
|
815 | 835 | ; (if (and (= conserve FALSE) (= alpha FALSE) (gimp-layer-flatten image-layer)))
|
816 |
| - |
| 836 | + (gimp-progress-pulse) |
817 | 837 |
|
818 | 838 | (gimp-displays-flush)
|
819 | 839 | (gimp-image-undo-group-end image)
|
|
844 | 864 | (frame-layer 0)
|
845 | 865 | )
|
846 | 866 |
|
847 |
| - (gimp-message "mesh pixel frame") |
| 867 | + ;(gimp-message "mesh pixel frame") |
| 868 | + (gimp-progress-pulse) |
848 | 869 | (gimp-context-push)
|
849 | 870 | (gimp-image-undo-group-start image)
|
850 | 871 | (gimp-context-set-default-colors)
|
851 | 872 |
|
852 | 873 | ;;;;save the selection (gimp-selection-load original-channel)
|
853 | 874 | (if (= sel FALSE)
|
854 | 875 | (begin
|
| 876 | + ;(gimp-message "line863") |
855 | 877 | (gimp-selection-save image)
|
856 |
| - (set! original-channel (car (gimp-image-get-active-drawable image))) |
| 878 | + (set! original-channel (car (gimp-image-get-active-drawable image))) |
857 | 879 | (gimp-channel-set-opacity original-channel 100)
|
858 | 880 | (gimp-drawable-set-name original-channel "original-channel")
|
859 | 881 | (gimp-image-set-active-layer image image-layer)
|
860 | 882 | (gimp-selection-none image)
|
861 | 883 | )
|
862 | 884 | )
|
863 | 885 |
|
| 886 | + ;(gimp-message "line882") |
| 887 | + (gimp-progress-pulse) |
864 | 888 | (if (= alpha FALSE) (gimp-layer-add-alpha image-layer))
|
865 | 889 |
|
866 |
| - ;;;;check that a selection was made and make one |
| 890 | + ;;;;check that a selection was made and make one |
867 | 891 | (if (= sel TRUE) (set! keep-selection FALSE))
|
868 | 892 |
|
| 893 | + ;(gimp-message "line889") |
869 | 894 | (gimp-context-set-feather FALSE)
|
870 |
| - (gimp-context-set-feather-radius 10) |
| 895 | + (gimp-context-set-feather-radius 10 8) |
| 896 | + |
| 897 | + ;(gimp-message "line893") |
| 898 | + (gimp-progress-pulse) |
871 | 899 | (gimp-image-select-rectangle image
|
872 | 900 | CHANNEL-OP-REPLACE
|
873 | 901 | (car (gimp-drawable-offsets image-layer))
|
|
879 | 907 | ;;;;create selection-channel (gimp-selection-load selection-channel)
|
880 | 908 | (gimp-selection-save image)
|
881 | 909 | (set! selection-channel (car (gimp-image-get-active-drawable image)))
|
| 910 | + ;(gimp-message "line906") |
882 | 911 | (gimp-channel-set-opacity selection-channel 100)
|
883 | 912 | (gimp-drawable-set-name selection-channel "selection-channel")
|
884 | 913 | (gimp-image-set-active-layer image image-layer)
|
885 |
| - (gimp-selection-none image) |
| 914 | + (gimp-selection-none image) |
886 | 915 |
|
887 | 916 | ;;;;begin the script;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
888 | 917 | ;;;;create the Gradient image
|
889 | 918 | (set! gradient-image (car (gimp-image-new 400 400 RGB)))
|
890 | 919 | (set! gradient-layer (car (gimp-layer-new gradient-image 400 400 RGBA-IMAGE "Gradient" 100 LAYER-MODE-NORMAL)))
|
891 | 920 | (gimp-image-insert-layer gradient-image gradient-layer 0 1)
|
| 921 | + |
| 922 | + ;(gimp-message "line918") |
| 923 | + (gimp-progress-pulse) |
892 | 924 | (plug-in-diffraction 1 gradient-image gradient-layer 0.815 1.221 1.123 0.821 0.821 0.974 1 1 1 0.066 37.126 -0.473)
|
893 | 925 | (plug-in-rgb-noise 1 gradient-image gradient-layer TRUE FALSE 1 1 1 0)
|
894 | 926 | (gimp-image-crop gradient-image 400 1 0 200)
|
|
897 | 929 |
|
898 | 930 | ;;;;run Gradient from image
|
899 | 931 | ;(gimp-display-new gradient-image)
|
900 |
| - ;(gimp-message "line 900 - where's it going") |
| 932 | + ;(gimp-message "line 914 - where's it going") |
901 | 933 | (the-pixel-frame-gradient-from-image gradient-image gradient-layer 100 FALSE inName TRUE)
|
902 |
| - ;(gimp-message "line 902 - what are we deleting") |
| 934 | + ;(gimp-message "line 916 - what are we deleting") |
903 | 935 | ;(gimp-image-delete gradient-image)
|
904 | 936 |
|
905 | 937 | ;;;;create the frame layer
|
|
910 | 942 | (gimp-image-insert-layer image frame-layer 0 -1)
|
911 | 943 | (gimp-context-set-background '(255 255 255))
|
912 | 944 | (gimp-drawable-fill frame-layer FILL-BACKGROUND)
|
| 945 | + (gimp-progress-pulse) |
913 | 946 | (gimp-context-set-gradient "Border Gradient")
|
914 | 947 | (gimp-edit-blend frame-layer BLEND-CUSTOM LAYER-MODE-NORMAL GRADIENT-SHAPEBURST-SPHERICAL 100 0 REPEAT-NONE FALSE FALSE 3 0.2 TRUE 0 0 width height)
|
915 | 948 | (gimp-gradient-delete "Border Gradient")
|
916 | 949 | (gimp-selection-load selection-channel)
|
917 | 950 | (gimp-edit-clear frame-layer)
|
918 |
| - (gimp-selection-none image) |
| 951 | + (gimp-selection-none image) |
919 | 952 |
|
920 | 953 | ;;;;finish the script
|
921 |
| - (if (= conserve FALSE) (set! image-layer (car (gimp-image-merge-down image frame-layer EXPAND-AS-NECESSARY)))) |
| 954 | + (if (= conserve FALSE) |
| 955 | + (set! image-layer (car (gimp-image-merge-down image frame-layer EXPAND-AS-NECESSARY))) |
| 956 | + ) |
922 | 957 | (gimp-drawable-set-name image-layer layer-name)
|
923 | 958 | (if (= keep-selection TRUE)(gimp-selection-load original-channel))
|
924 | 959 | (gimp-image-remove-channel image selection-channel)
|
|
0 commit comments