Blender
V3.3
|
#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"
#include "transform_mode.h"
#include "transform_snap.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) |
static void | createTransGraphEditData (bContext *C, TransInfo *t) |
Special After Transform Graph | |
static void | special_aftertrans_update__graph (bContext *C, TransInfo *t) |
Variables | |
TransConvertTypeInfo | TransConvertType_Graph |
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) |
static void | recalcData_graphedit (TransInfo *t) |
typedef struct TransDataGraph TransDataGraph |
Definition at line 703 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 43 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, offset, TransDataGraph::offset, TransData::smtx, TD_INTVALUES, TD_NOTIMESNAP, TD_SELECTED, TransDataGraph::unit_scale, TransData::val, and BezTriple::vec.
Definition at line 776 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 211 of file transform_convert_graph.c.
Definition at line 623 of file transform_convert_graph.c.
References FCurve::bezt, BEZT_ISSEL_ANY, NULL, and FCurve::totvert.
Definition at line 644 of file transform_convert_graph.c.
References Freestyle::a, BKE_nla_tweakedit_remap(), TransDataContainer::custom, TransCustomData::data, TransDataContainer::data, TransDataContainer::data_2d, floorf, getAnimEdit_SnapMode(), if(), TransData2D::loc, TransData2D::loc2d, NLATIME_CONVERT_UNMAP, TransDataGraph::offset, SACTSNAP_OFF, t, TD_INTVALUES, TD_NOTIMESNAP, TRANS_CANCEL, TRANS_DATA_CONTAINER_FIRST_SINGLE, transform_convert_flush_handle2D(), transform_snap_anim_flush_data(), TransCustomDataContainer::type, and TransDataGraph::unit_scale.
|
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 149 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().
Definition at line 135 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().
Definition at line 140 of file transform_convert_graph.c.
References graph_edit_is_translation_mode(), t, and V3D_AROUND_LOCAL_ORIGINS.
|
static |
Definition at line 180 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.
Definition at line 898 of file transform_convert_graph.c.
Definition at line 867 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.
Definition at line 731 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 972 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_FCURVESONLY, 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.
TransConvertTypeInfo TransConvertType_Graph |
Definition at line 1034 of file transform_convert_graph.c.
Referenced by convert_type_get(), and init_proportional_edit().