Blender
V3.3
|
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#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.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "BKE_anim_data.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_fcurve.h"
#include "BKE_fcurve_driver.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_screen.h"
#include "BKE_unit.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_path.h"
#include "RNA_prototypes.h"
#include "ED_anim_api.h"
#include "ED_keyframing.h"
#include "ED_screen.h"
#include "ED_undo.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "graph_intern.h"
Go to the source code of this file.
Macros | |
#define | B_REDR 1 |
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 *UNUSED(arg), int event) |
static void | graph_panel_modifiers (const bContext *C, Panel *panel) |
Graph editor space & buttons.
Definition in file graph_buttons.c.
#define B_FMODIFIER_REDRAW 20 |
Definition at line 1335 of file graph_buttons.c.
#define B_IPO_DEPCHANGE 10 |
Definition at line 619 of file graph_buttons.c.
#define B_REDR 1 |
Definition at line 57 of file graph_buttons.c.
#define GRAPH_FMODIFIER_PANEL_PREFIX "GRAPH" |
The start of FModifier panels registered for the graph editor.
Definition at line 1337 of file graph_buttons.c.
Definition at line 96 of file graph_buttons.c.
References C, graph_panel_context(), and NULL.
Definition at line 621 of file graph_buttons.c.
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_COPY_ON_WRITE, if(), NC_SCENE, ND_FRAME, NULL, scene, AnimData::tmpact, and WM_event_add_notifier().
Referenced by graph_draw_driver_settings_panel().
Definition at line 1347 of file graph_buttons.c.
References B_FMODIFIER_REDRAW, C, NC_ANIMATION, NULL, and WM_event_add_notifier().
Referenced by graph_panel_modifiers().
Definition at line 665 of file graph_buttons.c.
References C, driver_add_new_variable(), and ED_undo_push().
Referenced by graph_draw_driver_settings_panel().
Definition at line 675 of file graph_buttons.c.
References C, driver_free_variable_ex(), and ED_undo_push().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 686 of file graph_buttons.c.
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, TIP_, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and uiItemL().
Referenced by graph_draw_driver_settings_panel().
Definition at line 725 of file graph_buttons.c.
References FCurve::driver, DRIVER_FLAG_INVALID, FCURVE_DISABLED, ChannelDriver::flag, and FCurve::flag.
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 249 of file graph_buttons.c.
References FCurve::bezt, BEZT_ISSEL_ANY, BKE_fcurve_active_keyframe_index(), BLI_assert, FCURVE_ACTIVE_KEYFRAME_NONE, max_ii(), and NULL.
Referenced by graph_panel_key_properties().
void graph_buttons_register | ( | ARegionType * | art | ) |
Definition at line 1398 of file graph_buttons.c.
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_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, PanelType::translation_context, and WM_paneltype_add().
Referenced by ED_spacetype_ipo().
Definition at line 908 of file graph_buttons.c.
References getname_anim_fcurve(), id, ID::name, RNA_pointer_create(), UI_LAYOUT_ALIGN_LEFT, uiItemL(), uiLayoutRow(), and uiLayoutSetAlignment().
Referenced by graph_panel_driven_property(), and graph_panel_drivers_popover().
|
static |
Definition at line 936 of file graph_buttons.c.
References B_IPO_DEPCHANGE, BKE_driver_has_simple_expression(), BLI_listbase_is_empty(), BLI_snprintf(), col, DriverVar::curval, 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_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_LOC_DIFF, DVAR_TYPE_ROT_DIFF, DVAR_TYPE_SINGLE_PROP, DVAR_TYPE_TRANSFORM_CHAN, ELEM, ChannelDriver::expression, ListBase::first, DriverVar::flag, ChannelDriver::flag, G, G_FLAG_SCRIPT_AUTOEXEC, graph_panel_driverVar__locDiff(), graph_panel_driverVar__rotDiff(), graph_panel_driverVar__singleProp(), graph_panel_driverVar__transChan(), IFACE_, FCurve::modifiers, DriverVar::next, NULL, RAD2DEGF, RNA_pointer_create(), DriverTarget::rotation_mode, DriverVar::targets, TIP_, DriverTarget::transChan, DriverVar::type, 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_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(), and ChannelDriver::variables.
Referenced by graph_panel_drivers(), and graph_panel_drivers_popover().
Definition at line 1339 of file graph_buttons.c.
References BKE_ST_MAXNAME, BLI_snprintf(), get_fmodifier_typeinfo(), GRAPH_FMODIFIER_PANEL_PREFIX, FModifierTypeInfo::name, type, and FModifier::type.
Referenced by graph_panel_modifiers().
|
static |
Definition at line 63 of file graph_buttons.c.
References ANIM_animdata_get_context(), C, bAnimListElem::data, get_active_fcurve_channel(), MEM_freeN, and NULL.
Referenced by ANIM_graph_context_fcurve(), graph_panel_driven_property(), graph_panel_drivers(), graph_panel_drivers_poll(), graph_panel_key_properties(), graph_panel_modifiers(), graph_panel_poll(), and graph_panel_properties().
Definition at line 134 of file graph_buttons.c.
References C, col, CTX_data_scene(), CTX_wm_screen(), CTX_wm_space_graph(), Scene::id, bScreen::id, IFACE_, Panel::layout, SpaceGraph::mode, RNA_boolean_get(), RNA_id_pointer_create(), RNA_pointer_create(), scene, SIPO_MODE_DRIVERS, uiItemO(), uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), uiLayoutSetPropDecorate(), and uiLayoutSetPropSep().
Referenced by graph_buttons_register().
Definition at line 117 of file graph_buttons.c.
References C, col, CTX_data_scene(), CTX_wm_screen(), CTX_wm_space_graph(), Scene::id, bScreen::id, Panel::layout, RNA_id_pointer_create(), RNA_pointer_create(), scene, uiItemR(), and uiLayoutColumn().
Referenced by graph_buttons_register().
Definition at line 1235 of file graph_buttons.c.
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 1251 of file graph_buttons.c.
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 736 of file graph_buttons.c.
References C, CTX_wm_space_graph(), graph_panel_context(), SpaceGraph::mode, NULL, and SIPO_MODE_DRIVERS.
Referenced by graph_buttons_register().
Definition at line 1277 of file graph_buttons.c.
References BKE_fcurve_find_by_rna_context_ui(), C, FCurve::driver, graph_draw_driven_property_panel(), graph_draw_driver_settings_panel(), IFACE_, Panel::layout, NULL, PointerRNA::owner_id, ptr, RNA_pointer_create(), UI_context_active_but_prop_get(), uiItemL(), uiItemO(), uiItemS(), uiLayoutSetContextFromBut(), and uiLayoutSetContextPointer().
Referenced by graph_buttons_register().
Definition at line 1271 of file graph_buttons.c.
References C, and ED_operator_graphedit_active().
Referenced by graph_buttons_register().
Definition at line 817 of file graph_buttons.c.
References col, DTAR_FLAG_INVALID, DriverTarget::flag, GS, DriverTarget::id, ID_OB, IFACE_, ID::name, NULL, Object::pose, RNA_pointer_create(), DriverVar::targets, uiItemPointerR(), uiItemR(), uiLayoutColumn(), and uiLayoutSetRedAlert().
Referenced by graph_draw_driver_settings_panel().
Definition at line 778 of file graph_buttons.c.
References col, DTAR_FLAG_INVALID, DriverTarget::flag, GS, DriverTarget::id, ID_OB, IFACE_, ID::name, Object::pose, RNA_pointer_create(), DriverVar::targets, uiItemPointerR(), uiItemR(), uiLayoutColumn(), and uiLayoutSetRedAlert().
Referenced by graph_draw_driver_settings_panel().
|
static |
Definition at line 748 of file graph_buttons.c.
References col, DTAR_FLAG_INVALID, DriverTarget::flag, 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 868 of file graph_buttons.c.
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, NULL, Object::pose, RNA_pointer_create(), DriverVar::targets, DriverTarget::transChan, uiItemPointerR(), uiItemR(), uiLayoutColumn(), and uiLayoutSetRedAlert().
Referenced by graph_draw_driver_settings_panel().
Definition at line 349 of file graph_buttons.c.
References B_REDR, B_UNIT_NONE, FCurve::bezt, BEZT_IPO_BACK, BEZT_IPO_BEZ, BEZT_IPO_ELASTIC, C, 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, NULL, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RNA_pointer_create(), RNA_property_subtype(), RNA_SUBTYPE_UNIT, blender::io::alembic::split(), TIP_, UI_BTYPE_MENU, UI_BTYPE_NUM, UI_but_func_set(), UI_but_unit_type_set(), UI_UNIT_Y, uiDefButR(), uiItemL(), uiItemL_respect_property_split(), uiItemR(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), uiLayoutSplit(), and ARegion::winx.
Referenced by graph_buttons_register().
Definition at line 1357 of file graph_buttons.c.
References ANIM_fmodifier_panels(), C, do_graph_region_modifier_buttons(), bAnimListElem::fcurve_owner_id, graph_fmodifier_panel_id(), graph_panel_context(), IFACE_, Panel::layout, MEM_freeN, FCurve::modifiers, NULL, UI_block_func_handle_set(), uiItemMenuEnumO(), uiItemO(), uiLayoutGetBlock(), and uiLayoutRow().
Referenced by graph_buttons_register().
Definition at line 106 of file graph_buttons.c.
References C, graph_panel_context(), and NULL.
Referenced by graph_buttons_register().
Definition at line 175 of file graph_buttons.c.
References ANIM_channel_get_typeinfo(), ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, C, col, FCurve::color_mode, FCURVE_COLOR_CUSTOM, FCURVE_DISABLED, bAnimListElem::fcurve_owner_id, FCurve::flag, getname_anim_fcurve(), graph_panel_context(), bAnimListElem::id, IFACE_, Panel::layout, MEM_freeN, bAnimChannelType::name, NULL, RNA_pointer_create(), bAnimListElem::type, uiItemL(), uiItemR(), uiLayoutColumn(), uiLayoutSetEnabled(), uiLayoutSetPropDecorate(), and uiLayoutSetPropSep().
Referenced by graph_buttons_register().
Definition at line 285 of file graph_buttons.c.
References BKE_nurb_bezt_handle_test(), C, ELEM, graphedit_activekey_update_cb(), BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, 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 309 of file graph_buttons.c.
References C, BezTriple::f1, BezTriple::f3, graphedit_activekey_handles_cb(), and SELECT.
Referenced by graph_panel_key_properties().
|
static |
Definition at line 327 of file graph_buttons.c.
References C, BezTriple::f1, BezTriple::f3, graphedit_activekey_handles_cb(), and SELECT.
Referenced by graph_panel_key_properties().
|
static |
Definition at line 273 of file graph_buttons.c.
References BKE_fcurve_handles_recalc(), and sort_time_fcurve().
Referenced by graph_panel_key_properties(), and graphedit_activekey_handles_cb().