Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BLF_translation.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_main.h"
#include "BKE_screen.h"
#include "BKE_unit.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "ED_anim_api.h"
#include "ED_keyframing.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "graph_intern.h"
Go to the source code of this file.
Defines | |
#define | UI_FLT_MAX 10000.0f |
#define | B_REDR 1 |
#define | B_IPO_DEPCHANGE 10 |
#define | B_FMODIFIER_REDRAW 20 |
Functions | |
static void | do_graph_region_buttons (bContext *UNUSED(C), void *UNUSED(arg), int event) |
static int | graph_panel_context (const bContext *C, bAnimListElem **ale, FCurve **fcu) |
static int | graph_panel_poll (const bContext *C, PanelType *UNUSED(pt)) |
static void | graph_panel_view (const bContext *C, Panel *pa) |
static void | graph_panel_properties (const bContext *C, Panel *pa) |
static short | get_active_fcurve_keyframe_edit (FCurve *fcu, BezTriple **bezt, BezTriple **prevbezt) |
static void | graphedit_activekey_update_cb (bContext *C, void *fcu_ptr, void *UNUSED(bezt_ptr)) |
static void | graphedit_activekey_handles_cb (bContext *C, void *fcu_ptr, void *bezt_ptr) |
static void | graph_panel_key_properties (const bContext *C, Panel *pa) |
static void | do_graph_region_driver_buttons (bContext *C, void *UNUSED(arg), int event) |
static void | driver_remove_cb (bContext *C, void *ale_v, void *UNUSED(arg)) |
static void | driver_add_var_cb (bContext *UNUSED(C), void *driver_v, void *UNUSED(arg)) |
static void | driver_delete_var_cb (bContext *UNUSED(C), void *driver_v, void *dvar_v) |
static void | driver_update_flags_cb (bContext *UNUSED(C), void *fcu_v, void *UNUSED(arg)) |
static int | graph_panel_drivers_poll (const bContext *C, PanelType *UNUSED(pt)) |
static void | graph_panel_driverVar__singleProp (uiLayout *layout, ID *id, DriverVar *dvar) |
static void | graph_panel_driverVar__rotDiff (uiLayout *layout, ID *id, DriverVar *dvar) |
static void | graph_panel_driverVar__locDiff (uiLayout *layout, ID *id, DriverVar *dvar) |
static void | graph_panel_driverVar__transChan (uiLayout *layout, ID *id, DriverVar *dvar) |
static void | graph_panel_drivers (const bContext *C, Panel *pa) |
static void | do_graph_region_modifier_buttons (bContext *C, void *UNUSED(arg), int event) |
static void | graph_panel_modifiers (const bContext *C, Panel *pa) |
void | graph_buttons_register (ARegionType *art) |
static int | graph_properties (bContext *C, wmOperator *UNUSED(op)) |
void | GRAPH_OT_properties (wmOperatorType *ot) |
Definition in file graph_buttons.c.
#define B_FMODIFIER_REDRAW 20 |
Definition at line 726 of file graph_buttons.c.
Referenced by do_graph_region_modifier_buttons().
#define B_IPO_DEPCHANGE 10 |
Definition at line 375 of file graph_buttons.c.
Referenced by do_graph_region_driver_buttons(), and graph_panel_drivers().
#define B_REDR 1 |
Definition at line 81 of file graph_buttons.c.
#define UI_FLT_MAX 10000.0f |
Definition at line 76 of file graph_buttons.c.
static void do_graph_region_buttons | ( | bContext * | UNUSEDC, |
void * | UNUSEDarg, | ||
int | event | ||
) | [static] |
Definition at line 85 of file graph_buttons.c.
Referenced by graph_panel_key_properties(), and graph_panel_properties().
static void do_graph_region_driver_buttons | ( | bContext * | C, |
void * | UNUSEDarg, | ||
int | event | ||
) | [static] |
Definition at line 377 of file graph_buttons.c.
References B_IPO_DEPCHANGE, CTX_data_main(), CTX_data_scene(), DAG_ids_flush_update(), DAG_scene_sort(), NC_SCENE, ND_FRAME, and WM_event_add_notifier().
Referenced by graph_panel_drivers().
static void do_graph_region_modifier_buttons | ( | bContext * | C, |
void * | UNUSEDarg, | ||
int | event | ||
) | [static] |
Definition at line 728 of file graph_buttons.c.
References B_FMODIFIER_REDRAW, NC_ANIMATION, NULL, and WM_event_add_notifier().
Referenced by graph_panel_modifiers().
static void driver_add_var_cb | ( | bContext * | UNUSEDC, |
void * | driver_v, | ||
void * | UNUSEDarg | ||
) | [static] |
Definition at line 415 of file graph_buttons.c.
References driver_add_new_variable().
Referenced by graph_panel_drivers().
static void driver_delete_var_cb | ( | bContext * | UNUSEDC, |
void * | driver_v, | ||
void * | dvar_v | ||
) | [static] |
Definition at line 424 of file graph_buttons.c.
References driver_free_variable().
Referenced by graph_panel_drivers().
static void driver_remove_cb | ( | bContext * | C, |
void * | ale_v, | ||
void * | UNUSEDarg | ||
) | [static] |
Definition at line 399 of file graph_buttons.c.
References ANIM_remove_driver(), FCurve::array_index, CTX_wm_reports(), bAnimListElem::data, ELEM, bAnimListElem::id, NULL, and FCurve::rna_path.
Referenced by graph_panel_drivers().
static void driver_update_flags_cb | ( | bContext * | UNUSEDC, |
void * | fcu_v, | ||
void * | UNUSEDarg | ||
) | [static] |
Definition at line 434 of file graph_buttons.c.
References FCurve::driver, DRIVER_FLAG_INVALID, FCURVE_DISABLED, FCurve::flag, and ChannelDriver::flag.
Referenced by graph_panel_drivers().
static short get_active_fcurve_keyframe_edit | ( | FCurve * | fcu, |
BezTriple ** | bezt, | ||
BezTriple ** | prevbezt | ||
) | [static] |
Definition at line 214 of file graph_buttons.c.
References BEZSELECTED, FCurve::bezt, i, NULL, and FCurve::totvert.
Referenced by graph_panel_key_properties().
void graph_buttons_register | ( | ARegionType * | art | ) |
Definition at line 778 of file graph_buttons.c.
References BLI_addtail(), PanelType::draw, PanelType::flag, graph_panel_drivers(), graph_panel_drivers_poll(), graph_panel_key_properties(), graph_panel_modifiers(), graph_panel_poll(), graph_panel_properties(), graph_panel_view(), PanelType::idname, PanelType::label, MEM_callocN(), ARegionType::paneltypes, PNL_DEFAULT_CLOSED, and PanelType::poll.
Referenced by ED_spacetype_ipo().
void GRAPH_OT_properties | ( | wmOperatorType * | ot | ) |
Definition at line 830 of file graph_buttons.c.
References wmOperatorType::description, ED_operator_graphedit_active(), wmOperatorType::exec, wmOperatorType::flag, graph_properties(), wmOperatorType::idname, wmOperatorType::name, and wmOperatorType::poll.
Referenced by graphedit_operatortypes().
static int graph_panel_context | ( | const bContext * | C, |
bAnimListElem ** | ale, | ||
FCurve ** | fcu | ||
) | [static] |
Definition at line 99 of file graph_buttons.c.
References ANIM_animdata_get_context(), bAnimListElem::data, get_active_fcurve_channel(), MEM_freeN(), and NULL.
Referenced by graph_panel_drivers(), graph_panel_drivers_poll(), graph_panel_key_properties(), graph_panel_modifiers(), graph_panel_poll(), and graph_panel_properties().
Definition at line 587 of file graph_buttons.c.
References B_IPO_DEPCHANGE, BLI_snprintf(), BUT, DriverVar::curval, ChannelDriver::curval, do_graph_region_driver_buttons(), FCurve::driver, driver_add_var_cb(), driver_delete_var_cb(), DRIVER_FLAG_INVALID, DRIVER_FLAG_SHOWDEBUG, driver_remove_cb(), DRIVER_TYPE_PYTHON, driver_update_flags_cb(), DVAR_TYPE_LOC_DIFF, DVAR_TYPE_ROT_DIFF, DVAR_TYPE_SINGLE_PROP, DVAR_TYPE_TRANSFORM_CHAN, ListBase::first, ChannelDriver::flag, graph_panel_context(), graph_panel_driverVar__locDiff(), graph_panel_driverVar__rotDiff(), graph_panel_driverVar__singleProp(), graph_panel_driverVar__transChan(), bAnimListElem::id, Panel::layout, MEM_dupallocN(), MEM_freeN(), DriverVar::next, NULL, RNA_Driver, RNA_DriverVariable, RNA_pointer_create(), DriverVar::type, ChannelDriver::type, UI_EMBOSS, UI_EMBOSSN, UI_UNIT_X, UI_UNIT_Y, uiBlockSetEmboss(), uiBlockSetHandleFunc(), uiButSetFunc(), uiButSetNFunc(), uiDefBut(), uiDefIconBut(), uiItemL(), uiItemR(), uiLayoutBox(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutRow(), and ChannelDriver::variables.
Referenced by graph_buttons_register().
Definition at line 445 of file graph_buttons.c.
References CTX_wm_space_graph(), graph_panel_context(), SpaceIpo::mode, NULL, and SIPO_MODE_DRIVERS.
Referenced by graph_buttons_register().
static void graph_panel_driverVar__locDiff | ( | uiLayout * | layout, |
ID * | id, | ||
DriverVar * | dvar | ||
) | [static] |
Definition at line 520 of file graph_buttons.c.
References DriverTarget::id, NULL, Object::pose, RNA_DriverTarget, RNA_pointer_create(), RNA_Pose, DriverVar::targets, uiItemPointerR(), uiItemR(), uiLayoutColumn(), and uiTemplateAnyID().
Referenced by graph_panel_drivers().
static void graph_panel_driverVar__rotDiff | ( | uiLayout * | layout, |
ID * | id, | ||
DriverVar * | dvar | ||
) | [static] |
Definition at line 484 of file graph_buttons.c.
References DriverTarget::id, Object::pose, RNA_DriverTarget, RNA_pointer_create(), RNA_Pose, DriverVar::targets, uiItemPointerR(), uiLayoutColumn(), and uiTemplateAnyID().
Referenced by graph_panel_drivers().
static void graph_panel_driverVar__singleProp | ( | uiLayout * | layout, |
ID * | id, | ||
DriverVar * | dvar | ||
) | [static] |
Definition at line 456 of file graph_buttons.c.
References DriverTarget::id, RNA_DriverTarget, RNA_id_pointer_create(), RNA_pointer_create(), DriverVar::targets, uiLayoutColumn(), uiLayoutRow(), uiTemplateAnyID(), and uiTemplatePathBuilder().
Referenced by graph_panel_drivers().
static void graph_panel_driverVar__transChan | ( | uiLayout * | layout, |
ID * | id, | ||
DriverVar * | dvar | ||
) | [static] |
Definition at line 560 of file graph_buttons.c.
References DriverTarget::id, NULL, Object::pose, RNA_DriverTarget, RNA_pointer_create(), RNA_Pose, DriverVar::targets, uiItemPointerR(), uiItemR(), uiLayoutColumn(), and uiTemplateAnyID().
Referenced by graph_panel_drivers().
Definition at line 277 of file graph_buttons.c.
References B_REDR, B_UNIT_NONE, FCurve::bezt, BEZT_IPO_BEZ, do_graph_region_buttons(), ListBase::first, FCurve::fpt, get_active_fcurve_keyframe_edit(), graph_panel_context(), graphedit_activekey_handles_cb(), graphedit_activekey_update_cb(), bAnimListElem::id, BezTriple::ipo, Panel::layout, MEM_freeN(), FCurve::modifiers, NULL, NUM, RNA_id_pointer_create(), RNA_Keyframe, FCurve::rna_path, RNA_path_resolve(), RNA_pointer_create(), RNA_property_subtype(), RNA_SUBTYPE_UNIT, UI_UNIT_X, UI_UNIT_Y, uiBlockSetHandleFunc(), uiButSetFunc(), uiButSetUnitType(), uiDefButR(), uiItemL(), uiItemR(), uiLayoutColumn(), and uiLayoutGetBlock().
Referenced by graph_buttons_register().
Definition at line 737 of file graph_buttons.c.
References ANIM_uiTemplate_fmodifier_draw(), BUT, do_graph_region_modifier_buttons(), ListBase::first, graph_panel_context(), bAnimListElem::id, IFACE_, Panel::layout, MEM_freeN(), FCurve::modifiers, NULL, TIP_, uiBlockSetHandleFunc(), uiDefButO(), uiItemO(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutRow(), and WM_OP_INVOKE_REGION_WIN.
Referenced by graph_buttons_register().
Definition at line 125 of file graph_buttons.c.
References graph_panel_context(), and NULL.
Referenced by graph_buttons_register().
Definition at line 165 of file graph_buttons.c.
References FCurve::color_mode, do_graph_region_buttons(), FCURVE_COLOR_CUSTOM, FCURVE_DISABLED, FCurve::flag, getname_anim_fcurve(), graph_panel_context(), bAnimListElem::id, Panel::layout, MEM_freeN(), NULL, RNA_FCurve, RNA_pointer_create(), uiBlockSetHandleFunc(), uiItemL(), uiItemR(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutRow(), and uiLayoutSetEnabled().
Referenced by graph_buttons_register().
Definition at line 133 of file graph_buttons.c.
References CTX_data_scene(), CTX_wm_screen(), CTX_wm_space_graph(), GRAPHKEYS_SNAP_CFRA, GRAPHKEYS_SNAP_VALUE, Scene::id, bScreen::id, Panel::layout, NULL, RNA_boolean_get(), RNA_id_pointer_create(), RNA_pointer_create(), RNA_SpaceGraphEditor, uiItemEnumO(), uiItemO(), uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSplit().
Referenced by graph_buttons_register().
static int graph_properties | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 819 of file graph_buttons.c.
References CTX_wm_area(), ED_region_toggle_hidden(), graph_has_buttons_region(), and OPERATOR_FINISHED.
Referenced by GRAPH_OT_properties().
static void graphedit_activekey_handles_cb | ( | bContext * | C, |
void * | fcu_ptr, | ||
void * | bezt_ptr | ||
) | [static] |
Definition at line 260 of file graph_buttons.c.
References ELEM, graphedit_activekey_update_cb(), BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, and HD_AUTO_ANIM.
Referenced by graph_panel_key_properties().
static void graphedit_activekey_update_cb | ( | bContext * | C, |
void * | fcu_ptr, | ||
void * | UNUSEDbezt_ptr | ||
) | [static] |
Definition at line 248 of file graph_buttons.c.
References CTX_wm_space_graph(), SpaceIpo::flag, SIPO_NOHANDLES, sort_time_fcurve(), and testhandles_fcurve().
Referenced by graph_panel_key_properties(), and graphedit_activekey_handles_cb().