Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1637  / 1 Year ago, wed, december 7, 2022, 8:53:29

I have installed GIMP2.10 in my Ubuntu 16.04. I have the following simple plug-in:



#!/usr/bin/env python

# Tutorial available at: https://www.youtube.com/watch?v=nmb-0KcgXzI
# Feedback welcome: [email protected]

from gimpfu import *

def sample_plugin(image, drawable):
# function code goes here...
print("hello")


register(
"python-fu-sample_plugin",
"SHORT DESCRIPTION",
"LONG DESCRIPTION",
"Jackson Bates", "Jackson Bates", "2015",
"sample_plugin",
"", # type of image it works on (*, RGB, RGB*, RGBA, GRAY etc...)
[
# basic parameters are: (UI_ELEMENT, "variable", "label", Default)
(PF_IMAGE, "image", "takes current image", None),
(PF_DRAWABLE, "drawable", "Input layer", None)
# PF_SLIDER, SPINNER have an extra tuple (min, max, step)
# PF_RADIO has an extra tuples within a tuple:
# eg. (("radio_label", "radio_value), ...) for as many radio buttons
# PF_OPTION has an extra tuple containing options in drop-down list
# eg. ("opt1", "opt2", ...) for as many options
# see ui_examples_1.py and ui_examples_2.py for live examples
],
[],
sample_plugin, menu="<Image>/Filters") # second item is menu location

main()


I saved this as a .py file and placed it at /home//.var/app/org.gimp.GIMP/config/GIMP/2.10/plug-ins



This folder path is already listed in Edit->Preferences->Folders->Plug-ins



When I restart GIMP, I'm not able to find this sample_plugin in the Filters menu. Not able to understand why. This is my first GIMP plug-in


More From » 16.04

 Answers
4

did you check the file permissions for the plugin file?



try



$ sudo chmod +x /usr/lib/gimp/2.10/plug-ins/YOUR_SCRIPT_FILE_NAME.py


replace "YOUR_SCRIPT_FILE_NAME" with your actual file name.



Also check where GIMP is installed, it is installed by default in the location /usr/lib/gimp/2.10/plug-ins/ where 2.10 is the GIMP version


[#7061] Wednesday, December 7, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
disdry

Total Points: 133
Total Questions: 128
Total Answers: 109

Location: Greenland
Member since Fri, Jul 31, 2020
4 Years ago
;