diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-06-01 17:38:21 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-06-01 17:38:21 +0300 |
commit | 72a360827bc47e68bf47a5aa4ad9185b031423c4 (patch) | |
tree | c0e27dc580fca576dc7e3fc0ee21db2559d0f80c /source/blender/draw/intern/draw_common.h | |
parent | 44a8070db3c03a4e12d1ec1ca15432ec2b36e2fc (diff) |
T54991: Restore support for Motion Path drawing in 2.8
This commit restores support for Motion Path drawing in 2.8 (as it wasn't ported over
to the new draw engines earlier, and the existing space_view3d/drawanimviz.c code was
removed during the Blender Internal removal).
Notes:
* Motion Paths are now implemented as an overlay (enabled by default).
Therefore, you can turn all of them on/off from the "Overlays" popover
* By and large, we have kept the same draw style as was used in 2.7
Further changes can happen later following further design work.
* One change from 2.7 is that thicker lines are used by default (2px vs 1px)
Todo's:
* There are some bad-level calls introduced here (i.e. the actgroup_to_keylist() stuff).
These were introduced to optimise drawing performance (by avoiding full keyframes -> keylist
conversion step on each drawcall). Instead, this has been moved to the calculation step
(in blenkernel). Soon, there will be some cleanups/improvements with those functions,
so until then, we'll keep the bad level calls.
Credits:
* Clément Foucault (fclem) - Draw Engine magic + Shader Conversion/Optimisation
* Joshua Leung (Aligorith) - COW fixes, UI integration, etc.
Revision History:
See "tmp-b28-motionpath_drawing" branch (rBa12ab5b2ef49ccacae091ccb54d72de0d63f990d)
Diffstat (limited to 'source/blender/draw/intern/draw_common.h')
-rw-r--r-- | source/blender/draw/intern/draw_common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_common.h b/source/blender/draw/intern/draw_common.h index 49a1ae42198..e4c038006b5 100644 --- a/source/blender/draw/intern/draw_common.h +++ b/source/blender/draw/intern/draw_common.h @@ -87,6 +87,10 @@ typedef struct GlobalsUboStorage { float colorNurbSelUline[4]; float colorActiveSpline[4]; + float colorBonePose[4]; + + float colorCurrentFrame[4]; + float colorGrid[4]; float colorGridEmphasise[4]; float colorGridAxisX[4]; @@ -131,6 +135,9 @@ struct DRWShadingGroup *shgroup_instance_bone_sphere_outline(struct DRWPass *pas struct DRWShadingGroup *shgroup_instance_bone_sphere_solid(struct DRWPass *pass); struct DRWShadingGroup *shgroup_instance_bone_stick(struct DRWPass *pass); +struct GPUShader *mpath_line_shader_get(void); +struct GPUShader *mpath_points_shader_get(void); + int DRW_object_wire_theme_get( struct Object *ob, struct ViewLayer *view_layer, float **r_color); float *DRW_color_background_blend_get(int theme_id); |