The following code describes the proposed structure of the new grease pencil data-block:
The new data-block will be ID_GP
and the old one will be renamed to ID_GD_LEGACY
. Also, there will be a new object type OB_GPENCIL
and the old one will be renamed to OB_GPENCIL_LEGACY
.
In order to not have to redefine all the operator types, the operators will have a switch on the object type. If it's OB_GPENCIL_LEGACY
they will run the old behavior, and with OB_GPENCIL
they will run the new functions.
The idea is that at some point we can deprecate OB_GPENCIL_LEGACY
and remove the switch and all the old functions.
As a first step the plan is to read the current frame of a grease pencil object as a single CurvesGeometry
and feed this to geometry nodes as the input. All the curves get a layer_id
so that they can be seperated into the layers if needed. The output will also be a single CurvesGeometry
.
EDIT: Some concerns have been raised with this approach. Will have to be discussed further.
In order to allow for more granular copy-on-write updates, there will be a way to tag a single grease pencil drawing for an update. The exact way of how this will be implemented still has to be decided on. Either we add new flags that are specific to grease pencil, or there is a more general solution.