GPencil: New modules for Import and Export

This patch adds support to export and import grease pencil in several formats.

Inlude:

* Export SVG
* Export PDF (always from camera view)

* Import SVG

The import and export only support solid colors and not gradients or textures.

Requires libharu and pugixml.

For importing SVG, the NanoSVG lib is used, but this does not require installation (just a .h file embedded in the project  folder)

Example of PDF export: https://youtu.be/BMm0KeMJsI4

Reviewed By: #grease_pencil, HooglyBoogly

Maniphest Tasks: T83190, T79875, T83191, T83192

Differential Revision: https://developer.blender.org/D10482
This commit is contained in:
2021-03-24 15:14:43 +01:00
committed by Antonio Vazquez
parent ce359da5b3
commit a8a92cd15a
30 changed files with 6990 additions and 2 deletions

View File

@@ -65,6 +65,8 @@ static PyStructSequence_Field app_builtopts_info_fields[] = {
{"fluid", NULL},
{"xr_openxr", NULL},
{"potrace", NULL},
{"pugixml", NULL},
{"haru", NULL},
/* Sentinel (this line prevents `clang-format` wrapping into columns). */
{NULL},
};
@@ -311,6 +313,18 @@ static PyObject *make_builtopts_info(void)
SetObjIncref(Py_False);
#endif
#ifdef WITH_PUGIXML
SetObjIncref(Py_True);
#else
SetObjIncref(Py_False);
#endif
#ifdef WITH_HARU
SetObjIncref(Py_True);
#else
SetObjIncref(Py_False);
#endif
#undef SetObjIncref
return builtopts_info;