It is currently 17 Oct 2021, 10:25

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP
Sponsored content for World Food Program

New GIMP Python Template

Share your Python Fu Scripts/plug-ins for GIMP here
david
Forum Member
19th Place
274 Post(s)

New GIMP Python Template

Post#1 by david » 13 Oct 2021, 15:31


Because I usually forget something when creating a blank template for a Python plug-in, I have made a plug-in to do the job!

The two files go in the Plug-in directory. Linux users will need to make new_template.py executable.

Before using for the first time, open tmplt.py in your favourite text editor and change oldName in the register section to your name. If you regularly save your scripts somewhere other than under Python-Fu, you can change the path also.

You will find New Template... under File.

All you have to do is put a 2 or 3 word description, separated with spaces. in the text box (uppercase, lowercase, it does not matter) and the plug-in will format everything appropriately for your new template and save it with a file name based on the description you entered.

Hopefully it will work correctly. Because I use an extracted version of the GIMP Appimage, which does peculiar things to the paths, I had to put the full paths of the files in new_template.py.

Linux users will also have to make the created file executable.
new_template.py #
(2.33 KiB) Downloaded 12 times
tmplt.py #
(1.18 KiB) Downloaded 11 times

david
Forum Member
19th Place
274 Post(s)

Post#2 by david » 14 Oct 2021, 16:29


tim,

A small thing I came across while making the script, is that if the file register has "" rather than "RGB*" or "GREY*" , etc. there is no need to open an image. This may be relevant to your constantize plug-in.

skinnyhouse
Script Coder
5th Place
2084 Post(s)

Post#3 by skinnyhouse » 15 Oct 2021, 11:35


Could be a very useful tool for starting out.

I keep a BlankPlugin fFilter as a template for my custom font filter dabblings that has all my commonly used functions and a full set of dialog options - which are commented out until needed. This obviously need some editing for menu names etc and has to be re-named for the new filter.

david
Forum Member
19th Place
274 Post(s)

Post#4 by david » 15 Oct 2021, 17:32


@skinnyhouse

By incorporating your usual functions and dialogue options into the blank template, perhaps it will give you the best of both worlds!


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply New Topic
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 18 guests