Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drop shadow no longer available???
#1
I re-installed 2.8.22 abpout a week ago
Everything worked fine, yesterday the option (lighting effects/drop shadow) was no longer there, or anywhere else as far as I can determine.
I can make my own of course, but it is a multi-step operation

What happened?
Can I get it back or would I need to reinstall all over again? (I don't think I want to do that)

   
[Image: 19105943_10155369372828431_6319540712753...e=59D23EBC]
Reply
#2
[quote pid='2329' dateline='1497720468']
Code:
; GIMP - The GNU Image Manipulation Program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; 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 3 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.
;
; You should have received a copy of the GNU General Public License
; along with this program.  If not, see <http://www.gnu.org/licenses/>.
;
;
; drop-shadow.scm   version 1.05   2011/4/21
;
; CHANGE-LOG:
; 1.00 - initial release
; 1.01 - fixed the problem with a remaining copy of the selection
; 1.02 - some code cleanup, no real changes
; 1.03 - can't call gimp-edit-fill until layer is added to image!
; 1.04
; 1.05 - replaced deprecated function calls with new ones for 2.8
;
; Copyright (C) 1997-1999 Sven Neumann <sven@gimp.org>
;
;
; Adds a drop-shadow of the current selection or alpha-channel.
;
; This script is derived from my script add-shadow, which has become
; obsolete now. Thanks to Andrew Donkin (ard@cs.waikato.ac.nz) for his
; idea to add alpha-support to add-shadow.


(define (script-fu-drop-shadow image
                              drawable
                              shadow-transl-x
                              shadow-transl-y
                              shadow-blur
                              shadow-color
                              shadow-opacity
                              allow-resize)
 (let* (
       (shadow-blur (max shadow-blur 0))
       (shadow-opacity (min shadow-opacity 100))
       (shadow-opacity (max shadow-opacity 0))
       (type (car (gimp-drawable-type-with-alpha drawable)))
       (image-width (car (gimp-image-width image)))
       (image-height (car (gimp-image-height image)))
       (from-selection 0)
       (active-selection 0)
       (shadow-layer 0)
       )

 (gimp-context-push)
 (gimp-context-set-defaults)

 (gimp-image-set-active-layer image drawable)

 (gimp-image-undo-group-start image)

 (gimp-layer-add-alpha drawable)
 (if (= (car (gimp-selection-is-empty image)) TRUE)
     (begin
       (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
       (set! from-selection FALSE))
     (begin
       (set! from-selection TRUE)
       (set! active-selection (car (gimp-selection-save image)))))

 (let* ((selection-bounds (gimp-selection-bounds image))
        (select-offset-x (cadr selection-bounds))
        (select-offset-y (caddr selection-bounds))
        (select-width (- (cadr (cddr selection-bounds)) select-offset-x))
        (select-height (- (caddr (cddr selection-bounds)) select-offset-y))

        (shadow-width (+ select-width (* 2 shadow-blur)))
        (shadow-height (+ select-height (* 2 shadow-blur)))

        (shadow-offset-x (- select-offset-x shadow-blur))
        (shadow-offset-y (- select-offset-y shadow-blur)))

   (if (= allow-resize TRUE)
       (let* ((new-image-width image-width)
              (new-image-height image-height)
              (image-offset-x 0)
              (image-offset-y 0))

         (if (< (+ shadow-offset-x shadow-transl-x) 0)
             (begin
               (set! image-offset-x (- 0 (+ shadow-offset-x
                                            shadow-transl-x)))
               (set! shadow-offset-x (- 0 shadow-transl-x))
               (set! new-image-width (+ new-image-width image-offset-x))))

         (if (< (+ shadow-offset-y shadow-transl-y) 0)
             (begin
               (set! image-offset-y (- 0 (+ shadow-offset-y
                                            shadow-transl-y)))
               (set! shadow-offset-y (- 0 shadow-transl-y))
               (set! new-image-height (+ new-image-height image-offset-y))))

         (if (> (+ (+ shadow-width shadow-offset-x) shadow-transl-x)
                new-image-width)
             (set! new-image-width
                   (+ (+ shadow-width shadow-offset-x) shadow-transl-x)))

         (if (> (+ (+ shadow-height shadow-offset-y) shadow-transl-y)
                new-image-height)
             (set! new-image-height
                   (+ (+ shadow-height shadow-offset-y) shadow-transl-y)))

         (gimp-image-resize image
                            new-image-width
                            new-image-height
                            image-offset-x
                            image-offset-y)
       )
   )

   (set! shadow-layer (car (gimp-layer-new image
                                           shadow-width
                                           shadow-height
                                           type
                                           "Drop Shadow"
                                           shadow-opacity
                                           NORMAL-MODE)))
   (gimp-image-set-active-layer image drawable)
   (gimp-image-insert-layer image shadow-layer 0 -1)
   (gimp-layer-set-offsets shadow-layer
                           shadow-offset-x
                           shadow-offset-y))

 (gimp-drawable-fill shadow-layer TRANSPARENT-FILL)
 (gimp-context-set-background shadow-color)
 (gimp-edit-fill shadow-layer BACKGROUND-FILL)
 (gimp-selection-none image)
 (gimp-layer-set-lock-alpha shadow-layer FALSE)
 (if (>= shadow-blur 1.0) (plug-in-gauss-rle RUN-NONINTERACTIVE
                                             image
                                             shadow-layer
                                             shadow-blur
                                             TRUE
                                             TRUE))
 (gimp-layer-translate shadow-layer shadow-transl-x shadow-transl-y)

 (if (= from-selection TRUE)
     (begin
       (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
       (gimp-edit-clear shadow-layer)
       (gimp-image-remove-channel image active-selection)))

 (if (and
      (= (car (gimp-layer-is-floating-sel drawable)) 0)
      (= from-selection FALSE))
     (gimp-image-raise-item image drawable))

 (gimp-image-set-active-layer image drawable)
 (gimp-image-undo-group-end image)
 (gimp-displays-flush)

 (gimp-context-pop)
 )
)

(script-fu-register "script-fu-drop-shadow"
 _"_Drop Shadow..."
 _"Add a drop shadow to the selected region (or alpha)"
 "Sven Neumann <sven@gimp.org>"
 "Sven Neumann"
 "1999/12/21"
 "RGB* GRAY*"
 SF-IMAGE      "Image"           0
 SF-DRAWABLE   "Drawable"        0
 SF-ADJUSTMENT _"Offset X"       '(4 -4096 4096 1 10 0 1)
 SF-ADJUSTMENT _"Offset Y"       '(4 -4096 4096 1 10 0 1)
 SF-ADJUSTMENT _"Blur radius"    '(15 0 1024 1 10 0 1)
 SF-COLOR      _"Color"          "black"
 SF-ADJUSTMENT _"Opacity"        '(60 0 100 1 10 0 0)
 SF-TOGGLE     _"Allow resizing" TRUE
)

(script-fu-menu-register "script-fu-drop-shadow"
                        "<Image>/Filters/Light and Shadow/Shadow")


[/quote]

No idea how you came to lose that option..?
I'm not sure how to add files here but this is the code for the script called .. drop-shadow.scm which will appear in the Filters> Light and Shadows section. Save it as a .scm file and put it in the scripts folder. Should be a straightforward process.
Reply
#3
Best guess.

You have been playing about in Edit -> Preferences -> Folders -> Scripts

and deleted the reference path to the default Gimp scripts

C:\Program Files\GIMP 2\share\gimp\2.0\scripts

[Image: xIhzZ8P.jpg]

The scripts are still there, unless you deleted them. If they are still there several ways. Two ways maybe.

1. Remake the path in Edit -> Preferences -> Folders -> Scripts
The icons at the top are tools for this.

2. Go into your Gimp profile, C:\Users\your-name\.gimp-2.8 and disable the file gimprc by renaming it.
Gimp will eventually make a new one.

[Image: iwPBHZK.jpg]

If all else fails, rename the complete Gimp profile to C:\Users\your-name\.gimp-2.8-bak and Gimp will start up as a new installation and create a new profile Copy any required scripts/plug-ins from the old to the new.
Reply
#4
I downloaded and am experimenting with Partha's Gimp 2.9
Seems all is well with it... Still have 2.8.22 so will check out your suggestions
thanks!!
[Image: 19105943_10155369372828431_6319540712753...e=59D23EBC]
Reply
#5
(06-17-2017, 08:22 PM)Nateart Wrote: I downloaded and am experimenting with Partha's Gimp 2.9
Some comments on partha Gimp 2.9.5

https://www.gimp-forum.net/Thread-Gimp-2...37#pid2337

Quote:... Still have 2.8.22 so will check out your suggestions

In previous post, I missed out second best guess Smile , you deleted or part deleted C:\Program Files\GIMP 2\share\gimp\2.0\scripts

Reinstall Gimp, do not pass go, do not collect $200
Reply


Forum Jump: