|
Blender V5.0
|
#include <cfloat>#include <cstring>#include "DNA_anim_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_math_rotation.h"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_anim_data.hh"#include "BKE_context.hh"#include "BKE_curve.hh"#include "BKE_fcurve.hh"#include "BKE_fcurve_driver.h"#include "BKE_global.hh"#include "BKE_screen.hh"#include "BKE_unit.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_build.hh"#include "WM_api.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "RNA_path.hh"#include "RNA_prototypes.hh"#include "ED_anim_api.hh"#include "ED_screen.hh"#include "ED_undo.hh"#include "UI_interface.hh"#include "UI_interface_layout.hh"#include "UI_resources.hh"#include "graph_intern.hh"Go to the source code of this file.
Macros | |
| #define | B_REDR 1 |
Functions | |
Internal Utilities | |
| static bool | graph_panel_context (const bContext *C, bAnimListElem **ale, FCurve **fcu) |
| FCurve * | ANIM_graph_context_fcurve (const bContext *C) |
| static bool | graph_panel_poll (const bContext *C, PanelType *) |
Cursor Header | |
| static void | graph_panel_cursor_header (const bContext *C, Panel *panel) |
| static void | graph_panel_cursor (const bContext *C, Panel *panel) |
Active F-Curve | |
| static void | graph_panel_properties (const bContext *C, Panel *panel) |
Active Keyframe | |
| static bool | get_active_fcurve_keyframe_edit (const FCurve *fcu, BezTriple **r_bezt, BezTriple **r_prevbezt) |
| static void | graphedit_activekey_update_cb (bContext *, void *fcu_ptr, void *) |
| static void | graphedit_activekey_handles_cb (bContext *C, void *fcu_ptr, void *bezt_ptr) |
| static void | graphedit_activekey_left_handle_coord_cb (bContext *C, void *fcu_ptr, void *bezt_ptr) |
| static void | graphedit_activekey_right_handle_coord_cb (bContext *C, void *fcu_ptr, void *bezt_ptr) |
| static void | graph_panel_key_properties (const bContext *C, Panel *panel) |
Registration | |
| void | graph_buttons_register (ARegionType *art) |
F-Curve Modifiers | |
| |
| #define | B_FMODIFIER_REDRAW 20 |
| #define | GRAPH_FMODIFIER_PANEL_PREFIX "GRAPH" |
| static void | graph_fmodifier_panel_id (void *fcm_link, char *r_name) |
| static void | do_graph_region_modifier_buttons (bContext *C, void *, int event) |
| static void | graph_panel_modifiers (const bContext *C, Panel *panel) |
Graph editor space & buttons.
Definition in file graph_buttons.cc.
| #define B_FMODIFIER_REDRAW 20 |
Definition at line 1380 of file graph_buttons.cc.
| #define B_IPO_DEPCHANGE 10 |
Definition at line 604 of file graph_buttons.cc.
Referenced by do_graph_region_driver_buttons(), and graph_draw_driver_settings_panel().
| #define B_REDR 1 |
Definition at line 57 of file graph_buttons.cc.
| #define GRAPH_FMODIFIER_PANEL_PREFIX "GRAPH" |
The start of FModifier panels registered for the graph editor.
Definition at line 1382 of file graph_buttons.cc.
Referenced by graph_buttons_register(), and graph_fmodifier_panel_id().
Definition at line 96 of file graph_buttons.cc.
References C, and graph_panel_context().
Referenced by fmodifier_get_pointers(), and fmodifier_list_space_specific().
|
static |
Definition at line 606 of file graph_buttons.cc.
References AnimData::action, B_IPO_DEPCHANGE, BKE_animdata_from_id(), C, CTX_data_main(), CTX_data_scene(), DEG_id_tag_update_ex(), DEG_relations_tag_update(), FCurve::driver, DRIVER_FLAG_INVALID, FCURVE_DISABLED, ChannelDriver::flag, FCurve::flag, bAction::id, ID_RECALC_SYNC_TO_EVAL, NC_SCENE, ND_FRAME, AnimData::tmpact, and WM_event_add_notifier().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 1400 of file graph_buttons.cc.
References B_FMODIFIER_REDRAW, C, NC_ANIMATION, and WM_event_add_notifier().
Referenced by graph_panel_modifiers().
|
static |
Definition at line 650 of file graph_buttons.cc.
References C, driver_add_new_variable(), and ED_undo_push().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 660 of file graph_buttons.cc.
References C, driver_free_variable_ex(), and ED_undo_push().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 671 of file graph_buttons.cc.
References BLT_I18NCONTEXT_OPERATOR_DEFAULT, C, CTX_IFACE_, DVAR_FLAG_INVALID_EMPTY, DVAR_FLAG_INVALID_HAS_DOT, DVAR_FLAG_INVALID_HAS_SPACE, DVAR_FLAG_INVALID_HAS_SPECIAL, DVAR_FLAG_INVALID_PY_KEYWORD, DVAR_FLAG_INVALID_START_CHAR, DVAR_FLAG_INVALID_START_NUM, DriverVar::flag, uiLayout::label(), RPT_, UI_popup_menu_begin(), UI_popup_menu_end(), and UI_popup_menu_layout().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 708 of file graph_buttons.cc.
References FCurve::driver, DRIVER_FLAG_INVALID, FCURVE_DISABLED, ChannelDriver::flag, and FCurve::flag.
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 253 of file graph_buttons.cc.
References FCurve::bezt, BEZT_ISSEL_ANY, BKE_fcurve_active_keyframe_index(), BLI_assert, FCURVE_ACTIVE_KEYFRAME_NONE, and max_ii().
Referenced by graph_panel_key_properties().
| void graph_buttons_register | ( | ARegionType * | art | ) |
Definition at line 1450 of file graph_buttons.cc.
References ANIM_modifier_panels_register_graph_and_NLA(), ANIM_modifier_panels_register_graph_only(), BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, PanelType::category, PanelType::draw, PanelType::draw_header, PanelType::flag, GRAPH_FMODIFIER_PANEL_PREFIX, graph_panel_cursor(), graph_panel_cursor_header(), graph_panel_driven_property(), graph_panel_drivers(), graph_panel_drivers_header(), graph_panel_drivers_poll(), graph_panel_drivers_popover(), graph_panel_drivers_popover_poll(), graph_panel_key_properties(), graph_panel_modifiers(), graph_panel_poll(), graph_panel_properties(), PanelType::idname, PanelType::label, MEM_callocN(), N_, PANEL_TYPE_NO_HEADER, ARegionType::paneltypes, PanelType::poll, STRNCPY_UTF8, PanelType::translation_context, and WM_paneltype_add().
Referenced by ED_spacetype_ipo().
|
static |
Definition at line 924 of file graph_buttons.cc.
References uiLayout::block(), CheckboxN, RNA_pointer_create_discrete(), TIP_, UI_UNIT_X, UI_UNIT_Y, and uiDefButR().
Referenced by graph_panel_drivers_header(), and graph_panel_drivers_popover().
Definition at line 960 of file graph_buttons.cc.
References uiLayout::alignment_set(), getname_anim_fcurve(), GS, ID_code_to_RNA_type(), uiLayout::label(), blender::ui::Left, ID::name, name, RNA_struct_ui_icon(), and uiLayout::row().
Referenced by graph_panel_driven_property(), and graph_panel_drivers_popover().
|
static |
Definition at line 990 of file graph_buttons.cc.
References uiLayout::alignment_set(), B_IPO_DEPCHANGE, BKE_driver_has_simple_expression(), BLI_listbase_is_empty(), BLI_STR_UTF8_DEGREE_SIGN, uiLayout::block(), But, col, uiLayout::column(), ChannelDriver::curval, do_graph_region_driver_buttons(), FCurve::driver, driver_add_var_cb(), driver_delete_var_cb(), driver_dvar_invalid_name_query_cb(), DRIVER_FLAG_INVALID, DRIVER_FLAG_PYTHON_BLOCKED, DRIVER_TYPE_PYTHON, driver_update_flags_cb(), DTAR_ROTMODE_QUATERNION, DTAR_TRANSCHAN_ROTW, DTAR_TRANSCHAN_ROTX, DTAR_TRANSCHAN_ROTY, DTAR_TRANSCHAN_ROTZ, DVAR_FLAG_INVALID_NAME, DVAR_TYPE_CONTEXT_PROP, DVAR_TYPE_LOC_DIFF, DVAR_TYPE_ROT_DIFF, DVAR_TYPE_SINGLE_PROP, DVAR_TYPE_TRANSFORM_CHAN, ELEM, blender::ui::Emboss, blender::ui::Expand, ChannelDriver::expression, ChannelDriver::flag, graph_panel_driverVar__contextProp(), graph_panel_driverVar__locDiff(), graph_panel_driverVar__rotDiff(), graph_panel_driverVar__singleProp(), graph_panel_driverVar__transChan(), IFACE_, uiLayout::label(), blender::ui::Left, LISTBASE_FOREACH, FCurve::modifiers, blender::ui::None, uiLayout::op(), uiLayout::prop(), RAD2DEGF, RNA_pointer_create_discrete(), uiLayout::row(), RPT_, uiLayout::separator(), SNPRINTF_UTF8, TIP_, ChannelDriver::type, UI_block_emboss_set(), UI_block_func_handle_set(), UI_but_func_set(), UI_ITEM_NONE, UI_ITEM_R_ICON_ONLY, UI_UNIT_X, UI_UNIT_Y, uiDefIconBut(), uiDefIconTextBut(), UNUSED_VARS, and ChannelDriver::variables.
Referenced by graph_panel_drivers(), and graph_panel_drivers_popover().
|
static |
Definition at line 1384 of file graph_buttons.cc.
References BKE_ST_MAXNAME, BLI_snprintf_utf8(), get_fmodifier_typeinfo(), GRAPH_FMODIFIER_PANEL_PREFIX, FModifierTypeInfo::name, and FModifier::type.
Referenced by graph_panel_modifiers().
|
static |
Definition at line 63 of file graph_buttons.cc.
References ANIM_animdata_get_context(), C, bAnimListElem::data, get_active_fcurve_channel(), and MEM_freeN().
Referenced by ANIM_graph_context_fcurve(), graph_panel_driven_property(), graph_panel_drivers(), graph_panel_drivers_header(), graph_panel_drivers_poll(), graph_panel_key_properties(), graph_panel_modifiers(), graph_panel_poll(), and graph_panel_properties().
Definition at line 131 of file graph_buttons.cc.
References C, col, uiLayout::column(), CTX_data_scene(), CTX_wm_screen(), CTX_wm_space_graph(), bScreen::id, Scene::id, IFACE_, Panel::layout, SpaceGraph::mode, uiLayout::op(), uiLayout::prop(), RNA_boolean_get(), RNA_id_pointer_create(), RNA_pointer_create_discrete(), SIPO_MODE_DRIVERS, UI_ITEM_NONE, uiLayout::use_property_decorate_set(), and uiLayout::use_property_split_set().
Referenced by graph_buttons_register().
Definition at line 117 of file graph_buttons.cc.
References C, col, uiLayout::column(), CTX_wm_screen(), CTX_wm_space_graph(), bScreen::id, Panel::layout, RNA_pointer_create_discrete(), and UI_ITEM_NONE.
Referenced by graph_buttons_register().
Definition at line 1281 of file graph_buttons.cc.
References C, graph_draw_driven_property_panel(), graph_panel_context(), bAnimListElem::id, Panel::layout, and MEM_freeN().
Referenced by graph_buttons_register().
Definition at line 1297 of file graph_buttons.cc.
References C, graph_draw_driver_settings_panel(), graph_panel_context(), bAnimListElem::id, Panel::layout, and MEM_freeN().
Referenced by graph_buttons_register().
Definition at line 948 of file graph_buttons.cc.
References C, graph_draw_driven_property_enabled_btn(), graph_panel_context(), bAnimListElem::id, IFACE_, Panel::layout, and MEM_freeN().
Referenced by graph_buttons_register().
Definition at line 719 of file graph_buttons.cc.
References C, CTX_wm_space_graph(), graph_panel_context(), SpaceGraph::mode, and SIPO_MODE_DRIVERS.
Referenced by graph_buttons_register().
Definition at line 1323 of file graph_buttons.cc.
References BKE_fcurve_find_by_rna_context_ui(), C, uiLayout::context_ptr_set(), uiLayout::context_set_from_but(), CTX_wm_region(), FCurve::driver, graph_draw_driven_property_enabled_btn(), graph_draw_driven_property_panel(), graph_draw_driver_settings_panel(), IFACE_, uiLayout::label(), Panel::layout, uiLayout::op(), ptr, RNA_pointer_create_discrete(), uiLayout::separator(), and UI_region_active_but_prop_get().
Referenced by graph_buttons_register().
Definition at line 1317 of file graph_buttons.cc.
References C, and ED_operator_graphedit_active().
Referenced by graph_buttons_register().
Definition at line 892 of file graph_buttons.cc.
References BLT_I18NCONTEXT_EDITOR_FILEBROWSER, col, uiLayout::column(), CTX_IFACE_, DTAR_FLAG_FALLBACK_USED, DTAR_FLAG_INVALID, DriverTarget::flag, graph_panel_driverVar_fallback(), uiLayout::prop(), RNA_pointer_create_discrete(), uiLayout::row(), DriverVar::targets, UI_ITEM_NONE, and uiTemplatePathBuilder().
Referenced by graph_draw_driver_settings_panel().
Definition at line 813 of file graph_buttons.cc.
References col, uiLayout::column(), DTAR_FLAG_INVALID, DriverTarget::flag, GS, DriverTarget::id, ID_OB, IFACE_, ID::name, Object::pose, RNA_pointer_create_discrete(), DriverVar::targets, and UI_ITEM_NONE.
Referenced by graph_draw_driver_settings_panel().
Definition at line 779 of file graph_buttons.cc.
References col, uiLayout::column(), DTAR_FLAG_INVALID, DriverTarget::flag, GS, DriverTarget::id, ID_OB, IFACE_, ID::name, Object::pose, RNA_pointer_create_discrete(), DriverVar::targets, and UI_ITEM_NONE.
Referenced by graph_draw_driver_settings_panel().
Definition at line 745 of file graph_buttons.cc.
References BLT_I18NCONTEXT_EDITOR_FILEBROWSER, col, uiLayout::column(), CTX_IFACE_, DTAR_FLAG_FALLBACK_USED, DTAR_FLAG_INVALID, DriverTarget::flag, graph_panel_driverVar_fallback(), DriverTarget::id, IFACE_, uiLayout::red_alert_set(), RNA_id_pointer_create(), RNA_pointer_create_discrete(), uiLayout::row(), DriverVar::targets, uiTemplateAnyID(), and uiTemplatePathBuilder().
Referenced by graph_draw_driver_settings_panel().
Definition at line 857 of file graph_buttons.cc.
References col, uiLayout::column(), DTAR_FLAG_INVALID, DTAR_TRANSCHAN_ROTW, DTAR_TRANSCHAN_ROTX, DTAR_TRANSCHAN_ROTY, DTAR_TRANSCHAN_ROTZ, ELEM, DriverTarget::flag, GS, DriverTarget::id, ID_OB, IFACE_, ID::name, Object::pose, uiLayout::prop(), RNA_pointer_create_discrete(), DriverVar::targets, DriverTarget::transChan, and UI_ITEM_NONE.
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 730 of file graph_buttons.cc.
References DTAR_OPTION_USE_FALLBACK, DriverTarget::options, uiLayout::prop(), uiLayout::row(), and UI_ITEM_NONE.
Referenced by graph_panel_driverVar__contextProp(), and graph_panel_driverVar__singleProp().
Definition at line 351 of file graph_buttons.cc.
References B_REDR, B_UNIT_NONE, FCurve::bezt, BEZT_IPO_BACK, BEZT_IPO_BEZ, BEZT_IPO_ELASTIC, uiLayout::block(), C, col, uiLayout::column(), CTX_wm_region(), FCURVE_DISCRETE_VALUES, bAnimListElem::fcurve_owner_id, ListBase::first, FCurve::flag, FCurve::fpt, get_active_fcurve_keyframe_edit(), graph_panel_context(), graphedit_activekey_handles_cb(), graphedit_activekey_left_handle_coord_cb(), graphedit_activekey_right_handle_coord_cb(), graphedit_activekey_update_cb(), bAnimListElem::id, IFACE_, BezTriple::ipo, uiLayout::label(), Panel::layout, MEM_freeN(), Menu, FCurve::modifiers, Num, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RNA_pointer_create_discrete(), RNA_property_subtype(), RNA_SUBTYPE_UNIT, RPT_, split(), UI_but_func_set(), UI_but_unit_type_set(), UI_ITEM_NONE, UI_UNIT_Y, uiDefButR(), uiItemL_respect_property_split(), uiLayout::use_property_decorate_set(), uiLayout::use_property_split_set(), and ARegion::winx.
Referenced by graph_buttons_register().
Definition at line 1410 of file graph_buttons.cc.
References ANIM_fmodifier_panels(), uiLayout::block(), C, do_graph_region_modifier_buttons(), bAnimListElem::fcurve_owner_id, graph_fmodifier_panel_id(), graph_panel_context(), IFACE_, Panel::layout, MEM_freeN(), FCurve::modifiers, uiLayout::op(), uiLayout::op_menu_enum(), uiLayout::row(), and UI_block_func_handle_set().
Referenced by graph_buttons_register().
Definition at line 106 of file graph_buttons.cc.
References C, and graph_panel_context().
Referenced by graph_buttons_register().
Definition at line 171 of file graph_buttons.cc.
References ANIM_channel_get_typeinfo(), ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, C, col, FCurve::color_mode, uiLayout::column(), FCURVE_COLOR_CUSTOM, FCURVE_DISABLED, bAnimListElem::fcurve_owner_id, FCurve::flag, getname_anim_fcurve(), graph_panel_context(), GS, bAnimListElem::id, ID_code_to_RNA_type(), IFACE_, Panel::layout, MEM_freeN(), bAnimChannelType::name, ID::name, name, RNA_pointer_create_discrete(), RNA_struct_ui_icon(), STRNCPY_UTF8, bAnimListElem::type, UI_ITEM_NONE, uiLayout::use_property_decorate_set(), and uiLayout::use_property_split_set().
Referenced by graph_buttons_register().
|
static |
Definition at line 287 of file graph_buttons.cc.
References BKE_nurb_bezt_handle_test(), C, ELEM, graphedit_activekey_update_cb(), BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, NURB_HANDLE_TEST_EACH, and SELECT.
Referenced by graph_panel_key_properties(), graphedit_activekey_left_handle_coord_cb(), and graphedit_activekey_right_handle_coord_cb().
|
static |
Definition at line 311 of file graph_buttons.cc.
References C, BezTriple::f1, BezTriple::f3, graphedit_activekey_handles_cb(), and SELECT.
Referenced by graph_panel_key_properties().
|
static |
Definition at line 329 of file graph_buttons.cc.
References C, BezTriple::f1, BezTriple::f3, graphedit_activekey_handles_cb(), and SELECT.
Referenced by graph_panel_key_properties().
|
static |
Definition at line 277 of file graph_buttons.cc.
References BKE_fcurve_handles_recalc(), and sort_time_fcurve().
Referenced by graph_panel_key_properties(), and graphedit_activekey_handles_cb().