It is currently 21 Jan 2018, 18:16

GIMP Scheme Fu ScriptsChange the names of script (SCM) files (Showcase | Slideshow)

Share your Scheme Fu scripts for GIMP here
User avatar
Pegleg44

Forum Member
View: Showcase | Slideshow
Topic Posts: 8/15
Posts: 43
Joined: 28 Nov 2016, 19:12
Cash on hand: 258.13 GLP
x 11
Gimp Nation

Change the names of script (SCM) files

Post#1 by Pegleg44 » 17 Feb 2017, 11:48


I'd like to rename some of my scripts so that I can better recognize what they are when I look through them. Can I just change the name of it and it will still work right?
Image
0 x




Registered members enjoy ads-free content
User avatar
tim
Administrator
View: Showcase | Slideshow
Topic Posts: 7/15
Posts: 2071
Joined: 25 Sep 2016, 17:16
Cash on hand: 7,180.19 GLP
Bank: 42,250.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1106
x 240
Contact:
Canada

Post#2 by tim » 17 Feb 2017, 13:07


yep, filename change is fine.
You could even change the menu name inside the file too if you like
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Pegleg44

Forum Member
View: Showcase | Slideshow
Topic Posts: 8/15
Posts: 43
Joined: 28 Nov 2016, 19:12
Cash on hand: 258.13 GLP
x 11
Gimp Nation

Post#3 by Pegleg44 » 17 Feb 2017, 14:35


Now the name of the file has nothing to do with anything right. Like dependencies or anything. Am I right on that?

So is the menu name always at the end and ends up with the text "menu register" like this.

Code: Select all

 
  "<Image>/Script-Fu/Sel To Darken Layer"    ;menu register
 
And all I have to do is change the "Sel To Darken Layer" right.
If so I can change that.
But will I also have to change my keyboard shortcuts that I use.
0 x




User avatar
tim
Administrator
View: Showcase | Slideshow
Topic Posts: 7/15
Posts: 2071
Joined: 25 Sep 2016, 17:16
Cash on hand: 7,180.19 GLP
Bank: 42,250.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1106
x 240
Contact:
Canada

Post#4 by tim » 17 Feb 2017, 14:52


You can change Sel To Darken Layer yes...but I don't even know how to assign keyboard short cuts to scripts?

Edit: i just tried it and it messes with the dynamic short cut key assigned. it looks like i assigns short cut to whichever menu item is in that place.
so the name change will move that script to a different location alphabetically so short cuts are no longer valid.
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Pegleg44

Forum Member
View: Showcase | Slideshow
Topic Posts: 8/15
Posts: 43
Joined: 28 Nov 2016, 19:12
Cash on hand: 258.13 GLP
x 11
Gimp Nation

Post#5 by Pegleg44 » 17 Feb 2017, 15:29


But the name of the SCM file doesn't matter for anything right.

I have shortcut keyed almost all of those scripts. I will just have to disable the shortcut key then change the menu name and then re-assign the shortcut key again.

My next question is where can I find in a script the place that it calls upon another separate script?
0 x




User avatar
tim
Administrator
View: Showcase | Slideshow
Topic Posts: 7/15
Posts: 2071
Joined: 25 Sep 2016, 17:16
Cash on hand: 7,180.19 GLP
Bank: 42,250.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1106
x 240
Contact:
Canada

Post#6 by tim » 17 Feb 2017, 15:36


you're right, the file name isn't used anywhere.
if a script calls another script.
It calls it in code that starts with 'script-fu' and then some name or 'python-fu' and then some name.
because the scripts are registered in the database so other scripts call it using those names not file name.
for example if a script is registered with

Code: Select all

(script-fu-register
  "script-fu-custom-font" 
  ... 
then other scripts will call it inside .scm
by calling

Code: Select all

(script-fu-custom-font [parameters]...)
or inside .py
by

Code: Select all

pdb.script_fu_custom_font(parameters..)
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Pegleg44

Forum Member
View: Showcase | Slideshow
Topic Posts: 8/15
Posts: 43
Joined: 28 Nov 2016, 19:12
Cash on hand: 258.13 GLP
x 11
Gimp Nation

Post#7 by Pegleg44 » 17 Feb 2017, 15:50


It looks like when I make a keyboard shortcut in gimp it looks it up by the function name.
0 x




Post Reply

Last 20 Members Who Visited This Topic

User avatar tim (1), User avatar Steve Reid (1), User avatar gnerd (1)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: animicule
2: Pat625
3: oldmangrumpy
4: Issabella
5: homer
6: Issabella
7: Pat625

Who is online

Users browsing this forum: No registered users and 2 guests