After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 344910 - remember Drop Shadow script parameters
remember Drop Shadow script parameters
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Script-Fu
git master
Other All
: Low enhancement
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-06-14 20:02 UTC by Ben W.
Modified: 2018-05-24 11:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Updated Drop Shadow script (6.35 KB, application/octet-stream)
2006-06-14 20:22 UTC, Ben W.
Details

Description Ben W. 2006-06-14 20:02:02 UTC
I believe it would be useful for the "Drop Shadow" layer to include in its name a list of the shadow attributes or parameters.  It is a small thing that is potentially very useful.  Often, one may create a shadow in an image, tinkering with the settings until the desired effect is achieved, and then come back later to change some aspect of the image (such as text) and have to rediscover the original shadow settings.  I know that layer effects may in the future make this unnecessary, but for now I am submitting a modified script which adds the shadow parameters to the title of the drop shadow layer:

Sample: Drop Shadow (Attributes: X=8, Y=8, Blur=15, Color=A42C2C, Opacity=80)

There may be a better way to accomplish this, but I am just starting to learn Script-Fu.
Comment 1 Ben W. 2006-06-14 20:22:34 UTC
Created attachment 67360 [details]
Updated Drop Shadow script
Comment 2 Joao S. O. Bueno 2006-06-15 04:12:44 UTC
Hi.
Interesting functionality idea, however the clutter on all options has to go away unless strictly necessary. Moreover, the internal interface for each script-fu must not change on the same major version number of the GIMP. That means that your modification would not be suitable for making it for 2.4 anyway.

However, I see your point, and I have an idea: Why not to auto-generate the drop-shadow layer name, instead of using a fixed one?

Instead of an extra input field, you could have almost all the advantages you intend, without having an extra field to type in the script: you can take the first 15 or 20 letters of a layer name, and prepend "Shadow of" to it.
FOr example: when making a shadow of a layer named "presentation", you'd have "Shadow of presentation".

Do you think you can make a modification to do this, instead?

(also, when putting an attachment here, you should put a patch to the current gimp file, not the whole script, so that developers can easily perceive what has changed. Use "diff -u original_file.scm your_file.scm". The command output is this patch)

Thank you for participating!
Comment 3 Sven Neumann 2006-06-15 09:20:22 UTC
Actually, the right thing to do here is to introduce effect layers but that's a different issue and there's a bug-report about it already.

I am not very happy about the idea of abusing the layer name for this because it will clutter the layers dialog pretty badly. But then I also see the point that this might be useful sometimes. A better solution is probably to let the script attach a parasite to the shadowed layer and add functionality that retrieves this parasite when the script is invoked on the same layer later.
Comment 4 Ben W. 2006-06-15 14:53:11 UTC
(In reply to comment #2)
> Hi.
> Interesting functionality idea, however the clutter on all options has to go
> away unless strictly necessary. Moreover, the internal interface for each
> script-fu must not change on the same major version number of the GIMP. That
> means that your modification would not be suitable for making it for 2.4
> anyway.

Hi, the modification I suggested does not add any additional items to the Drop Shadow script interface.  The addendum to the Drop Shadow layer title is generated based on the parameters the user chooses when they run the script.  It is not necessary for the user to type anything.

> 
> However, I see your point, and I have an idea: Why not to auto-generate the
> drop-shadow layer name, instead of using a fixed one?
> 
> Instead of an extra input field, you could have almost all the advantages you
> intend, without having an extra field to type in the script: you can take the
> first 15 or 20 letters of a layer name, and prepend "Shadow of" to it.
> FOr example: when making a shadow of a layer named "presentation", you'd have
> "Shadow of presentation".
> 
> Do you think you can make a modification to do this, instead?

I would be happy to try to do this modification, but it does not address the same problem.  I am not so concerned about remembering which shadow is connected to which layer; it is very easy to determine that.  It is currently impossible to reliably determine the settings one used to generate a shadow in the first place.  This is an issue because often one wants to put a similar shadow on another item in the image, and may end up having to regenerate all the shadows so that they will match.

> 
> (also, when putting an attachment here, you should put a patch to the current
> gimp file, not the whole script, so that developers can easily perceive what
> has changed. Use "diff -u original_file.scm your_file.scm". The command output
> is this patch)
> 

Thanks for the tip, I will do that in the future.  I guess you are saying I should type that into the Script Fu console, which I have not tried yet...

Comment 5 Ben W. 2006-06-15 15:02:02 UTC
(In reply to comment #3)
> Actually, the right thing to do here is to introduce effect layers but that's a
> different issue and there's a bug-report about it already.
> 
> I am not very happy about the idea of abusing the layer name for this because
> it will clutter the layers dialog pretty badly. But then I also see the point
> that this might be useful sometimes. 

I know it is a rough method of addressing the problem.  I don't know enough yet to do anything better.  Having this functionality is essential for my work, so I will be using the modified script until a better solution is implemented.  I figured I would submit it here in case it would be useful to others.  Perhaps I should submit it the GIMP Plug-In Registry.
Comment 6 saulgoode 2006-06-17 01:08:48 UTC
I have made an attempt at accomplishing this through parasites. The script is available at http://flashingtwelve.brickfilms.com/GIMP/Scripts/drop-shadow-with-parasite.scm 

I did not wish to post it as a patch because, as it stands, it is only being presented here because the report originator may find it useful for his purposes. It is best that the original "drop shadow" script be retained and this one examined within the context of being a preliminary mockup of a potential approach.

It should not be considered for replacement of the current drop shadow because it modifies behavior in the following manner:

1) It removes an existing shadow layer if present and substitutes a newly generated one. (This, in and of itself, might be acceptable).

2) It breaks the UNDOability because UNDO appears unable to handle parasites. (This, IMO, would be unacceptable and I haven't figured out how to resolve this.)

I will post more information on the developer's ML sometime in the next day or so.  The approach taken may be flawed or contrary to other development efforts (regarding layer operations in general).

For those who would try the script, the function 'drop-shadow-with-parasite' is the "replacement" for 'drop-shadow'. Other than the two caveats mentioned, its functionality is the same; although it does add a "layer-op-drop-shadow" parasite to the layer. 

The function 'drop-shadow-from-template' allows the user to choose a previously created layer which is to be used as the source for the shadow parameters (this should be a layer to which a shadow was added using 'drop-shadow-with-parasite'). 
Comment 7 Sven Neumann 2008-01-15 13:30:31 UTC
Changing version to "Current SVN" as this request is not specific to any
particular version.
Comment 8 GNOME Infrastructure Team 2018-05-24 11:51:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/196.