47 const bool do_sel_only,
48 const bool include_handles)
52 ListBase anim_data = {
nullptr,
nullptr};
70 *xmax = -999999999.0f;
76 *ymax = -999999999.0f;
80 if (anim_data.
first) {
81 bool foundBounds =
false;
88 float unitFac, offset;
109 if ((xmin) && (
bounds.xmin < *xmin)) {
112 if ((xmax) && (
bounds.xmax > *xmax)) {
115 if ((ymin) && (
bounds.ymin < *ymin)) {
118 if ((ymax) && (
bounds.ymax > *ymax)) {
128 if ((xmin && xmax) && (
fabsf(*xmax - *xmin) < 0.001f)) {
132 if ((ymin && ymax) && (
fabsf(*ymax - *ymin) < 0.001f)) {
199 if (ac.
scene ==
nullptr) {
221 ot->
name =
"Set Preview Range to Selected";
222 ot->
idname =
"GRAPH_OT_previewrange_set";
223 ot->
description =
"Set Preview Range based on range of selected keyframes";
241 const bool do_sel_only,
242 const bool include_handles,
243 const int smooth_viewtx)
304 ot->
description =
"Reset viewable area to show full keyframe range";
319 "Include handles of keyframes when calculating extents");
325 ot->
name =
"Frame Selected";
326 ot->
idname =
"GRAPH_OT_view_selected";
327 ot->
description =
"Reset viewable area to show selected keyframe range";
342 "Include handles of keyframes when calculating extents");
361 ot->
name =
"Go to Current Frame";
386 ListBase anim_data = {
nullptr,
nullptr};
394 printf(
"Error: Frame range for Ghost F-Curve creation is inappropriate\n");
411 float unitFac, offset;
426 gcu->
totvert = end - start + 1;
429 for (cfra = start; cfra <= end; cfra++, fpt++) {
485 ot->
name =
"Create Ghost Curves";
486 ot->
idname =
"GRAPH_OT_ghost_curves_create";
488 "Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor";
535 ot->
name =
"Clear Ghost Curves";
536 ot->
idname =
"GRAPH_OT_ghost_curves_clear";
537 ot->
description =
"Clear F-Curve snapshots (Ghosts) for active Graph Editor";
ScrArea * CTX_wm_area(const bContext *C)
FCurve * BKE_fcurve_create(void)
void BKE_fcurves_free(ListBase *list)
float fcurve_samplingcb_evalcurve(FCurve *fcu, void *data, float evaltime)
bool BKE_fcurve_calc_bounds(const FCurve *fcu, bool selected_keys_only, bool include_handles, const float frame_range[2], rctf *r_bounds)
float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
void BLI_rctf_resize_y(struct rctf *rect, float y)
void BLI_rctf_pad_y(struct rctf *rect, float boundary_size, float pad_min, float pad_max)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
@ USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_CURVE_VISIBLE
void ED_area_tag_redraw(ScrArea *area)
bool ED_operator_graphedit_active(bContext *C)
Read Guarded memory(de)allocation.
void UI_view2d_smooth_view(const bContext *C, ARegion *region, const rctf *cur, int smooth_viewtx)
#define UI_MARKER_MARGIN_Y
#define V2D_SCROLL_HANDLE_HEIGHT
#define UI_TIME_SCRUB_MARGIN_Y
void ANIM_animdata_freelist(ListBase *anim_data)
short ANIM_get_normalization_flags(SpaceLink *space_link)
AnimData * ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
void ANIM_center_frame(bContext *C, int smooth_viewtx)
rctf ANIM_frame_range_view2d_add_xmargin(const View2D &view_2d, const rctf view_rect)
float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short flag, float *r_offset)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, const eAnimFilter_Flags filter_mode, void *data, const eAnimCont_Types datatype)
ListBase * ED_context_get_markers(const bContext *C)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
bool graphop_visible_keyframes_poll(bContext *C)
static int graphkeys_previewrange_exec(bContext *C, wmOperator *)
static int graphkeys_view_selected_exec(bContext *C, wmOperator *op)
static int graphkeys_view_frame_exec(bContext *C, wmOperator *op)
static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *)
void GRAPH_OT_ghost_curves_create(wmOperatorType *ot)
void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, const bool do_sel_only, const bool include_handles)
void GRAPH_OT_view_all(wmOperatorType *ot)
void GRAPH_OT_view_frame(wmOperatorType *ot)
void GRAPH_OT_view_selected(wmOperatorType *ot)
void GRAPH_OT_previewrange_set(wmOperatorType *ot)
void GRAPH_OT_ghost_curves_clear(wmOperatorType *ot)
static int graphkeys_viewall_exec(bContext *C, wmOperator *op)
static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *)
static void create_ghost_curves(bAnimContext *ac, int start, int end)
static int graphkeys_viewall(bContext *C, const bool do_sel_only, const bool include_handles, const int smooth_viewtx)
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
void *(* MEM_callocN)(size_t len, const char *str)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
SpaceGraph_Runtime runtime
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_smooth_viewtx_get(const wmOperator *op)