|
Blender
V2.93
|
#include <float.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_string.h"#include "DNA_anim_types.h"#include "DNA_scene_types.h"#include "RNA_access.h"#include "RNA_define.h"#include "BLT_translation.h"#include "BKE_context.h"#include "UI_interface.h"#include "ED_anim_api.h"#include "ED_keyframes_edit.h"#include "ED_numinput.h"#include "ED_screen.h"#include "WM_api.h"#include "WM_types.h"#include "graph_intern.h"Go to the source code of this file.
Classes | |
| struct | tDecimateGraphOp |
| struct | tBeztCopyData |
Typedefs | |
| typedef struct tDecimateGraphOp | tDecimateGraphOp |
| typedef struct tBeztCopyData | tBeztCopyData |
| typedef enum tDecimModes | tDecimModes |
Enumerations | |
| enum | tDecimModes { DECIM_RATIO = 1 , DECIM_ERROR } |
Functions | |
| static void | decimate_graph_keys (bAnimContext *ac, float remove_ratio, float error_sq_max) |
| static void | decimate_reset_bezts (tDecimateGraphOp *dgo) |
| static void | decimate_exit (bContext *C, wmOperator *op) |
| static void | decimate_draw_status_header (wmOperator *op, tDecimateGraphOp *dgo) |
| static void | decimate_mouse_update_percentage (tDecimateGraphOp *dgo, wmOperator *op, const wmEvent *event) |
| static int | graphkeys_decimate_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | graphkeys_decimate_modal_update (bContext *C, wmOperator *op) |
| static int | graphkeys_decimate_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static int | graphkeys_decimate_exec (bContext *C, wmOperator *op) |
| static bool | graphkeys_decimate_poll_property (const bContext *UNUSED(C), wmOperator *op, const PropertyRNA *prop) |
| static char * | graphkeys_decimate_desc (bContext *UNUSED(C), wmOperatorType *UNUSED(op), PointerRNA *ptr) |
| void | GRAPH_OT_decimate (wmOperatorType *ot) |
Variables | |
| static const EnumPropertyItem | decimate_mode_items [] |
| typedef struct tBeztCopyData tBeztCopyData |
| typedef struct tDecimateGraphOp tDecimateGraphOp |
| typedef enum tDecimModes tDecimModes |
| enum tDecimModes |
| Enumerator | |
|---|---|
| DECIM_RATIO | |
| DECIM_ERROR | |
Definition at line 105 of file graph_slider_ops.c.
|
static |
Definition at line 182 of file graph_slider_ops.c.
References tDecimateGraphOp::area, BLI_snprintf(), ED_area_status_text(), hasNumInput(), tDecimateGraphOp::num, NUM_STR_REP_LEN, outputNumInput(), tDecimateGraphOp::percentage_prop, wmOperator::ptr, RNA_property_float_get(), tDecimateGraphOp::scene, TIP_, UI_MAX_DRAW_STR, and Scene::unit.
Referenced by graphkeys_decimate_invoke(), and graphkeys_decimate_modal_update().
|
static |
Definition at line 151 of file graph_slider_ops.c.
References blender::compositor::area(), tDecimateGraphOp::area, tDecimateGraphOp::bezt_arr_list, BLI_freelistN(), C, copy(), CTX_wm_window(), wmOperator::customdata, LinkData::data, ED_area_status_text(), ListBase::first, MEM_freeN, LinkData::next, NULL, and WM_cursor_modal_restore().
Referenced by graphkeys_decimate_invoke(), and graphkeys_decimate_modal().
|
static |
Definition at line 57 of file graph_slider_ops.c.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_animdata_update(), ANIM_UPDATE_DEFAULT, ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FOREDIT, ANIMFILTER_NODUPLIS, ANIMFILTER_SEL, bAnimContext::data, bAnimContext::datatype, decimate_fcurve(), filter(), ListBase::first, bAnimListElem::next, NULL, RPT_WARNING, bAnimListElem::update, and WM_report().
Referenced by graphkeys_decimate_exec(), and graphkeys_decimate_modal_update().
|
static |
Definition at line 208 of file graph_slider_ops.c.
References tDecimateGraphOp::percentage_prop, wmOperator::ptr, tDecimateGraphOp::region, RNA_property_float_set(), ARegion::winrct, ARegion::winx, and rcti::xmin.
Referenced by graphkeys_decimate_invoke(), and graphkeys_decimate_modal().
|
static |
Definition at line 111 of file graph_slider_ops.c.
References tDecimateGraphOp::ac, ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FOREDIT, ANIMFILTER_NODUPLIS, ANIMFILTER_SEL, FCurve::bezt, tDecimateGraphOp::bezt_arr_list, data, bAnimContext::data, LinkData::data, bAnimContext::datatype, filter(), ListBase::first, if(), bAnimListElem::key_data, MEM_freeN, MEM_mallocN, bAnimListElem::next, LinkData::next, NULL, and FCurve::totvert.
Referenced by graphkeys_decimate_modal(), and graphkeys_decimate_modal_update().
| void GRAPH_OT_decimate | ( | wmOperatorType * | ot | ) |
Definition at line 481 of file graph_slider_ops.c.
References DECIM_RATIO, decimate_mode_items, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::get_description, graphkeys_decimate_desc(), graphkeys_decimate_exec(), graphkeys_decimate_invoke(), graphkeys_decimate_modal(), graphkeys_decimate_poll_property(), graphop_editable_keyframes_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::poll_property, RNA_def_enum(), RNA_def_float(), RNA_def_float_factor(), and wmOperatorType::srna.
Referenced by graphedit_operatortypes().
|
static |
Definition at line 452 of file graph_slider_ops.c.
References BLI_strdup(), DECIM_ERROR, NULL, ptr, and RNA_enum_get().
Referenced by GRAPH_OT_decimate().
|
static |
Definition at line 392 of file graph_slider_ops.c.
References ANIM_animdata_get_context(), C, DECIM_ERROR, DECIM_RATIO, decimate_graph_keys(), NA_EDITED, NC_ANIMATION, ND_KEYFRAME, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), and WM_event_add_notifier().
Referenced by GRAPH_OT_decimate().
|
static |
Definition at line 216 of file graph_slider_ops.c.
References tDecimateGraphOp::ac, ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_animdata_get_context(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FOREDIT, ANIMFILTER_NODUPLIS, ANIMFILTER_SEL, tDecimateGraphOp::area, FCurve::bezt, tDecimateGraphOp::bezt_arr_list, BLI_addtail(), C, copy(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, bAnimContext::data, LinkData::data, bAnimContext::datatype, decimate_draw_status_header(), decimate_exit(), decimate_mouse_update_percentage(), filter(), ListBase::first, if(), bAnimListElem::key_data, MEM_callocN, MEM_mallocN, bAnimListElem::next, NULL, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, tDecimateGraphOp::percentage_prop, wmOperator::ptr, tDecimateGraphOp::region, RNA_struct_find_property(), RPT_WARNING, tDecimateGraphOp::scene, FCurve::totvert, WM_CURSOR_EW_SCROLL, WM_cursor_modal_set(), WM_event_add_modal_handler(), and WM_report().
Referenced by GRAPH_OT_decimate().
|
static |
Definition at line 316 of file graph_slider_ops.c.
References applyNumInput(), C, wmOperator::customdata, decimate_exit(), decimate_mouse_update_percentage(), decimate_reset_bezts(), EVT_ESCKEY, EVT_PADENTER, EVT_RETKEY, graphkeys_decimate_modal_update(), handleNumInput(), hasNumInput(), KM_PRESS, LEFTMOUSE, MOUSEMOVE, NA_EDITED, NC_ANIMATION, ND_KEYFRAME, NULL, tDecimateGraphOp::num, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, tDecimateGraphOp::percentage_prop, wmOperator::ptr, RIGHTMOUSE, RNA_property_float_get(), RNA_property_float_set(), wmEvent::type, wmEvent::val, and WM_event_add_notifier().
Referenced by GRAPH_OT_decimate().
|
static |
Definition at line 297 of file graph_slider_ops.c.
References tDecimateGraphOp::ac, C, wmOperator::customdata, decimate_draw_status_header(), decimate_graph_keys(), decimate_reset_bezts(), NA_EDITED, NC_ANIMATION, ND_KEYFRAME, NULL, tDecimateGraphOp::percentage_prop, wmOperator::ptr, RNA_property_float_get(), and WM_event_add_notifier().
Referenced by graphkeys_decimate_modal().
|
static |
Definition at line 432 of file graph_slider_ops.c.
References DECIM_ERROR, DECIM_RATIO, wmOperator::ptr, RNA_enum_get(), RNA_property_identifier(), STREQ, and STRPREFIX.
Referenced by GRAPH_OT_decimate().
|
static |
Definition at line 466 of file graph_slider_ops.c.
Referenced by GRAPH_OT_decimate().