From b6c28002acb802dcad8a23c0721209103f00f686 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 30 Jun 2022 12:14:22 +1000 Subject: Cleanup: spelling in comments --- source/blender/editors/include/ED_gpencil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/include/ED_gpencil.h') diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 0943636a452..d844bd59c9d 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -239,7 +239,7 @@ void ED_annotation_draw_ex( /* ----------- Grease-Pencil AnimEdit API ------------------ */ /** - * Loops over the gp-frames for a gp-layer, and applies the given callback. + * Loops over the GP-frames for a GP-layer, and applies the given callback. */ bool ED_gpencil_layer_frames_looper(struct bGPDlayer *gpl, struct Scene *scene, -- cgit v1.2.3 From 92d7f9ac56e0ff1e65c364487542dfb7c32a0a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Am=C3=A9lie=20Fondevilla?= Date: Thu, 30 Jun 2022 15:16:05 +0200 Subject: Animation: Add GP layers in regular Dopesheet Grease Pencil animation channels are now also shown in the Dopesheet mode of the Dopesheet editor and in the Timeline. Grease pencil related events are now listened not only by container `SACTCONT_GPENCIL` (Grease Pencil Dopesheet), but also `SACTCONT_DOPESHEET` (main Dopesheet), and `SACTCONT_TIMELINE` (timeline). A new Animation Filter flag was added: `ANIMFILTER_FCURVESONLY`. For now this only filters out Grease Pencil Layer channels. **Implemented:** - Preview range set: now only considers selected Grease Pencil keyframes when `onlySel` parameter is true. Not only this allows the operator to work with grease pencil keyframes in main dopesheet, but it also fixes the operator in the Grease Pencil dopesheet. - Translation: allocation (and freeing) of specific memory for translation of Grease Pencil keyframes. - Copy/Paste: call to both Fcurve and GPencil operators, to allow for mixed selection. Errors are only reported when both the FCurve and GPencil functions fail to paste anything. - Keyframe Type change and Insert Keyframe: removed some code here to unify Grease Pencil dopesheet and main dopesheet code. - Jump, Snap, Mirror, Select all/box/lasso/circle, Select left/right, Clickselect: account for Grease Pencil channels within the channels loop, no need for `ANIMFILTER_FCURVESONLY` there. **Not Implemented:** - Graph-related operators. The filter `ANIMFILTER_FCURVESONLY` is naively added to all graph-related operators, meaning more-or-less all operators that used `ANIMFILTER_CURVE_VISIBLE`. - Select linked: is for F-curves channel only - Select more/less: not yet implemented for grease pencil layers. - Clean Keys, Sample, Extrapolation, Interpolation, Easing, and Handle type change: work on Fcurve-channels only, so the `ANIMFILTER_FCURVESONLY` filter is activated Graying out these operators (when no fcurve keyframe is selected) can be done with custom poll functions BUT may affect performance. This is NOT done in this patch. **Dopesheet Summary Selection:** The main summary of the dopesheet now also takes into account Grease Pencil keyframes, using some nasty copy/pasting of code, as explained [on devtalk](https://devtalk.blender.org/t/gpencil-layers-integration-in-main-dopesheet-selection-issue/24527). It works, but may be improved, providing some deeper changes. Reviewed By: mendio, pepeland, sybren Maniphest Tasks: T97477 Differential Revision: https://developer.blender.org/D15003 --- source/blender/editors/include/ED_gpencil.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/include/ED_gpencil.h') diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index d844bd59c9d..b6488d6da56 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -280,6 +280,11 @@ void ED_gpencil_select_frames(struct bGPDlayer *gpl, short select_mode); */ void ED_gpencil_select_frame(struct bGPDlayer *gpl, int selx, short select_mode); +/** + * Set the layer's channel as active + */ +void ED_gpencil_set_active_channel(struct bGPdata *gpd, struct bGPDlayer *gpl); + /** * Delete selected frames. */ -- cgit v1.2.3 From 5bd1d63115e2867c90c1426ff506a2cc3823f3ef Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 21 Aug 2022 14:54:03 +1000 Subject: Cleanup: move model authors from the doc-string to the implementation There is no need for details like this in API doc-strings. --- source/blender/editors/include/ED_gpencil.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/include/ED_gpencil.h') diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index b6488d6da56..bf021d68cec 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -403,12 +403,11 @@ void ED_gpencil_stroke_init_data(struct bGPDstroke *gps, */ void ED_gpencil_create_blank(struct bContext *C, struct Object *ob, float mat[4][4]); /** - * Add a 2D Suzanne (original model created by Matias Mendiola). + * Add a 2D Suzanne. */ void ED_gpencil_create_monkey(struct bContext *C, struct Object *ob, float mat[4][4]); /** - * Add a Simple stroke with colors - * (original design created by Daniel M. Lara and Matias Mendiola). + * Add a Simple stroke with colors. */ void ED_gpencil_create_stroke(struct bContext *C, struct Object *ob, float mat[4][4]); /** -- cgit v1.2.3