Developer Discussion: New Grease Pencil Data Structure Proposal

Proposal Update

Since the time of this post, there have been some developments that I want to communicate.

Defining the goal

In order to ensure that we can prepare grease pencil for the future, we want to hear as many artists out there as possible and make sure their needs and vision for grease pencil are aligned with what the proposal would bring. There is now a questionnaire that we’re sending out (soon to the wider public). After we have gathered that information, we’ll see if the proposal could have some limitations that we would need to fix. We will try and take as much as possible into account.

Ongoing development on the proposal

In the past weeks, the proposal branch has seen some further development. We’re trying to refine the code and expand on the functionality. Other developers (Amélie, Antonio, Hans, Yimming) have been getting involved as well (through meetings, discussions, contributions, etc.). For now we’re doing this on the branch and mostly to test out code structures, performance etc. Nothing testable by a user yet.

Idea on how to get this to master

One of the big questions that remained was how do we actually get this into master. Here is my current idea:
When talking about the proposal with other developers, a question that came up was: How do we deal with annotations? Currently, grease pencil and annotations use the same underlying data. But since grease pencil became it’s own object, they have drifted further and further apart. I think it would be a good idea to make them two separate IDs and clearly define them as different. Since we can use the current grease pencil data (bGPdata) as a basis for the annotations, the idea for the new data would look something like this:

  1. Add a new grease pencil ID for the new data structure (maybe ID_GP ?).
  2. At some point: Rename the current grease pencil ID_GD to something like ID_AN for annotations. The data structure (bGPdata) remains in the code for annotations as well as conversion/versioning.
  3. Slowly move all the functionality to the new ID. Slowly deprecate functionality in the old ID that’s not needed for annotations.

Since the new development would happen on a new ID, it could be done in master. Maybe behind an experimental flag. Conversion code would then convert between the old and new ID to make sure everything keeps working while the new ID is introduced. Finally all .blend files should use the new ID for grease pencil data and the old ID for annotation data.

8 Likes