Gimptalk - Premier Gimp Community: HOW CUSTOMIZE YOUR GIMP MENUS - Gimptalk - Premier Gimp Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

HOW CUSTOMIZE YOUR GIMP MENUS

#1 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 06 December 2006 - 02:28 PM

HOW CUSTOMIZE YOUR GIMP MENU.

Posted Image

I wrote this to complete the tutorials on “how to customize gimp”
The first http://www.gimptalk....p?t=154&start=1 was about his look (themes, fonts) and was written by Sean Michael
The second ,from Droz928 http://www.gimptalk....ash-1585-1.html deal with the “splash screen” icons and “logo splash”
I see this as a Trilogy , this is the third chapter :how to customize the gimp menus

WE WILL NOT MOVE ANYTHING THAT CAME AS DEFAULT IN GIMP MENU, that could NOT be done without trouble

BUT we can choose where ,in the menu ,we want add NEW, EXTRA plug-in.

This is trivial for “script fu.” and “tiny fu”,
To do it you don't need knowledge of scripting, just you will need to follow this tut

AS Example here i customized my Layer Menu

BEFORE

Posted Image

AFTER
Posted Image

PRATICE


i want add to the EDIT menu a “Apply Image”(as it is called by photoshoppers ) feature.
In Gimp language that means : copy visible+paste (as floating selection)+add a new layer, ...BUT "Apply Image" is just 1click
This in Gimp is still a sort of missed feature, but " merge-copy "script from Kward
http://www.deviantar...ation/28607825/ add this function

I like it but i don't want it in the script fu or in the filter menu...i need it in my EDIT menu

Well i could not put it exactly where i wanted (after “copy visible”) but how you can see i get very close

Posted Image


How to...quite simple, you don't need to be a developer to do it, you need only to be able to spot a path.


To open the script we just need ...the notepad (notepad in win...linux users could use any text editor )
And this is what we see

Quote

(define (merge-copy inimage indraw)
(set! theImage inimage)
(set! theHeight (car (gimp-image-height theImage)))
(set! theWidth (car (gimp-image-width theImage)))
(gimp-edit-copy-visible theImage)
(set! copy-layer (gimp-layer-new theImage theWidth theHeight 1 "copied layer" 100 0) )
(gimp-drawable-fill (car copy-layer) 3)
(gimp-image-add-layer theImage (car copy-layer) -1)
(set! copy-float (car (gimp-edit-paste (car copy-layer) 0)))
(gimp-floating-sel-anchor copy-float)
(gimp-image-lower-layer theImage (car copy-layer))
(gimp-image-raise-layer-to-top theImage (car copy-layer))
(gimp-displays-flush)

)
(script-fu-register "merge-copy"
"/Script-Fu/Gimp-talk.com/merge-copy..."

"copies the visable layers to a new layer"
"Karl Ward"
"Karl Ward"
"Feb 2006"
""
SF-IMAGE "SF-IMAGE" 0
SF-DRAWABLE "SF-DRAWABLE" 0


HERE IT'S THE PATH:

(script-fu-register "merge-copy"
"/Script-Fu/Gimp-talk.com/merge-copy "

That will put the script called “merge-copy” in : Image menu\Script-fu\Gimp-talk.com\merge-copy

IF we change the path in this way
/Edit/merge-copy...”

The same script will now be moved in : Image /Edit Menu/merge-copy :h:

Is not simple ?

COMMUNE MISTAKES

1 Paths are case sensitive: “/edit/merge-copy...” will not work !

2 typo are not allowed: if i mistype as “/Edits/merge-copy...” Gimp will attempt to create a new image menu called “ Edits”

3 A “Multiple” script as this one "Layer Effects/layer styles"...

Posted Image

...Will have also multiple path...(in this case are 11 )and all 11 paths need to be coerent...if you overlook one ... or mistype a single letter no any of those 11 scripts will work.

Happy Gimp hacking!!


PS You can't open and edit .exe files with notepad in the some way :l:

APPENDIX

You can edit not only the position but also the name of the script (for example to give it a more hintful name)
As esemple i found "visible to new layer" more long but more clear then "merge-copy" so i edit the name

Quote

Posted Image


and this is the result in the Edit menu

Quote

Posted Image

0

#2 User is offline   denegibson 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,237
  • Joined: 12-September 06

Posted 06 December 2006 - 08:09 PM

I find this very interesting (along with the others I haven't seen yet) and I'm gonna try it later when I have time
0

#3 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 07 December 2006 - 12:54 AM

I am not sure if it is available yet, but the development version of the GIMP permits you to add your commands to the menus in the Options dialogs (brushes, patterns, layers, etc).

Posted Image
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#4 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 11 December 2006 - 12:52 PM

Edit the first post to include a note (to change not only position but also the name)
0

#5 User is offline   Repsa_Jih 

  • Member
  • PipPip
  • Group: Members
  • Posts: 409
  • Joined: 23-June 06

Posted 11 December 2006 - 02:22 PM

I figured this out already since I've written one or two scripts...

But the tutorial is very nice, extremely handy for people who haven't got any experience with scripting! Very detailled! Good job :h:

EDIT:

Quote

PS You can't open and edit .exe files with notepad in the some way

Lol I did laugh at that line... of course you cannot! Exe files aren't ASCII files, they're binary files!
Current
Posted Image
Game Programming FTW:
My own Free RPG in C++
0

#6 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 11 December 2006 - 06:58 PM

Quote

Quote

PS You can't open and edit .exe files with notepad in the some way


Lol I did laugh at that line... of course you cannot! Exe files aren't ASCII files, they're binary files!


I imagined that maybe, after a success in editing script-fu and tiny fu, somebody could feel tempted to try same method
for the C (C#, C++, and so on) plugins... :w:
0

#7 User is offline   Repsa_Jih 

  • Member
  • PipPip
  • Group: Members
  • Posts: 409
  • Joined: 23-June 06

Posted 11 December 2006 - 07:43 PM

Oh allright :h: Sorry for the confusion... I thought you actually tried it...
Current
Posted Image
Game Programming FTW:
My own Free RPG in C++
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic