Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-02-27 05:03:33 +0300
committerJoshua Leung <aligorith@gmail.com>2010-02-27 05:03:33 +0300
commitbe44ac74907b3b38d8b3a3f7626f25fced02744c (patch)
tree59b7f982532965ab287f3484dbe00760396b02b4 /source/blender/editors
parent15db857628198195936b80115329b8356645ea68 (diff)
* Renaming some Keying Sets API functions to make the terminology more consistent in the UI
* Fixed bug with hotkeys for adding properties to Keying Sets using the KKEY over the relevant buttons. Was calling the remove callback instead.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/keyingsets.c32
-rw-r--r--source/blender/editors/interface/interface_handlers.c2
-rw-r--r--source/blender/editors/space_outliner/outliner.c4
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
4 files changed, 11 insertions, 29 deletions
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index f1d84fb1066..63323a8519d 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -355,7 +355,7 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op)
}
/* add path to this setting */
- BKE_keyingset_add_destination(ks, ptr.id.data, NULL, path, index, pflag, KSP_GROUP_KSNAME);
+ BKE_keyingset_add_path(ks, ptr.id.data, NULL, path, index, pflag, KSP_GROUP_KSNAME);
ks->active_path= BLI_countlist(&ks->paths);
success= 1;
@@ -426,7 +426,7 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
KS_Path *ksp;
/* try to find a path matching this description */
- ksp= BKE_keyingset_find_destination(ks, ptr.id.data, ks->name, path, index, KSP_GROUP_KSNAME);
+ ksp= BKE_keyingset_find_path(ks, ptr.id.data, ks->name, path, index, KSP_GROUP_KSNAME);
if (ksp) {
/* just free it... */
@@ -1162,31 +1162,13 @@ static int keyingset_relative_get_templates (KeyingSet *ks)
return templates;
}
-/* Check if context data is suitable for the given absolute Keying Set */
+/* Check if context data is suitable for the given Keying Set */
short keyingset_context_ok_poll (bContext *C, KeyingSet *ks)
{
- ScrArea *sa= CTX_wm_area(C);
-
- /* data retrieved from context depends on active editor */
- if (sa == NULL) return 0;
-
- switch (sa->spacetype) {
- case SPACE_VIEW3D:
- {
- Object *obact= CTX_data_active_object(C);
-
- /* if in posemode, check if 'pose-channels' requested for in KeyingSet */
- if ((obact && obact->pose) && (obact->mode & OB_MODE_POSE)) {
- /* check for posechannels */
-
- }
- else {
- /* check for selected object */
-
- }
- }
- break;
- }
+ // TODO:
+ // For 'relative' keyingsets (i.e. py-keyingsets), add a call here
+ // which basically gets a listing of all the paths to be used for this
+ // set.
return 1;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 9624adf4879..0dd8e3d412d 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4015,7 +4015,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
if(event->alt)
ui_but_anim_remove_keyingset(C);
else
- ui_but_anim_remove_keyingset(C);
+ ui_but_anim_add_keyingset(C);
ED_region_tag_redraw(CTX_wm_region(C));
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 795546fdda7..8a07e99e280 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -3977,14 +3977,14 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
{
/* add a new path with the information obtained (only if valid) */
// TODO: what do we do with group name? for now, we don't supply one, and just let this use the KeyingSet name
- BKE_keyingset_add_destination(ks, id, NULL, path, array_index, flag, groupmode);
+ BKE_keyingset_add_path(ks, id, NULL, path, array_index, flag, groupmode);
ks->active_path= BLI_countlist(&ks->paths);
}
break;
case KEYINGSET_EDITMODE_REMOVE:
{
/* find the relevant path, then remove it from the KeyingSet */
- KS_Path *ksp= BKE_keyingset_find_destination(ks, id, NULL, path, array_index, groupmode);
+ KS_Path *ksp= BKE_keyingset_find_path(ks, id, NULL, path, array_index, groupmode);
if (ksp) {
/* free path's data */
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 3aef2711370..9d236bd47db 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -4718,7 +4718,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
Object *ob;
// short redrawipo=0, resetslowpar=1;
int cancelled= (t->state == TRANS_CANCEL);
- short duplicate= (t->undostr && strstr(t->undostr, "Duplicate")) ? 1 : 0;
+ short duplicate= (t->undostr && strstr(t->undostr, "Duplicate")) ? 1 : 0; /* see bugreport #21229 for reasons for this data */
/* early out when nothing happened */
if (t->total == 0 || t->mode == TFM_DUMMY)