Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/keyframes_draw.c
| Context not available. | |||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_gpencil_types.h" | #include "DNA_gpencil_types.h" | ||||
| #include "DNA_brush_types.h" | |||||
| #include "DNA_mask_types.h" | #include "DNA_mask_types.h" | ||||
| #include "BKE_fcurve.h" | #include "BKE_fcurve.h" | ||||
| Context not available. | |||||
| BLI_dlrbTree_init(&keys); | BLI_dlrbTree_init(&keys); | ||||
| gpencil_to_keylist(ads, gpd, &keys); | gpencil_to_keylist(ads, gpd, &keys, false); | ||||
| BLI_dlrbTree_linkedlist_sync(&keys); | BLI_dlrbTree_linkedlist_sync(&keys); | ||||
| Context not available. | |||||
| } | } | ||||
| void gpencil_to_keylist(bDopeSheet *ads, bGPdata *gpd, DLRBT_Tree *keys) | void gpencil_to_keylist(bDopeSheet *ads, bGPdata *gpd, DLRBT_Tree *keys, const bool active) | ||||
| { | { | ||||
| bGPDlayer *gpl; | bGPDlayer *gpl; | ||||
| Context not available. | |||||
| /* for now, just aggregate out all the frames, but only for visible layers */ | /* for now, just aggregate out all the frames, but only for visible layers */ | ||||
| for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { | for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { | ||||
| if ((gpl->flag & GP_LAYER_HIDE) == 0) { | if ((gpl->flag & GP_LAYER_HIDE) == 0) { | ||||
| gpl_to_keylist(ads, gpl, keys); | if ((!active) || ((active) && (gpl->flag & GP_LAYER_SELECT))) { | ||||
| gpl_to_keylist(ads, gpl, keys); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||