Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

graph_edit.c File Reference

#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "BKE_fcurve.h"
#include "BKE_nla.h"
#include "BKE_context.h"
#include "BKE_report.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "ED_anim_api.h"
#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_markers.h"
#include "WM_api.h"
#include "WM_types.h"
#include "graph_intern.h"

Go to the source code of this file.

Classes

struct  tEulerFilter

Defines

#define MAKE_CYCLIC_EXPO   -1
#define CLEAR_CYCLIC_EXPO   -2

Typedefs

typedef struct tEulerFilter tEulerFilter

Functions

void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, const short selOnly)
static int graphkeys_previewrange_exec (bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_previewrange_set (wmOperatorType *ot)
static int graphkeys_viewall (bContext *C, const short selOnly)
static int graphkeys_viewall_exec (bContext *C, wmOperator *UNUSED(op))
static int graphkeys_view_selected_exec (bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_view_all (wmOperatorType *ot)
void GRAPH_OT_view_selected (wmOperatorType *ot)
static void create_ghost_curves (bAnimContext *ac, int start, int end)
static int graphkeys_create_ghostcurves_exec (bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_ghost_curves_create (wmOperatorType *ot)
static int graphkeys_clear_ghostcurves_exec (bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot)
static void insert_graph_keys (bAnimContext *ac, short mode)
static int graphkeys_insertkey_exec (bContext *C, wmOperator *op)
void GRAPH_OT_keyframe_insert (wmOperatorType *ot)
static int graphkeys_click_insert_exec (bContext *C, wmOperator *op)
static int graphkeys_click_insert_invoke (bContext *C, wmOperator *op, wmEvent *evt)
void GRAPH_OT_click_insert (wmOperatorType *ot)
static short copy_graph_keys (bAnimContext *ac)
static short paste_graph_keys (bAnimContext *ac, const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode)
static int graphkeys_copy_exec (bContext *C, wmOperator *op)
void GRAPH_OT_copy (wmOperatorType *ot)
static int graphkeys_paste_exec (bContext *C, wmOperator *op)
void GRAPH_OT_paste (wmOperatorType *ot)
static void duplicate_graph_keys (bAnimContext *ac)
static int graphkeys_duplicate_exec (bContext *C, wmOperator *UNUSED(op))
static int graphkeys_duplicate_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void GRAPH_OT_duplicate (wmOperatorType *ot)
static void delete_graph_keys (bAnimContext *ac)
static int graphkeys_delete_exec (bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_delete (wmOperatorType *ot)
static void clean_graph_keys (bAnimContext *ac, float thresh)
static int graphkeys_clean_exec (bContext *C, wmOperator *op)
void GRAPH_OT_clean (wmOperatorType *ot)
static void bake_graph_curves (bAnimContext *ac, int start, int end)
static int graphkeys_bake_exec (bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_bake (wmOperatorType *ot)
static int graphkeys_sound_bake_exec (bContext *UNUSED(C), wmOperator *op)
static int graphkeys_sound_bake_invoke (bContext *C, wmOperator *op, wmEvent *event)
void GRAPH_OT_sound_bake (wmOperatorType *ot)
static void sample_graph_keys (bAnimContext *ac)
static int graphkeys_sample_exec (bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_sample (wmOperatorType *ot)
static void setexpo_graph_keys (bAnimContext *ac, short mode)
static int graphkeys_expo_exec (bContext *C, wmOperator *op)
void GRAPH_OT_extrapolation_type (wmOperatorType *ot)
static void setipo_graph_keys (bAnimContext *ac, short mode)
static int graphkeys_ipo_exec (bContext *C, wmOperator *op)
void GRAPH_OT_interpolation_type (wmOperatorType *ot)
static void sethandles_graph_keys (bAnimContext *ac, short mode)
static int graphkeys_handletype_exec (bContext *C, wmOperator *op)
void GRAPH_OT_handle_type (wmOperatorType *ot)
static int graphkeys_euler_filter_exec (bContext *C, wmOperator *op)
void GRAPH_OT_euler_filter (wmOperatorType *ot)
static int graphkeys_framejump_exec (bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_frame_jump (wmOperatorType *ot)
static void snap_graph_keys (bAnimContext *ac, short mode)
static int graphkeys_snap_exec (bContext *C, wmOperator *op)
void GRAPH_OT_snap (wmOperatorType *ot)
static void mirror_graph_keys (bAnimContext *ac, short mode)
static int graphkeys_mirror_exec (bContext *C, wmOperator *op)
void GRAPH_OT_mirror (wmOperatorType *ot)
static int graphkeys_smooth_exec (bContext *C, wmOperator *UNUSED(op))
void GRAPH_OT_smooth (wmOperatorType *ot)
static int graph_fmodifier_add_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
static int graph_fmodifier_add_exec (bContext *C, wmOperator *op)
void GRAPH_OT_fmodifier_add (wmOperatorType *ot)
static int graph_fmodifier_copy_exec (bContext *C, wmOperator *op)
void GRAPH_OT_fmodifier_copy (wmOperatorType *ot)
static int graph_fmodifier_paste_exec (bContext *C, wmOperator *op)
void GRAPH_OT_fmodifier_paste (wmOperatorType *ot)

Variables

static EnumPropertyItem prop_graphkeys_insertkey_types []
static EnumPropertyItem prop_graphkeys_expo_types []
static EnumPropertyItem prop_graphkeys_snap_types []
static EnumPropertyItem prop_graphkeys_mirror_types []

Detailed Description

Definition in file graph_edit.c.


Define Documentation

#define CLEAR_CYCLIC_EXPO   -2

Definition at line 1272 of file graph_edit.c.

Referenced by setexpo_graph_keys().

#define MAKE_CYCLIC_EXPO   -1

Definition at line 1271 of file graph_edit.c.

Referenced by setexpo_graph_keys().


Typedef Documentation

typedef struct tEulerFilter tEulerFilter

Function Documentation

static void bake_graph_curves ( bAnimContext ac,
int  start,
int  end 
) [static]
static void clean_graph_keys ( bAnimContext ac,
float  thresh 
) [static]
static short copy_graph_keys ( bAnimContext ac) [static]
static void create_ghost_curves ( bAnimContext ac,
int  start,
int  end 
) [static]

Definition at line 280 of file graph_edit.c.

References NULL, and bAnimContext::sl.

Referenced by graphkeys_create_ghostcurves_exec().

static void delete_graph_keys ( bAnimContext ac) [static]
static void duplicate_graph_keys ( bAnimContext ac) [static]
void get_graph_keyframe_extents ( bAnimContext ac,
float *  xmin,
float *  xmax,
float *  ymin,
float *  ymax,
const short  selOnly 
)
static int graph_fmodifier_add_exec ( bContext C,
wmOperator op 
) [static]
static int graph_fmodifier_add_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static int graph_fmodifier_copy_exec ( bContext C,
wmOperator op 
) [static]
static int graph_fmodifier_paste_exec ( bContext C,
wmOperator op 
) [static]
void GRAPH_OT_bake ( wmOperatorType ot)
void GRAPH_OT_clean ( wmOperatorType ot)
void GRAPH_OT_click_insert ( wmOperatorType ot)
void GRAPH_OT_copy ( wmOperatorType ot)
void GRAPH_OT_delete ( wmOperatorType ot)
void GRAPH_OT_duplicate ( wmOperatorType ot)
void GRAPH_OT_euler_filter ( wmOperatorType ot)
void GRAPH_OT_extrapolation_type ( wmOperatorType ot)
void GRAPH_OT_fmodifier_add ( wmOperatorType ot)
void GRAPH_OT_fmodifier_copy ( wmOperatorType ot)
void GRAPH_OT_fmodifier_paste ( wmOperatorType ot)
void GRAPH_OT_frame_jump ( wmOperatorType ot)
void GRAPH_OT_ghost_curves_clear ( wmOperatorType ot)
void GRAPH_OT_ghost_curves_create ( wmOperatorType ot)
void GRAPH_OT_handle_type ( wmOperatorType ot)
void GRAPH_OT_interpolation_type ( wmOperatorType ot)
void GRAPH_OT_keyframe_insert ( wmOperatorType ot)
void GRAPH_OT_mirror ( wmOperatorType ot)
void GRAPH_OT_paste ( wmOperatorType ot)
void GRAPH_OT_previewrange_set ( wmOperatorType ot)
void GRAPH_OT_sample ( wmOperatorType ot)
void GRAPH_OT_smooth ( wmOperatorType ot)
void GRAPH_OT_snap ( wmOperatorType ot)
void GRAPH_OT_sound_bake ( wmOperatorType ot)
void GRAPH_OT_view_all ( wmOperatorType ot)
void GRAPH_OT_view_selected ( wmOperatorType ot)
static int graphkeys_bake_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int graphkeys_clean_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_clear_ghostcurves_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int graphkeys_click_insert_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_click_insert_invoke ( bContext C,
wmOperator op,
wmEvent evt 
) [static]
static int graphkeys_copy_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_create_ghostcurves_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int graphkeys_delete_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int graphkeys_duplicate_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int graphkeys_duplicate_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]

Definition at line 809 of file graph_edit.c.

References graphkeys_duplicate_exec(), and OPERATOR_FINISHED.

Referenced by GRAPH_OT_duplicate().

static int graphkeys_euler_filter_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_expo_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_framejump_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int graphkeys_handletype_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_insertkey_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_ipo_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_mirror_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_paste_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_previewrange_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int graphkeys_sample_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int graphkeys_smooth_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int graphkeys_snap_exec ( bContext C,
wmOperator op 
) [static]
static int graphkeys_sound_bake_exec ( bContext UNUSEDC,
wmOperator op 
) [static]

Definition at line 1155 of file graph_edit.c.

References BKE_report(), OPERATOR_CANCELLED, wmOperator::reports, and RPT_ERROR.

Referenced by GRAPH_OT_sound_bake().

static int graphkeys_sound_bake_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int graphkeys_view_selected_exec ( bContext C,
wmOperator UNUSEDop 
) [static]

Definition at line 238 of file graph_edit.c.

References graphkeys_viewall(), and TRUE.

Referenced by GRAPH_OT_view_selected().

static int graphkeys_viewall ( bContext C,
const short  selOnly 
) [static]
static int graphkeys_viewall_exec ( bContext C,
wmOperator UNUSEDop 
) [static]

Definition at line 232 of file graph_edit.c.

References FALSE, and graphkeys_viewall().

Referenced by GRAPH_OT_view_all().

static void insert_graph_keys ( bAnimContext ac,
short  mode 
) [static]
static void mirror_graph_keys ( bAnimContext ac,
short  mode 
) [static]
static short paste_graph_keys ( bAnimContext ac,
const eKeyPasteOffset  offset_mode,
const eKeyMergeMode  merge_mode 
) [static]
static void sample_graph_keys ( bAnimContext ac) [static]
static void setexpo_graph_keys ( bAnimContext ac,
short  mode 
) [static]
static void sethandles_graph_keys ( bAnimContext ac,
short  mode 
) [static]
static void setipo_graph_keys ( bAnimContext ac,
short  mode 
) [static]
static void snap_graph_keys ( bAnimContext ac,
short  mode 
) [static]

Variable Documentation

Initial value:
 {
    {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""},
    {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""},
    
    {MAKE_CYCLIC_EXPO, "MAKE_CYCLIC", 0, "Make Cyclic (F-Modifier)", "Add Cycles F-Modifier if one doesn't exist already"},
    {CLEAR_CYCLIC_EXPO, "CLEAR_CYCLIC", 0, "Clear Cyclic (F-Modifier)", "Remove Cycles F-Modifier if not needed anymore"},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 1275 of file graph_edit.c.

Initial value:
 {
    {1, "ALL", 0, "All Channels", ""},
    {2, "SEL", 0, "Only Selected Channels", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 438 of file graph_edit.c.

Initial value:
 {
    {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", ""},
    {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", ""},
    {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", ""},
    {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", ""},
    {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 1898 of file graph_edit.c.

Initial value:
 {
    {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", ""},
    {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", ""},
    {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, 
    {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, 
    {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""},
    {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 1790 of file graph_edit.c.