With the development of GP 3.0 now starting, I ran into a naming issue that I need to be addressed.
In the current grease pencil IDTypeInfo, the name_plural is "grease_pencils". And this is the only place where it clashes with the new naming I’d like to use for GP 3.0 (explicitly writing out “grease pencil” instead of e.g. “gpencil”/“gpd”, etc.).
I am not sure what plural_name to use for the new ID data type.
EDIT: I guess one possible idea (albeit ugly) is to discard the underscore and use greasepencils.
This string is used by BKE_idtype_idcode_to_name_plural. And this is used by the python API (bpy.data.grease_pencils...) as well as the linking code. So there is probably not a way to reuse the same name, especially since we expect both the old and the new ID to exist for at least some versions.
I’m not sure what you mean be usage in the linking code? The Python API for linking in bpy_library_load.c?
Another way would be to name it grease_pencils_new and then rename to grease_pencils when the old data structures get removed. That would be an API break for this experimental feature, but it would happen as the same time as breaking the old grease pencil API so maybe it’s not so bad.
Ah, I could not find anything like that grepping for name_plural.
“New” could work, or “Experimental” and grease_pencils_experimental. I guess this would mainly be shown when the experimental feature is enabled, as we did for the pointcloud/hair/volume databocks before.
If the plan is to leave the new grease pencil in experimental until we can fully deprecated the old then I guess this can work. This would probably mean that there won’t be a 4.0 release with the new grease pencil though.
I assumed making it non-experimental and removing the old one would be done at the same time. I’m not sure that we should have a Blender release where both are officially supported? The UI could be messy, add-ons would need to support both or confusingly only work for one or the other.
I agree with this, yes. Having both would be messy. I think the idea of them being both in a version was that it would nice to have in a big release like 4.0 (with maybe not full coverage of the features of the old GP). But yes, that does not seem like a good plan if we then have to support two python APIs, versioning, etc., etc. So if we don’t get to feature parity by 4.0, I would be fine with waiting for later (5.0 probably).
We have to keep in mind though that the old grease pencil structures have to remain anyways because they are used by the annotations. But we might be able to make them explicitly about annotations and deprecate all the functionality related to grease pencil only.