|
Blender V4.3
|
#include <cfloat>#include <cmath>#include <cstdio>#include <cstring>#include "DNA_anim_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_math_rotation.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_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 1391 of file graph_buttons.cc.
Referenced by do_graph_region_modifier_buttons().
| #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 56 of file graph_buttons.cc.
Referenced by graph_panel_key_properties().
| #define GRAPH_FMODIFIER_PANEL_PREFIX "GRAPH" |
The start of FModifier panels registered for the graph editor.
Definition at line 1393 of file graph_buttons.cc.
Referenced by graph_buttons_register(), and graph_fmodifier_panel_id().
Definition at line 95 of file graph_buttons.cc.
References graph_panel_context().
Referenced by fmodifier_get_pointers(), and fmodifier_list_space_specific().
Definition at line 606 of file graph_buttons.cc.
References AnimData::action, B_IPO_DEPCHANGE, BKE_animdata_from_id(), CTX_data_main(), CTX_data_scene(), DEG_id_tag_update_ex(), DEG_relations_tag_update(), FCurve::driver, 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().
Definition at line 1403 of file graph_buttons.cc.
References B_FMODIFIER_REDRAW, NC_ANIMATION, and WM_event_add_notifier().
Referenced by graph_panel_modifiers().
|
static |
Definition at line 650 of file graph_buttons.cc.
References 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 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, 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, RPT_, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and uiItemL().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 710 of file graph_buttons.cc.
References FCurve::driver, ChannelDriver::flag, and FCurve::flag.
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 252 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 1453 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, PanelType::translation_context, and WM_paneltype_add().
Referenced by ED_spacetype_ipo().
|
static |
Definition at line 931 of file graph_buttons.cc.
References label, RNA_pointer_create(), TIP_, UI_BTYPE_CHECKBOX_N, UI_UNIT_X, UI_UNIT_Y, uiDefButR(), and uiLayoutGetBlock().
Referenced by graph_panel_drivers_header(), and graph_panel_drivers_popover().
Definition at line 967 of file graph_buttons.cc.
References getname_anim_fcurve(), GS, ID_code_to_RNA_type(), RNA_struct_ui_icon(), UI_LAYOUT_ALIGN_LEFT, uiItemL(), uiLayoutRow(), and uiLayoutSetAlignment().
Referenced by graph_panel_driven_property(), and graph_panel_drivers_popover().
|
static |
Definition at line 997 of file graph_buttons.cc.
References B_IPO_DEPCHANGE, BKE_driver_has_simple_expression(), BLI_listbase_is_empty(), BLI_STR_UTF8_DEGREE_SIGN, col, 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, 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_, LISTBASE_FOREACH, FCurve::modifiers, RAD2DEGF, RNA_pointer_create(), RPT_, SNPRINTF, TIP_, ChannelDriver::type, UI_block_emboss_set(), UI_block_func_handle_set(), UI_BTYPE_BUT, UI_but_func_set(), UI_EMBOSS, UI_EMBOSS_NONE, UI_ITEM_NONE, UI_ITEM_R_ICON_ONLY, UI_LAYOUT_ALIGN_EXPAND, UI_LAYOUT_ALIGN_LEFT, UI_UNIT_X, UI_UNIT_Y, uiDefIconBut(), uiDefIconTextBut(), uiItemL(), uiItemO(), uiItemR(), uiItemS(), uiLayoutBox(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutRow(), uiLayoutSetAlignment(), UNUSED_VARS, and ChannelDriver::variables.
Referenced by graph_panel_drivers(), and graph_panel_drivers_popover().
|
static |
Definition at line 1395 of file graph_buttons.cc.
References BKE_ST_MAXNAME, BLI_snprintf(), get_fmodifier_typeinfo(), GRAPH_FMODIFIER_PANEL_PREFIX, FModifierTypeInfo::name, and FModifier::type.
Referenced by graph_panel_modifiers().
|
static |
Definition at line 62 of file graph_buttons.cc.
References ANIM_animdata_get_context(), 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 130 of file graph_buttons.cc.
References col, CTX_data_scene(), CTX_wm_screen(), CTX_wm_space_graph(), IFACE_, Panel::layout, SpaceGraph::mode, RNA_boolean_get(), RNA_id_pointer_create(), RNA_pointer_create(), SIPO_MODE_DRIVERS, UI_ITEM_NONE, uiItemO(), uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), uiLayoutSetPropDecorate(), and uiLayoutSetPropSep().
Referenced by graph_buttons_register().
Definition at line 116 of file graph_buttons.cc.
References col, CTX_wm_screen(), CTX_wm_space_graph(), Panel::layout, RNA_pointer_create(), UI_ITEM_NONE, uiItemR(), and uiLayoutColumn().
Referenced by graph_buttons_register().
Definition at line 1292 of file graph_buttons.cc.
References graph_draw_driven_property_panel(), graph_panel_context(), bAnimListElem::id, Panel::layout, and MEM_freeN().
Referenced by graph_buttons_register().
Definition at line 1308 of file graph_buttons.cc.
References graph_draw_driver_settings_panel(), graph_panel_context(), bAnimListElem::id, Panel::layout, and MEM_freeN().
Referenced by graph_buttons_register().
Definition at line 955 of file graph_buttons.cc.
References 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 723 of file graph_buttons.cc.
References CTX_wm_space_graph(), graph_panel_context(), SpaceGraph::mode, and SIPO_MODE_DRIVERS.
Referenced by graph_buttons_register().
Definition at line 1334 of file graph_buttons.cc.
References BKE_fcurve_find_by_rna_context_ui(), CTX_wm_region(), FCurve::driver, graph_draw_driven_property_enabled_btn(), graph_draw_driven_property_panel(), graph_draw_driver_settings_panel(), IFACE_, Panel::layout, PointerRNA::owner_id, ptr, RNA_pointer_create(), UI_region_active_but_prop_get(), uiItemL(), uiItemO(), uiItemS(), uiLayoutSetContextFromBut(), and uiLayoutSetContextPointer().
Referenced by graph_buttons_register().
Definition at line 1328 of file graph_buttons.cc.
References ED_operator_graphedit_active().
Referenced by graph_buttons_register().
|
static |
Definition at line 899 of file graph_buttons.cc.
References BLT_I18NCONTEXT_EDITOR_FILEBROWSER, col, CTX_IFACE_, DTAR_FLAG_FALLBACK_USED, DTAR_FLAG_INVALID, DriverTarget::flag, graph_panel_driverVar_fallback(), RNA_pointer_create(), DriverVar::targets, UI_ITEM_NONE, uiItemR(), uiLayoutColumn(), uiLayoutRow(), uiLayoutSetRedAlert(), and uiTemplatePathBuilder().
Referenced by graph_draw_driver_settings_panel().
Definition at line 817 of file graph_buttons.cc.
References col, DTAR_FLAG_INVALID, DriverTarget::flag, GS, DriverTarget::id, ID_OB, IFACE_, ID::name, Object::pose, RNA_pointer_create(), DriverVar::targets, UI_ITEM_NONE, uiItemPointerR(), uiItemR(), uiLayoutColumn(), and uiLayoutSetRedAlert().
Referenced by graph_draw_driver_settings_panel().
Definition at line 783 of file graph_buttons.cc.
References col, DTAR_FLAG_INVALID, DriverTarget::flag, GS, DriverTarget::id, ID_OB, IFACE_, ID::name, Object::pose, RNA_pointer_create(), DriverVar::targets, UI_ITEM_NONE, uiItemPointerR(), uiItemR(), uiLayoutColumn(), and uiLayoutSetRedAlert().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 749 of file graph_buttons.cc.
References BLT_I18NCONTEXT_EDITOR_FILEBROWSER, col, CTX_IFACE_, DTAR_FLAG_FALLBACK_USED, DTAR_FLAG_INVALID, DriverTarget::flag, graph_panel_driverVar_fallback(), DriverTarget::id, IFACE_, RNA_id_pointer_create(), RNA_pointer_create(), DriverVar::targets, uiLayoutColumn(), uiLayoutRow(), uiLayoutSetRedAlert(), uiTemplateAnyID(), and uiTemplatePathBuilder().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 863 of file graph_buttons.cc.
References col, 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, RNA_pointer_create(), DriverVar::targets, DriverTarget::transChan, UI_ITEM_NONE, uiItemPointerR(), uiItemR(), uiLayoutColumn(), and uiLayoutSetRedAlert().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 734 of file graph_buttons.cc.
References DTAR_OPTION_USE_FALLBACK, DriverTarget::options, UI_ITEM_NONE, uiItemR(), and uiLayoutRow().
Referenced by graph_panel_driverVar__contextProp(), and graph_panel_driverVar__singleProp().
Definition at line 350 of file graph_buttons.cc.
References B_REDR, B_UNIT_NONE, FCurve::bezt, BEZT_IPO_BACK, BEZT_IPO_BEZ, BEZT_IPO_ELASTIC, col, 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, Panel::layout, MEM_freeN(), FCurve::modifiers, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RNA_pointer_create(), RNA_property_subtype(), RNA_SUBTYPE_UNIT, RPT_, UI_BTYPE_MENU, UI_BTYPE_NUM, UI_but_func_set(), UI_but_unit_type_set(), UI_ITEM_NONE, UI_UNIT_Y, uiDefButR(), uiItemL(), uiItemL_respect_property_split(), uiItemR(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), and uiLayoutSplit().
Referenced by graph_buttons_register().
Definition at line 1413 of file graph_buttons.cc.
References ANIM_fmodifier_panels(), do_graph_region_modifier_buttons(), bAnimListElem::fcurve_owner_id, graph_fmodifier_panel_id(), graph_panel_context(), IFACE_, Panel::layout, MEM_freeN(), FCurve::modifiers, UI_block_func_handle_set(), uiItemMenuEnumO(), uiItemO(), uiLayoutGetBlock(), and uiLayoutRow().
Referenced by graph_buttons_register().
Definition at line 105 of file graph_buttons.cc.
References graph_panel_context().
Referenced by graph_buttons_register().
Definition at line 170 of file graph_buttons.cc.
References ANIM_channel_get_typeinfo(), ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, col, FCurve::color_mode, 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, RNA_pointer_create(), RNA_struct_ui_icon(), STRNCPY, bAnimListElem::type, UI_ITEM_NONE, uiItemL(), uiItemR(), uiLayoutColumn(), uiLayoutSetEnabled(), uiLayoutSetPropDecorate(), and uiLayoutSetPropSep().
Referenced by graph_buttons_register().
|
static |
Definition at line 286 of file graph_buttons.cc.
References BKE_nurb_bezt_handle_test(), 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 310 of file graph_buttons.cc.
References BezTriple::f1, BezTriple::f3, graphedit_activekey_handles_cb(), and SELECT.
Referenced by graph_panel_key_properties().
|
static |
Definition at line 328 of file graph_buttons.cc.
References BezTriple::f1, BezTriple::f3, graphedit_activekey_handles_cb(), and SELECT.
Referenced by graph_panel_key_properties().
|
static |
Definition at line 276 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().