Skip to content

Guidelines for plugins

Fahad Hasan Pathik edited this page Jul 26, 2018 · 1 revision

Here are some guidelines for Pyplugs creation into the repository to get a good consistency between plugins.

PyPlug naming :

  • You can add a prefix to your Pyplug if you like or if it's part of a collection

ex: lp_ChillSpill , lp_HairKey

  • Avoid putting versions in the name, rather you can set the version in the .py file in the def getVersion() : line.

ex: avoid naming FakeDefocus_V1.1 , just FakeDefocus

  • Funny names are cool !

PyPlug ID name :

The unique ID for the Pyplug should starts with natron.community.plugins.

Ex : For the Defocus Pyplug , the ID name should be natron.community.plugins.Defocus, and the name should be Defocus

Where to put the Pyplug :

In the repository, try to match existing organisation and put it in the right category.

To avoid having to much directory you should put Pyplugs into the existing category of Natron plugins (Color,Draw,Keyer,Transform ect...)

When generating the Pyplug, put it in the Community folder, or edit the .py file to match something like this :

def getGrouping(): return "Community/Filter/"

You can make a subfolder if that makes sense , or if it's part of a collection

ex : Community/Filter/Duck/

What to provide along with the .py file :

  • an icon file (optional but way cooler) you can copy/paste an already existing icon if that make sense
  • an .xml with the description for the installer(Not Essential)
  • a README.md file containing the description of the .PyPlug

You can also add some screenshots to the README.md by creating a Resources folder and put screenshot inside.

You can look at /Filter/ChromaticAberrationPP to see a good example of all of this.

Referencing the Pyplug in the MainPage :

When you're done submitting the Pyplug you can add it to the list in the main page, by editing the README.md file : https://github.com/NatronGitHub/natron-plugins/blob/master/README.md So we can have a bird eye view of all the available Plugins

Try to provide good documentation / Description

It's always nice to add a plugin description to your PyPlugs. Either while exporting, or afterwards in the .py file under "def getPluginDescription():"

Sometimes it's hard to guess what a Plugin does, if you didn't create it yourself. In this case it's nice if the little question mark in the properties bin can help you out. And as it isn't a personal but a community plugin-repository, ment for sharing plugins, I think it makes sense to always include a description for all the other guys that are going to use your stuff... Of course hovering descriptions for all the parameters would be nice to have, too. But it's true that's quite some work and may not be always needed .

Adding a Mask and Mix entry

This is optional and may not needed for every plug, but it's a good habit to add these entry as they are present on mostly every OpenFX plugins of Natron. Having the same options is always a good things. Some example Pyplugs that you can look at if you need :

https://github.com/NatronGitHub/natron-plugins/tree/master/Draw/LightWrap_Simple

https://github.com/NatronGitHub/natron-plugins/tree/master/Filter/Antialiasing

Don't forget that you can also add a selector for RGBA channels, to apply your effect only on these channels.

If you have a question , or found a bug

you can make a ticket here : https://github.com/NatronGitHub/natron-plugins/issues

also you can look at the open bugs for Pyplugs request , bugs or questions...