Commit Graph

6 Commits

Author SHA1 Message Date
Antonio Vazquez 47b6c33258 GPencil: New BKE function for setting random vertex color
This function is very handy for debug purposes.
2020-07-22 11:16:45 +02:00
Sebastian Parborg 0bfec04cd5 Fix T72621: Transform object origin support for grease-pencil
Added support for transforming only origins with greasepencil objects.

The new functions is based on BKE_gpencil_transform. That is why there is FIXME statements in there.

Reviewed By: Campbell, Antonio

Differential Revision: http://developer.blender.org/D8303
2020-07-21 12:13:03 +02:00
Antonio Vazquez ae4098e234 GPencil: Fix unreported error baking mesh animation
When the mesh is linked, the materials can not be available or be the same assigned to mesh. Now, if the mesh is linked, a simple two materials conversion is used.

To get the full list of materials, the mesh must not be linked.

Also checked some indexes to be sure never get a wrong value and that materials are not created again and again.
2020-07-15 17:26:27 +02:00
Antonio Vazquez bc7a4b126a GPencil: Convert and Bake mesh animation to grease pencil strokes
This patch adds two options:

- Convert a mesh to grease pencil strokes.
- Bake the mesh animation into grease pencil strokes.

Both are related and must be included in the same patch.

Related to tasks: T77629 and T77630

Notice: The conversion is done for mesh edges and it's not considering any visibility clipping. All edges are exported, no matters if it's visible or not.

Example of Convert a Mesh to Grease Pencil strokes:

{F8606028}

This conversion was inspired by the technique used by @luamono in this tweet: https://twitter.com/luamono/status/1239983662176841730

Example of Bake Animation (the video is a little outdate, but the basic functionality is the same, only small changes in UI):

{F8606032}

Reviewed By: mendio, pepeland

Maniphest Tasks: T77629, T77630

Differential Revision: https://developer.blender.org/D7983
2020-06-16 15:28:46 +02:00
Antonio Vazquez a5ffc6309e GPencil: Split Curve geometry functions to new file
This prepare the code for future curve editors
2020-05-06 18:14:05 +02:00
Antonio Vazquez 6e39445f80 GPencil: Cleanup - Split BKE_gpencil.h geometry functions into BKE_gpencil_geom.h
This split prepare the code for future geometry functions.
2020-03-19 11:38:22 +01:00