diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-12-28 08:45:15 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-12-28 08:45:15 +0300 |
commit | 71da1e96d174fe23da58af3119ccc7c653357585 (patch) | |
tree | 77b398687fdc61a72867bfcf1884934ec047f284 /source/blender/editors/include | |
parent | 24ae6f8c91f598581b6f0cd7cc49182e7dcf3959 (diff) |
Drivers Code Cleanups and UI Tweaks:
- Adding drivers from the UI (not from py-scripts though) will now
automatically add a "Transform Channel" driver variable to the newly
created drivers. This makes setting up drivers a bit more convenient
for the most commonly used case.
- Drivers now report their errors using the Reports system instead of
writing these directly to the console.
- Clarified some comments to be more insightful about the "why's" of
some design decisions, and related formatting/cleanup tweaks
- Reduced scope of "path" vars to just the scope they're required in
- Removed some unused defines from a failed experiment in the original
Keying Sets code ("templates" and "template flags") which was
superseeded by the more flexible + nicer "Builtin KeyingSets"
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_keyframing.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index ff4ec92562f..6dc2fe04227 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -209,29 +209,36 @@ short ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks); /* ************ Drivers ********************** */ +/* Flags for use by driver creation calls */ +typedef enum eCreateDriverFlags { + CREATEDRIVER_WITH_DEFAULT_DVAR = (1<<0), /* create drivers with a default variable for nicer UI */ +} eCreateDriverFlags; + +/* -------- */ + /* Returns whether there is a driver in the copy/paste buffer to paste */ short ANIM_driver_can_paste(void); /* Main Driver Management API calls: * Add a new driver for the specified property on the given ID block */ -short ANIM_add_driver(struct ID *id, const char rna_path[], int array_index, short flag, int type); +short ANIM_add_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag, int type); /* Main Driver Management API calls: * Remove the driver for the specified property on the given ID block (if available) */ -short ANIM_remove_driver(struct ID *id, const char rna_path[], int array_index, short flag); +short ANIM_remove_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); /* Main Driver Management API calls: * Make a copy of the driver for the specified property on the given ID block */ -short ANIM_copy_driver(struct ID *id, const char rna_path[], int array_index, short flag); +short ANIM_copy_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); /* Main Driver Management API calls: * Add a new driver for the specified property on the given ID block or replace an existing one * with the driver + driver-curve data from the buffer */ -short ANIM_paste_driver(struct ID *id, const char rna_path[], int array_index, short flag); +short ANIM_paste_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); /* ************ Auto-Keyframing ********************** */ /* Notes: |