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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-29 09:45:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-29 09:45:06 +0400
commitb0de69b48f8836939b807f3671bbeb8cc3bf6899 (patch)
treef0d01795f62a26431ae4b77421af9a39871dd8df /source/blender/editors/space_outliner/outliner_select.c
parenta7c68afc72e86fff714481f9c2ce796f8782fdb5 (diff)
fix for sequencer selection and naming in the outliner, was broken since 2.5x
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 18769476118..068532a08a2 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -43,6 +43,7 @@
#include "DNA_world_types.h"
#include "BLI_utildefines.h"
+#include "BLI_listbase.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
@@ -52,6 +53,7 @@
#include "ED_armature.h"
#include "ED_object.h"
#include "ED_screen.h"
+#include "ED_sequencer.h"
#include "ED_util.h"
#include "WM_api.h"
@@ -568,16 +570,34 @@ static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *UNUS
return 0;
}
-static int tree_element_active_sequence(TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
+static int tree_element_active_sequence(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
{
Sequence *seq = (Sequence *) te->directdata;
+ Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
if (set) {
-// XXX select_single_seq(seq, 1);
+ /* only check on setting */
+ if (BLI_findindex(ed->seqbasep, seq) != -1) {
+ if (set == 2) {
+ BKE_sequencer_active_set(scene, NULL);
+ }
+ ED_sequencer_deselect_all(scene);
+
+ if (set == 2 && seq->flag & SELECT) {
+ seq->flag &= ~SELECT;
+ }
+ else {
+ seq->flag |= SELECT;
+ BKE_sequencer_active_set(scene, seq);
+ }
+ }
+
+ WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene);
}
else {
- if (seq->flag & SELECT)
- return(1);
+ if (ed->act_seq == seq && seq->flag & SELECT) {
+ return 1;
+ }
}
return(0);
}
@@ -678,7 +698,7 @@ int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops, TreeEl
case TSE_POSEGRP:
return tree_element_active_posegroup(C, scene, te, tselem, set);
case TSE_SEQUENCE:
- return tree_element_active_sequence(te, tselem, set);
+ return tree_element_active_sequence(C, scene, te, tselem, set);
case TSE_SEQUENCE_DUP:
return tree_element_active_sequence_dup(scene, te, tselem, set);
case TSE_KEYMAP_ITEM: