What if add-ins/plugins

What is you could add-ins or plugins to Pencil2D and make it so the community could make their own stuff without having to have it approved by you guys and so they can have more freedom (also if you do make this maybe make it so that it is using a widespread programing language also thanks for making this program😊)

1 Like

What is a plug-in, is it a program that works with another program?

Pencil2D is open-source software, and as such anyone is already free to modify it however they see fit so long as the follow the license terms. A plugin system that could allow the program to be modified without recompiling is on the roadmap, however having such an system that can integrate with all parts of the program is very far off, if it happens at all.

The key challenges with doing something like this in my opinion are:

  1. It’s a lot of work. From building the system to run the plugin code, to desigin and implementing the APIs that allow the plugins to interact with the rest of the program, to documenting everything, would an enormous undertaking. At the moment Pencil2D is developed by a small group of volunteers, and we do not have nearly enough people-power to take on something like this.
  2. After such a thing is implemented, it wouldn’t end there. Then we need to think about things such has how the plugins should be distributed. Will we maintain a vetted marketplace/collection of plugins? That’s more work. But if we just let it be the wild-west, then how do we ensure the security of our users, many of whom are not particularly computer-savvy and won’t understand the risks associated with running random code from the Internet. How do we support users when they could be running code that introduces new bugs and issues to the software?
  3. Even if we implemented plugins, and established a distribution channel for them, who will actually create them? As it stands right now, the project is completely open-sourced and anyone is welcome to make changes to the program and either distribute their own version or submit pull requests for those changes to be integrated into the official release. However, almost nobody does this. We have not had a new regular contributor join us in the past 5 years. While there is some room to improve our documentation and contribution processes, the reality is that there just aren’t many developers interested in contributing to Pencil2D in the first place.

While adding plugin system would be nice, and I know there are some features which would be most appropriate as plugins, we just aren’t at the scale where we could or would want to do that. For a project like Blender, where they have a foundation, corporate partners, hundreds of contributors, and so on, a plugin system makes a lot more sense.

The most likely thing I could see happening like this is a plugin system specifically for importing and/or exporting. Limiting the scope to just being able to do one or two things would make it easier to implement, and it would working with formats that we don’t necessarily need or want in the main application. However there still isn’t really a whole lot of demand for this. Most programs will already work with at least one of the formats that Pencil2D recognizes.

2 Likes

What about allowing users to define macros. These are a sequence of commands, which could be stored as an .XML file?

The same problems largely apply. It would need an API to do anything useful. The term “macros” typically implies code embedded in the documents, rather than installed to the program like a plugin. This a horrible idea from a security perspective. I would not want to repeat the mistake made by office tools decades ago that created an entire class of malware.

I obviously used the wrong terminology, for what I was thinking of.

What I should have said was ‘batch files’, these would consist of a series of shortcuts commands, encoded as an .XML file, used in the production process, but definitely not exported.

I envisaged say a batch file to create say 10 blank frames on the selected layer, every other possible frame.

Perhaps in flat file format.