Convert mesh objects to grease pencil, optionally preserve mesh faces as
filled shapes, and convert crease edges into strokes. Following options
are available:
- Whether to convert faces to filled strokes.
- Stroke thickness.
- Stroke offset (Using normal direction to lift strokes out of mesh
surfaces).
Note that "Crease Angle" option from legacy grease pencil is not ported
to this implementation. This option is deemed more suitable for using
geometry nodes to achieve.
Resolves#126480
Pull Request: https://projects.blender.org/blender/blender/pulls/131854
This patch implements Font to Curves, Legacy curves to Grease Pencil and
Font to Grease Pencil conversions.
Note that Font to Grease Pencil is done by converting Font to Curves
then converting Curves to Grease Pencil. Currently we do not have
direct conversion APIs.
Part of #131595 and #130518
Pull Request: https://projects.blender.org/blender/blender/pulls/131612
Adding object conversion tests to verify the refactored object type
conversion code works as intended.
The object conversion operator `exec()` function is restructured by
PR #130668 to clean up code path for better readability, since it's a
relatively big change, this test is put up to verify that:
- For supported object type pairs, converted objects would have the
expected target object type.
- For unsupported/unimplemented type pairs, the test expect the
converted object to have the same type as the source object.
- Verify that the code behaviour stays exactly the same as prior
to the change in #130668, including code logic that are later subject
to change and redesign, in which case this test file/script would need
to be updated accrodingly.
This test added such files:
- `tests/data/modelling/object_conversion.blend`: Sets up differnt types
of input objects and their expected converted object combinations.
- `tests/python/object_conversion.py`: Does mesh equal checks for
objects that are converted to mesh against expected objects in the
blend file, and does object type checks for other target types.
Note:
This test currently does not do topology-level equal check except for
when target object type is `MESH`. Equal check hasn't been implemented
for other object types yet, but ideally in the future we should use
topology check on top of type check for other object types as well.
See https://projects.blender.org/blender/blender/pulls/130668
Pull Request: https://projects.blender.org/blender/blender/pulls/130738