diff options
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/Makefile | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 4 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 1 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/drivers.c | 4 | ||||
-rw-r--r-- | source/blender/editors/animation/fmodifier_ui.c | 44 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 7 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 1 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_general.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 18 | ||||
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 36 |
12 files changed, 57 insertions, 66 deletions
diff --git a/source/blender/editors/animation/Makefile b/source/blender/editors/animation/Makefile index a7f36aa58ac..f120091e917 100644 --- a/source/blender/editors/animation/Makefile +++ b/source/blender/editors/animation/Makefile @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The Original Code is Copyright (C) 2007 Blender Foundation # All rights reserved. diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 21bdb591df9..e229de42006 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -33,6 +33,7 @@ #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_key_types.h" +#include "DNA_gpencil_types.h" #include "RNA_access.h" #include "RNA_define.h" @@ -2005,7 +2006,6 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf) /* delete */ WM_keymap_add_item(keymap, "ANIM_OT_channels_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "ANIM_OT_channels_delete", DELKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "ANIM_OT_channels_delete", BACKSPACEKEY, KM_PRESS, 0, 0); /* settings */ WM_keymap_add_item(keymap, "ANIM_OT_channels_setting_toggle", WKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index a9c9830f07f..0ff75c1cded 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -49,7 +49,6 @@ #include "DNA_anim_types.h" #include "DNA_armature_types.h" -#include "DNA_constraint_types.h" #include "DNA_camera_types.h" #include "DNA_lamp_types.h" #include "DNA_lattice_types.h" @@ -64,6 +63,8 @@ #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_world_types.h" +#include "DNA_gpencil_types.h" +#include "DNA_object_types.h" #include "MEM_guardedalloc.h" @@ -80,7 +81,6 @@ #include "BKE_material.h" #include "BKE_node.h" #include "BKE_sequencer.h" -#include "BKE_utildefines.h" #include "ED_anim_api.h" diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 65c67691560..719b46738d3 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -1201,7 +1201,6 @@ void ED_marker_keymap(wmKeyConfig *keyconf) WM_keymap_verify_item(keymap, "MARKER_OT_select_all", AKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "MARKER_OT_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "MARKER_OT_delete", DELKEY, KM_PRESS, 0, 0); - WM_keymap_verify_item(keymap, "MARKER_OT_delete", BACKSPACEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MARKER_OT_move", GKEY, KM_PRESS, 0, 0); #ifdef DURIAN_CAMERA_SWITCH diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 11ba3cfffed..9570fd64433 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -163,7 +163,7 @@ void ANIM_OT_change_frame(wmOperatorType *ot) ot->poll= change_frame_poll; /* flags */ - ot->flag= OPTYPE_BLOCKING; + ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO; /* rna */ RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME); diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 3fc228e1c15..9edcf637cdc 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -389,7 +389,7 @@ static int add_driver_button_exec (bContext *C, wmOperator *op) if (success) { /* send updates */ - DAG_ids_flush_update(0); + DAG_ids_flush_update(CTX_data_main(C), 0); WM_event_add_notifier(C, NC_ANIMATION|ND_FCURVES_ORDER, NULL); // XXX } @@ -440,7 +440,7 @@ static int remove_driver_button_exec (bContext *C, wmOperator *op) if (success) { /* send updates */ - DAG_ids_flush_update(0); + DAG_ids_flush_update(CTX_data_main(C), 0); WM_event_add_notifier(C, NC_ANIMATION|ND_FCURVES_ORDER, NULL); // XXX } diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index cd6714ec51f..191316711f4 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -119,7 +119,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s but= uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL); uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL); - uiDefButR(block, TOG, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "additive", -1, 0, 0, -1, -1, NULL); + uiDefButR(block, TOG, B_FMODIFIER_REDRAW, NULL, 0, 0, width-30, UI_UNIT_Y, &ptr, "use_additive", -1, 0, 0, -1, -1, NULL); uiBlockEndAlign(block); /* now add settings for individual modes */ @@ -226,7 +226,7 @@ static void draw_modifier__fn_generator(uiLayout *layout, ID *id, FModifier *fcm /* add the settings */ col= uiLayoutColumn(layout, 1); uiItemR(col, &ptr, "function_type", 0, "", 0); - uiItemR(col, &ptr, "additive", UI_ITEM_R_TOGGLE, NULL, 0); + uiItemR(col, &ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, 0); col= uiLayoutColumn(layout, 0); // no grouping for now uiItemR(col, &ptr, "amplitude", 0, NULL, 0); @@ -254,14 +254,14 @@ static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, shor /* before range */ col= uiLayoutColumn(split, 1); uiItemL(col, "Before:", 0); - uiItemR(col, &ptr, "before_mode", 0, "", 0); - uiItemR(col, &ptr, "before_cycles", 0, NULL, 0); + uiItemR(col, &ptr, "mode_before", 0, "", 0); + uiItemR(col, &ptr, "cycles_before", 0, NULL, 0); /* after range */ col= uiLayoutColumn(split, 1); uiItemL(col, "After:", 0); - uiItemR(col, &ptr, "after_mode", 0, "", 0); - uiItemR(col, &ptr, "after_cycles", 0, NULL, 0); + uiItemR(col, &ptr, "mode_after", 0, "", 0); + uiItemR(col, &ptr, "cycles_after", 0, NULL, 0); } /* --------------- */ @@ -276,14 +276,14 @@ static void draw_modifier__noise(uiLayout *layout, ID *id, FModifier *fcm, short RNA_pointer_create(id, &RNA_FModifierNoise, fcm, &ptr); /* blending mode */ - uiItemR(layout, &ptr, "modification", 0, NULL, 0); + uiItemR(layout, &ptr, "blend_type", 0, NULL, 0); /* split into 2 columns */ split= uiLayoutSplit(layout, 0.5f, 0); /* col 1 */ col= uiLayoutColumn(split, 0); - uiItemR(col, &ptr, "size", 0, NULL, 0); + uiItemR(col, &ptr, "scale", 0, NULL, 0); uiItemR(col, &ptr, "strength", 0, NULL, 0); /* col 2 */ @@ -473,8 +473,8 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh uiItemR(col, &ptr, "reference_value", 0, NULL, 0); row= uiLayoutRow(col, 1); - uiItemR(row, &ptr, "default_minimum", 0, "Min", 0); - uiItemR(row, &ptr, "default_maximum", 0, "Max", 0); + uiItemR(row, &ptr, "default_min", 0, "Min", 0); + uiItemR(row, &ptr, "default_max", 0, "Max", 0); /* control points header */ // TODO: move this control-point control stuff to using the new special widgets for lists @@ -526,13 +526,13 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor /* x-minimum */ col= uiLayoutColumn(split, 1); - uiItemR(col, &ptr, "use_minimum_x", 0, NULL, 0); - uiItemR(col, &ptr, "minimum_x", 0, NULL, 0); + uiItemR(col, &ptr, "use_min_x", 0, NULL, 0); + uiItemR(col, &ptr, "min_x", 0, NULL, 0); /* y-minimum*/ col= uiLayoutColumn(split, 1); - uiItemR(col, &ptr, "use_minimum_y", 0, NULL, 0); - uiItemR(col, &ptr, "minimum_y", 0, NULL, 0); + uiItemR(col, &ptr, "use_min_y", 0, NULL, 0); + uiItemR(col, &ptr, "min_y", 0, NULL, 0); } /* row 2: maximum */ @@ -544,13 +544,13 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor /* x-minimum */ col= uiLayoutColumn(split, 1); - uiItemR(col, &ptr, "use_maximum_x", 0, NULL, 0); - uiItemR(col, &ptr, "maximum_x", 0, NULL, 0); + uiItemR(col, &ptr, "use_max_x", 0, NULL, 0); + uiItemR(col, &ptr, "max_x", 0, NULL, 0); /* y-minimum*/ col= uiLayoutColumn(split, 1); - uiItemR(col, &ptr, "use_maximum_y", 0, NULL, 0); - uiItemR(col, &ptr, "maximum_y", 0, NULL, 0); + uiItemR(col, &ptr, "use_max_y", 0, NULL, 0); + uiItemR(col, &ptr, "max_y", 0, NULL, 0); } } @@ -567,8 +567,8 @@ static void draw_modifier__stepped(uiLayout *layout, ID *id, FModifier *fcm, sho /* block 1: "stepping" settings */ col= uiLayoutColumn(layout, 0); - uiItemR(col, &ptr, "step_size", 0, NULL, 0); - uiItemR(col, &ptr, "offset", 0, NULL, 0); + uiItemR(col, &ptr, "frame_step", 0, NULL, 0); + uiItemR(col, &ptr, "frame_offset", 0, NULL, 0); /* block 2: start range settings */ col= uiLayoutColumn(layout, 1); @@ -616,7 +616,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie uiBlockSetEmboss(block, UI_EMBOSSN); /* expand */ - uiItemR(subrow, &ptr, "expanded", UI_ITEM_R_ICON_ONLY, "", 0); + uiItemR(subrow, &ptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", 0); /* checkbox for 'active' status (for now) */ uiItemR(subrow, &ptr, "active", UI_ITEM_R_ICON_ONLY, "", 0); @@ -633,7 +633,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie /* 'mute' button */ - uiItemR(subrow, &ptr, "muted", UI_ITEM_R_ICON_ONLY, "", 0); + uiItemR(subrow, &ptr, "mute", UI_ITEM_R_ICON_ONLY, "", 0); uiBlockSetEmboss(block, UI_EMBOSSN); diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 2290909325e..02e141a7a69 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -53,19 +53,14 @@ #include "DNA_node_types.h" #include "DNA_particle_types.h" #include "DNA_world_types.h" +#include "DNA_gpencil_types.h" -#include "BKE_action.h" -#include "BKE_depsgraph.h" -#include "BKE_fcurve.h" #include "BKE_key.h" #include "BKE_material.h" -#include "BKE_object.h" #include "BKE_global.h" // XXX remove me! -#include "BKE_context.h" #include "BKE_utildefines.h" #include "BIF_gl.h" -#include "BIF_glutil.h" #include "UI_resources.h" #include "UI_view2d.h" diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 3175e9e34a7..17d674784f8 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -48,7 +48,6 @@ #include "DNA_scene_types.h" #include "DNA_world_types.h" -#include "BKE_action.h" #include "BKE_fcurve.h" #include "BKE_key.h" #include "BKE_material.h" diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index abced485769..5073cfe08b8 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -40,9 +40,7 @@ #include "DNA_scene_types.h" -#include "BKE_action.h" #include "BKE_fcurve.h" -#include "BKE_key.h" #include "BKE_utildefines.h" #include "ED_anim_api.h" diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index f60181d7f6c..fc5649be869 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -45,15 +45,16 @@ #include "DNA_key_types.h" #include "DNA_material_types.h" #include "DNA_scene_types.h" +#include "DNA_object_types.h" #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_constraint.h" #include "BKE_depsgraph.h" #include "BKE_fcurve.h" +#include "BKE_main.h" #include "BKE_nla.h" #include "BKE_global.h" -#include "BKE_utildefines.h" #include "BKE_context.h" #include "BKE_report.h" #include "BKE_key.h" @@ -1060,6 +1061,7 @@ static int modify_key_op_poll(bContext *C) static int insert_key_exec (bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); KeyingSet *ks= NULL; int type= RNA_int_get(op->ptr, "type"); @@ -1106,7 +1108,7 @@ static int insert_key_exec (bContext *C, wmOperator *op) BKE_report(op->reports, RPT_WARNING, "Keying Set failed to insert any keyframes"); /* send updates */ - DAG_ids_flush_update(0); + DAG_ids_flush_update(bmain, 0); return OPERATOR_FINISHED; } @@ -1202,6 +1204,7 @@ void ANIM_OT_keyframe_insert_menu (wmOperatorType *ot) static int delete_key_exec (bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); KeyingSet *ks= NULL; int type= RNA_int_get(op->ptr, "type"); @@ -1248,7 +1251,7 @@ static int delete_key_exec (bContext *C, wmOperator *op) BKE_report(op->reports, RPT_WARNING, "Keying Set failed to remove any keyframes"); /* send updates */ - DAG_ids_flush_update(0); + DAG_ids_flush_update(bmain, 0); return OPERATOR_FINISHED; } @@ -1287,6 +1290,7 @@ void ANIM_OT_keyframe_delete (wmOperatorType *ot) static int delete_key_v3d_exec (bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap @@ -1315,7 +1319,7 @@ static int delete_key_v3d_exec (bContext *C, wmOperator *op) CTX_DATA_END; /* send updates */ - DAG_ids_flush_update(0); + DAG_ids_flush_update(bmain, 0); WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, NULL); @@ -1343,6 +1347,7 @@ void ANIM_OT_keyframe_delete_v3d (wmOperatorType *ot) static int insert_key_button_exec (bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); PointerRNA ptr; PropertyRNA *prop= NULL; @@ -1400,7 +1405,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op) if (success) { /* send updates */ - DAG_ids_flush_update(0); + DAG_ids_flush_update(bmain, 0); /* send notifiers that keyframes have been changed */ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); @@ -1430,6 +1435,7 @@ void ANIM_OT_keyframe_insert_button (wmOperatorType *ot) static int delete_key_button_exec (bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); PointerRNA ptr; PropertyRNA *prop= NULL; @@ -1470,7 +1476,7 @@ static int delete_key_button_exec (bContext *C, wmOperator *op) if (success) { /* send updates */ - DAG_ids_flush_update(0); + DAG_ids_flush_update(bmain, 0); /* send notifiers that keyframes have been changed */ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 1c06266a148..ab236de9ac5 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -40,20 +40,14 @@ #include "BLI_dynstr.h" #include "DNA_anim_types.h" -#include "DNA_constraint_types.h" #include "DNA_scene_types.h" +#include "DNA_object_types.h" +#include "BKE_main.h" #include "BKE_animsys.h" -#include "BKE_action.h" #include "BKE_context.h" -#include "BKE_constraint.h" #include "BKE_depsgraph.h" -#include "BKE_fcurve.h" -#include "BKE_utildefines.h" -#include "BKE_context.h" #include "BKE_report.h" -#include "BKE_key.h" -#include "BKE_material.h" #include "ED_keyframing.h" #include "ED_screen.h" @@ -288,6 +282,7 @@ void ANIM_OT_keying_set_path_remove (wmOperatorType *ot) static int add_keyingset_button_exec (bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); KeyingSet *ks = NULL; PropertyRNA *prop= NULL; @@ -358,7 +353,7 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op) if (success) { /* send updates */ - DAG_ids_flush_update(0); + DAG_ids_flush_update(bmain, 0); /* for now, only send ND_KEYS for KeyingSets */ WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL); @@ -388,6 +383,7 @@ void ANIM_OT_keyingset_button_add (wmOperatorType *ot) static int remove_keyingset_button_exec (bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); KeyingSet *ks = NULL; PropertyRNA *prop= NULL; @@ -440,7 +436,7 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op) if (success) { /* send updates */ - DAG_ids_flush_update(0); + DAG_ids_flush_update(bmain, 0); /* for now, only send ND_KEYS for KeyingSets */ WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL); @@ -526,20 +522,12 @@ ListBase builtin_keyingsets = {NULL, NULL}; /* Find KeyingSet type info given a name */ KeyingSetInfo *ANIM_keyingset_info_find_named (const char name[]) { - KeyingSetInfo *ksi; - /* sanity checks */ if ((name == NULL) || (name[0] == 0)) return NULL; /* search by comparing names */ - for (ksi = keyingset_type_infos.first; ksi; ksi = ksi->next) { - if (strcmp(ksi->idname, name) == 0) - return ksi; - } - - /* no matches found */ - return NULL; + return BLI_findstring(&keyingset_type_infos, name, offsetof(KeyingSetInfo, idname)); } /* Find builtin KeyingSet by name */ @@ -589,7 +577,7 @@ void ANIM_keyingset_info_register (const bContext *C, KeyingSetInfo *ksi) /* Remove the given KeyingSetInfo from the list of type infos, and also remove the builtin set if appropriate */ void ANIM_keyingset_info_unregister (const bContext *C, KeyingSetInfo *ksi) { - Scene *scene = CTX_data_scene(C); + Main *bmain= CTX_data_main(C); KeyingSet *ks, *ksn; /* find relevant builtin KeyingSets which use this, and remove them */ @@ -600,8 +588,14 @@ void ANIM_keyingset_info_unregister (const bContext *C, KeyingSetInfo *ksi) /* remove if matching typeinfo name */ if (strcmp(ks->typeinfo, ksi->idname) == 0) { + Scene *scene; BKE_keyingset_free(ks); - BLI_freelinkN(&scene->keyingsets, ks); + BLI_remlink(&builtin_keyingsets, ks); + + for(scene= bmain->scene.first; scene; scene= scene->id.next) + BLI_remlink_safe(&scene->keyingsets, ks); + + MEM_freeN(ks); } } |