|
Blender
V2.93
|
#include <math.h>#include <stddef.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_utildefines.h"#include "DNA_gpencil_types.h"#include "DNA_scene_types.h"#include "BKE_fcurve.h"#include "BKE_gpencil.h"#include "BKE_report.h"#include "ED_anim_api.h"#include "ED_gpencil.h"#include "ED_keyframes_edit.h"#include "ED_markers.h"#include "WM_api.h"#include "DEG_depsgraph.h"Go to the source code of this file.
Variables | |
| static ListBase | gpencil_anim_copybuf = {NULL, NULL} |
| static int | gpencil_anim_copy_firstframe = 999999999 |
| static int | gpencil_anim_copy_lastframe = -999999999 |
| static int | gpencil_anim_copy_cfra = 0 |
| bool ED_gpencil_anim_copybuf_copy | ( | bAnimContext * | ac | ) |
Definition at line 341 of file editaction_gpencil.c.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_LIST_VISIBLE, ANIMFILTER_NODUPLIS, BKE_gpencil_frame_duplicate(), BKE_report(), BLI_addtail(), BLI_assert, BLI_listbase_is_empty(), BLI_movelisttolist(), BLI_strncpy(), CFRA, bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, ED_gpencil_anim_copybuf_free(), ELEM, filter(), ListBase::first, bGPDlayer::frames, GP_FRAME_SELECT, gpencil_anim_copy_cfra, gpencil_anim_copy_firstframe, gpencil_anim_copy_lastframe, gpencil_anim_copybuf, bGPDlayer::info, ListBase::last, LISTBASE_FOREACH, MEM_callocN, bAnimListElem::next, NULL, bAnimContext::reports, RPT_ERROR, scene, and bAnimContext::scene.
Referenced by actkeys_copy_exec().
| void ED_gpencil_anim_copybuf_free | ( | void | ) |
Definition at line 326 of file editaction_gpencil.c.
References BKE_gpencil_free_layers(), BLI_listbase_clear(), gpencil_anim_copy_cfra, gpencil_anim_copy_firstframe, gpencil_anim_copy_lastframe, and gpencil_anim_copybuf.
Referenced by ED_gpencil_anim_copybuf_copy(), and WM_exit_ex().
| bool ED_gpencil_anim_copybuf_paste | ( | bAnimContext * | ac, |
| const short | offset_mode | ||
| ) |
Definition at line 410 of file editaction_gpencil.c.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FOREDIT, ANIMFILTER_LIST_VISIBLE, ANIMFILTER_NODUPLIS, ANIMFILTER_SEL, BKE_gpencil_layer_frame_delete(), BKE_gpencil_layer_frame_get(), BKE_gpencil_stroke_duplicate(), BKE_report(), BLI_addtail(), BLI_listbase_is_empty(), CFRA, bAnimContext::data, bAnimListElem::data, bAnimContext::datatype, DEG_id_tag_update(), filter(), ListBase::first, bGPDframe::framenum, GP_GETFRAME_ADD_NEW, gpencil_anim_copy_cfra, gpencil_anim_copy_firstframe, gpencil_anim_copy_lastframe, gpencil_anim_copybuf, bAnimListElem::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, bGPDlayer::info, KEYFRAME_PASTE_OFFSET_CFRA_END, KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, KEYFRAME_PASTE_OFFSET_CFRA_START, KEYFRAME_PASTE_OFFSET_NONE, ListBase::last, bAnimListElem::next, bGPDstroke::next, NULL, bAnimContext::reports, RPT_ERROR, scene, bAnimContext::scene, and STREQ.
Referenced by actkeys_paste_exec().
| bool ED_gpencil_layer_frame_select_check | ( | bGPDlayer * | gpl | ) |
Definition at line 112 of file editaction_gpencil.c.
References bGPDlayer::frames, GP_FRAME_SELECT, LISTBASE_FOREACH, and NULL.
Referenced by deselect_action_keys().
| void ED_gpencil_layer_frame_select_set | ( | bGPDlayer * | gpl, |
| short | mode | ||
| ) |
Definition at line 165 of file editaction_gpencil.c.
References ED_gpencil_select_frames(), and NULL.
Referenced by deselect_action_keys().
| bool ED_gpencil_layer_frames_delete | ( | bGPDlayer * | gpl | ) |
Definition at line 245 of file editaction_gpencil.c.
References BKE_gpencil_layer_frame_delete(), bGPDlayer::frames, GP_FRAME_SELECT, LISTBASE_FOREACH_MUTABLE, and NULL.
Referenced by delete_action_keys().
| void ED_gpencil_layer_frames_duplicate | ( | bGPDlayer * | gpl | ) |
Definition at line 266 of file editaction_gpencil.c.
References BKE_gpencil_frame_duplicate(), BLI_insertlinkafter(), bGPDlayer::frames, GP_FRAME_SELECT, LISTBASE_FOREACH_MUTABLE, and NULL.
Referenced by duplicate_action_keys().
| void ED_gpencil_layer_frames_keytype_set | ( | bGPDlayer * | gpl, |
| short | type | ||
| ) |
Set keyframe type for selected frames from given gp-layer
| type | The type of keyframe (eBezTriple_KeyframeType) to set selected frames to. |
Definition at line 294 of file editaction_gpencil.c.
References bGPDlayer::frames, GP_FRAME_SELECT, LISTBASE_FOREACH, NULL, and type.
Referenced by setkeytype_gpencil_keys().
| bool ED_gpencil_layer_frames_looper | ( | bGPDlayer * | gpl, |
| Scene * | scene, | ||
| bool(*)(bGPDframe *, Scene *) | gpf_cb | ||
| ) |
Definition at line 61 of file editaction_gpencil.c.
References bGPDlayer::frames, LISTBASE_FOREACH, NULL, and scene.
Referenced by ED_gpencil_layer_mirror_frames(), and ED_gpencil_layer_snap_frames().
| void ED_gpencil_layer_frames_select_box | ( | bGPDlayer * | gpl, |
| float | min, | ||
| float | max, | ||
| short | select_mode | ||
| ) |
Definition at line 193 of file editaction_gpencil.c.
References bGPDlayer::frames, gpencil_frame_select(), IN_RANGE, LISTBASE_FOREACH, max, min, and NULL.
Referenced by actkeys_select_leftright(), box_select_elem(), and markers_selectkeys_between().
| void ED_gpencil_layer_frames_select_region | ( | KeyframeEditData * | ked, |
| bGPDlayer * | gpl, | ||
| short | tool, | ||
| short | select_mode | ||
| ) |
Definition at line 208 of file editaction_gpencil.c.
References BEZT_OK_CHANNEL_CIRCLE, BEZT_OK_CHANNEL_LASSO, KeyframeEditData::channel_y, KeyframeEditData::data, bGPDlayer::frames, gpencil_frame_select(), keyframe_region_circle_test(), keyframe_region_lasso_test(), LISTBASE_FOREACH, and NULL.
Referenced by region_select_elem().
Definition at line 86 of file editaction_gpencil.c.
References BLI_addtail(), CfraElem::cfra, ELEM, float(), bGPDlayer::frames, GP_FRAME_SELECT, LISTBASE_FOREACH, MEM_callocN, NULL, and CfraElem::sel.
Referenced by columnselect_action_keys().
Definition at line 661 of file editaction_gpencil.c.
References ED_gpencil_layer_frames_looper(), gpencil_frame_mirror_cframe(), gpencil_frame_mirror_marker(), gpencil_frame_mirror_xaxis(), gpencil_frame_mirror_yaxis(), MIRROR_KEYS_CURFRAME, MIRROR_KEYS_MARKER, MIRROR_KEYS_XAXIS, MIRROR_KEYS_YAXIS, NULL, and scene.
Referenced by mirror_action_keys().
Definition at line 559 of file editaction_gpencil.c.
References ED_gpencil_layer_frames_looper(), gpencil_frame_snap_cframe(), gpencil_frame_snap_nearest(), gpencil_frame_snap_nearestsec(), gpencil_frame_snap_nearmarker(), scene, SNAP_KEYS_CURFRAME, SNAP_KEYS_NEARFRAME, SNAP_KEYS_NEARMARKER, and SNAP_KEYS_NEARSEC.
Referenced by snap_action_keys().
| void ED_gpencil_select_frame | ( | bGPDlayer * | gpl, |
| int | selx, | ||
| short | select_mode | ||
| ) |
Definition at line 177 of file editaction_gpencil.c.
References BKE_gpencil_layer_frame_find(), gpencil_frame_select(), and NULL.
Referenced by actkeys_mselect_column(), actkeys_mselect_single(), and columnselect_action_keys().
| void ED_gpencil_select_frames | ( | bGPDlayer * | gpl, |
| short | select_mode | ||
| ) |
Definition at line 151 of file editaction_gpencil.c.
References bGPDlayer::frames, gpencil_frame_select(), LISTBASE_FOREACH, and NULL.
Referenced by actkeys_mselect_channel_only(), and ED_gpencil_layer_frame_select_set().
Definition at line 582 of file editaction_gpencil.c.
References CFRA, KDL::diff(), bGPDframe::flag, bGPDframe::framenum, and GP_FRAME_SELECT.
Referenced by ED_gpencil_layer_mirror_frames().
Definition at line 619 of file editaction_gpencil.c.
References KDL::diff(), ED_markers_get_first_selected(), bGPDframe::flag, TimeMarker::frame, bGPDframe::framenum, GP_FRAME_SELECT, initialized, Scene::markers, NULL, and scene.
Referenced by ED_gpencil_layer_mirror_frames().
Definition at line 606 of file editaction_gpencil.c.
References KDL::diff(), bGPDframe::flag, bGPDframe::framenum, and GP_FRAME_SELECT.
Referenced by ED_gpencil_layer_mirror_frames().
Definition at line 594 of file editaction_gpencil.c.
References KDL::diff(), bGPDframe::flag, bGPDframe::framenum, and GP_FRAME_SELECT.
Referenced by ED_gpencil_layer_mirror_frames().
|
static |
Definition at line 131 of file editaction_gpencil.c.
References bGPDframe::flag, GP_FRAME_SELECT, NULL, SELECT_ADD, SELECT_INVERT, and SELECT_SUBTRACT.
Referenced by ED_gpencil_layer_frames_select_box(), ED_gpencil_layer_frames_select_region(), ED_gpencil_select_frame(), and ED_gpencil_select_frames().
Definition at line 541 of file editaction_gpencil.c.
References CFRA, bGPDframe::flag, bGPDframe::framenum, and GP_FRAME_SELECT.
Referenced by ED_gpencil_layer_snap_frames().
Definition at line 522 of file editaction_gpencil.c.
References floor(), and GP_FRAME_SELECT.
Referenced by ED_gpencil_layer_snap_frames().
Definition at line 532 of file editaction_gpencil.c.
References bGPDframe::flag, float(), floorf, FPS, bGPDframe::framenum, and GP_FRAME_SELECT.
Referenced by ED_gpencil_layer_snap_frames().
Definition at line 549 of file editaction_gpencil.c.
References ED_markers_find_nearest_marker_time(), bGPDframe::flag, bGPDframe::framenum, GP_FRAME_SELECT, Scene::markers, and scene.
Referenced by ED_gpencil_layer_snap_frames().
|
static |
Definition at line 323 of file editaction_gpencil.c.
Referenced by ED_gpencil_anim_copybuf_copy(), ED_gpencil_anim_copybuf_free(), and ED_gpencil_anim_copybuf_paste().
|
static |
Definition at line 321 of file editaction_gpencil.c.
Referenced by ED_gpencil_anim_copybuf_copy(), ED_gpencil_anim_copybuf_free(), and ED_gpencil_anim_copybuf_paste().
|
static |
Definition at line 322 of file editaction_gpencil.c.
Referenced by ED_gpencil_anim_copybuf_copy(), ED_gpencil_anim_copybuf_free(), and ED_gpencil_anim_copybuf_paste().
Definition at line 320 of file editaction_gpencil.c.
Referenced by ED_gpencil_anim_copybuf_copy(), ED_gpencil_anim_copybuf_free(), and ED_gpencil_anim_copybuf_paste().