Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plug-in help
#4
When I start Gimp in a terminal (that would be using "gimp-console.exe" for you) I see this:

TypeError: Plugin.run() missing 1 required positional argument: 'run_data'

This is because you have one parameter too many: n_drawables). Maybe you saw two arguments described somewhere because in other languages such as C you have to give explicitly the size of arrays that you pass, but in Python these are implicit in the type so you just pass the array.


Otherwise, the implementation is a method of the Plugin object (self.run). But in practice the Plugin is only used for registration, and since your plugin object can define several rather unrelated procedures,  even if you have some object class that implements the functionality of the plugin it doesn't need to be a derived Gimp.Plugin (and this could even be a hindrance), instead you would define the plugin implementation as a regular function, that can instantiate such object when Gimp calls i to execute the plugin.

If you want to make your life simpler you can have a look here.
Reply


Messages In This Thread
Plug-in help - by Deedolith - 01-07-2025, 05:28 PM
RE: Plug-in help - by programmer_ceds - 01-07-2025, 06:39 PM
RE: Plug-in help - by Deedolith - 01-07-2025, 07:45 PM
RE: Plug-in help - by Ofnuts - 01-07-2025, 10:41 PM
RE: Plug-in help - by gasMask - 01-08-2025, 08:45 AM
RE: Plug-in help - by MrsP-from-C - 01-08-2025, 03:43 PM
RE: Plug-in help - by gasMask - 01-09-2025, 09:18 AM
RE: Plug-in help - by Deedolith - 01-08-2025, 04:48 PM
RE: Plug-in help - by Ofnuts - 01-09-2025, 02:03 AM
RE: Plug-in help - by MrsP-from-C - 01-08-2025, 06:36 PM
RE: Plug-in help - by Deedolith - 01-08-2025, 06:40 PM
RE: Plug-in help - by MrsP-from-C - 01-08-2025, 06:51 PM
RE: Plug-in help - by MrsP-from-C - 01-09-2025, 09:49 AM

Forum Jump: