|
Blender
V2.93
|
#include "DNA_anim_types.h"#include "DNA_space_types.h"#include "MEM_guardedalloc.h"#include "BLI_math.h"#include "BKE_context.h"#include "BKE_fcurve.h"#include "BKE_nla.h"#include "BKE_report.h"#include "ED_anim_api.h"#include "ED_keyframes_edit.h"#include "ED_markers.h"#include "UI_view2d.h"#include "transform.h"#include "transform_convert.h"Go to the source code of this file.
Classes | |
| struct | TransDataGraph |
| struct | BeztMap |
Typedefs | |
| typedef struct TransDataGraph | TransDataGraph |
Functions | |
Graph Editor Transform Creation | |
| static void | bezt_to_transdata (TransData *td, TransData2D *td2d, TransDataGraph *tdg, AnimData *adt, BezTriple *bezt, int bi, bool selected, bool ishandle, bool intvals, const float mtx[3][3], const float smtx[3][3], float unit_scale, float offset) |
| static bool | graph_edit_is_translation_mode (TransInfo *t) |
| static bool | graph_edit_use_local_center (TransInfo *t) |
| static void | graph_bezt_get_transform_selection (const TransInfo *t, const BezTriple *bezt, const bool use_handle, bool *r_left_handle, bool *r_key, bool *r_right_handle) |
| static void | graph_key_shortest_dist (TransInfo *t, FCurve *fcu, TransData *td_start, TransData *td, int cfra, bool use_handle) |
| void | createTransGraphEditData (bContext *C, TransInfo *t) |
Special After Transform Graph | |
| void | special_aftertrans_update__graph (bContext *C, TransInfo *t) |
Graph Editor Transform Flush | |
| typedef struct BeztMap | BeztMap |
| static bool | fcu_test_selected (FCurve *fcu) |
| static void | flushTransGraphData (TransInfo *t) |
| static BeztMap * | bezt_to_beztmaps (BezTriple *bezts, int totvert) |
| static void | sort_time_beztmaps (BeztMap *bezms, int totvert) |
| static void | beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totvert) |
| static void | remake_graph_transdata (TransInfo *t, ListBase *anim_data) |
| void | recalcData_graphedit (TransInfo *t) |
| typedef struct TransDataGraph TransDataGraph |
Definition at line 765 of file transform_convert_graph.c.
References BeztMap::bezt, BeztMap::cipo, BezTriple::ipo, MEM_callocN, BeztMap::newIndex, NULL, BeztMap::oldIndex, and BeztMap::pipo.
Referenced by remake_graph_transdata().
|
static |
Definition at line 57 of file transform_convert_graph.c.
References TransData::axismtx, BKE_nla_tweakedit_remap(), copy_m3_m3(), copy_v2_v2(), copy_v3_v3(), TransData::dist, TransData::ext, TransData2D::h1, TransData2D::h2, TransData2D::ih1, TransData2D::ih2, TransData2D::loc, TransData2D::loc2d, TransData::mtx, NLATIME_CONVERT_MAP, NULL, TransDataGraph::offset, TransData::smtx, TD_INTVALUES, TD_NOTIMESNAP, TD_SELECTED, TransDataGraph::unit_scale, TransData::val, and BezTriple::vec.
Definition at line 838 of file transform_convert_graph.c.
References BeztMap::bezt, FCurve::bezt, TransDataContainer::data, TransDataContainer::data_2d, TransDataContainer::data_len, TransDataCurveHandleFlags::h1, TransDataCurveHandleFlags::h2, TransData::hdata, MEM_callocN, MEM_freeN, BeztMap::newIndex, BeztMap::swapHs, t, TD_BEZTRIPLE, TRANS_DATA_CONTAINER_FIRST_SINGLE, and BezTriple::vec.
Referenced by remake_graph_transdata().
It is important to note that this doesn't always act on the selection (like it's usually done), it acts on a subset of it. E.g. the selection code may leave a hint that we just dragged on a left or right handle (SIPO_RUNTIME_FLAG_TWEAK_HANDLES_LEFT/RIGHT) and then we only transform the selected left or right handles accordingly. The points to be transformed are tagged with BEZT_FLAG_TEMP_TAG; some lower level curve functions may need to be made aware of this. It's ugly that these act based on selection state anyway.
Definition at line 225 of file transform_convert_graph.c.
References NULL, scene, and t.
Referenced by createTransData().
|
static |
Definition at line 636 of file transform_convert_graph.c.
References FCurve::bezt, BEZT_ISSEL_ANY, NULL, and FCurve::totvert.
|
static |
Time-stepping auto-snapping modes don't get applied for Graph Editor transforms, as these use the generic transform modes which don't account for this sort of thing. These ones aren't affected by NLA mapping, so we do this after the conversion...
Definition at line 657 of file transform_convert_graph.c.
References Freestyle::a, SpaceGraph::autosnap, BKE_nla_tweakedit_remap(), TransDataContainer::custom, TransCustomData::data, TransDataContainer::data, TransDataContainer::data_2d, ED_markers_find_nearest_marker_time(), ELEM, float(), floor(), floorf, FPS, if(), NLATIME_CONVERT_UNMAP, SACTSNAP_FRAME, SACTSNAP_MARKER, SACTSNAP_SECOND, SACTSNAP_STEP, SACTSNAP_TSTEP, scene, t, TD_INTVALUES, TD_MOVEHANDLE1, TD_MOVEHANDLE2, TD_NOTIMESNAP, TRANS_CANCEL, TRANS_DATA_CONTAINER_FIRST_SINGLE, and TransCustomDataContainer::type.
|
static |
Get the effective selection of a triple for transform, i.e. return if the left handle, right handle and/or the center point should be affected by transform.
Definition at line 163 of file transform_convert_graph.c.
References BezTriple::f1, BezTriple::f2, BezTriple::f3, SpaceGraph_Runtime::flag, left, right, SpaceGraph::runtime, SELECT, SIPO_RUNTIME_FLAG_TWEAK_HANDLES_LEFT, SIPO_RUNTIME_FLAG_TWEAK_HANDLES_RIGHT, and t.
Referenced by graph_key_shortest_dist().
|
static |
Definition at line 149 of file transform_convert_graph.c.
References ELEM, t, TFM_TIME_DUPLICATE, TFM_TIME_SLIDE, TFM_TIME_TRANSLATE, and TFM_TRANSLATION.
Referenced by graph_edit_use_local_center().
|
static |
Definition at line 154 of file transform_convert_graph.c.
References graph_edit_is_translation_mode(), t, and V3D_AROUND_LOCAL_ORIGINS.
|
static |
Definition at line 194 of file transform_convert_graph.c.
References FCurve::bezt, TransData::dist, fabs(), FrameOnMouseSide(), graph_bezt_get_transform_selection(), min_ff(), TransData::rdist, t, FCurve::totvert, and BezTriple::vec.
| void recalcData_graphedit | ( | TransInfo * | t | ) |
Definition at line 961 of file transform_convert_graph.c.
Referenced by recalcData().
Definition at line 929 of file transform_convert_graph.c.
References FCurve::bezt, BEZT_FLAG_TEMP_TAG, bezt_to_beztmaps(), beztmap_to_data(), ListBase::first, SpaceGraph::flag, if(), bAnimListElem::key_data, MEM_freeN, bAnimListElem::next, SIPO_NOHANDLES, sort_time_beztmaps(), sort_time_fcurve(), t, testhandles_fcurve(), and FCurve::totvert.
|
static |
Definition at line 793 of file transform_convert_graph.c.
References BeztMap::bezt, BeztMap::newIndex, SWAP, BeztMap::swapHs, and BezTriple::vec.
Referenced by remake_graph_transdata().
Definition at line 1034 of file transform_convert_graph.c.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_animdata_get_context(), ANIM_editkeyframes_refresh(), ANIM_nla_mapping_apply_fcurve(), ANIM_nla_mapping_get(), ANIMFILTER_CURVE_VISIBLE, ANIMFILTER_DATA_VISIBLE, ANIMFILTER_FOREDIT, BEZT_FLAG_TEMP_TAG, C, bAnimContext::data, bAnimContext::datatype, filter(), ListBase::first, SpaceGraph::flag, if(), bAnimListElem::key_data, bAnimListElem::next, NULL, posttrans_fcurve_clean(), SIPO_NOHANDLES, SIPO_NOTRANSKEYCULL, t, TFM_TIME_DUPLICATE, and TRANS_CANCEL.
Referenced by special_aftertrans_update().