Blender  V3.3
Classes | Typedefs | Variables
transform_convert_graph.c File Reference
#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 BeztMapbezt_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 Documentation

◆ BeztMap

typedef struct BeztMap BeztMap

◆ TransDataGraph

Function Documentation

◆ bezt_to_beztmaps()

static BeztMap* bezt_to_beztmaps ( BezTriple bezts,
int  totvert 
)
static

◆ bezt_to_transdata()

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

◆ beztmap_to_data()

static void beztmap_to_data ( TransInfo t,
FCurve fcu,
BeztMap bezms,
int  totvert 
)
static

◆ createTransGraphEditData()

static void createTransGraphEditData ( bContext C,
TransInfo t 
)
static

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.

References NULL, scene, and t.

◆ fcu_test_selected()

static bool fcu_test_selected ( FCurve fcu)
static

Definition at line 623 of file transform_convert_graph.c.

References FCurve::bezt, BEZT_ISSEL_ANY, NULL, and FCurve::totvert.

◆ flushTransGraphData()

static void flushTransGraphData ( TransInfo t)
static

◆ graph_bezt_get_transform_selection()

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

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().

◆ graph_edit_is_translation_mode()

static bool graph_edit_is_translation_mode ( TransInfo t)
static

◆ graph_edit_use_local_center()

static bool graph_edit_use_local_center ( TransInfo t)
static

◆ graph_key_shortest_dist()

static void graph_key_shortest_dist ( TransInfo t,
FCurve fcu,
TransData td_start,
TransData td,
int  cfra,
bool  use_handle 
)
static

◆ recalcData_graphedit()

static void recalcData_graphedit ( TransInfo t)
static

Definition at line 898 of file transform_convert_graph.c.

References NULL, and t.

◆ remake_graph_transdata()

static void remake_graph_transdata ( TransInfo t,
ListBase anim_data 
)
static

◆ sort_time_beztmaps()

static void sort_time_beztmaps ( BeztMap bezms,
int  totvert 
)
static

◆ special_aftertrans_update__graph()

static void special_aftertrans_update__graph ( bContext C,
TransInfo t 
)
static

Variable Documentation

◆ TransConvertType_Graph

TransConvertTypeInfo TransConvertType_Graph
Initial value:
= {
}
static void createTransGraphEditData(bContext *C, TransInfo *t)
static void recalcData_graphedit(TransInfo *t)
static void special_aftertrans_update__graph(bContext *C, TransInfo *t)

Definition at line 1034 of file transform_convert_graph.c.

Referenced by convert_type_get(), and init_proportional_edit().