diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-06 15:34:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-06 15:34:18 +0400 |
commit | acc88c9772795ffcbca352710626f83a870148a1 (patch) | |
tree | 26b37049f1a5b4bd87dd02316288cf2f4526b384 /source | |
parent | 880c43ad5a53203b64a6d6a51e239a4bfc6ed540 (diff) |
initial support for sequencer UI layout, anyone wants some monkey-work there are quite a few effects panels to do.
- buttons_context_path_sequencer() is a place holder
- ipo_frame_locked renamed to frame_locked
- added scene.sequence_editor.active_strip
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 13 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_header.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequence.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 1 |
6 files changed, 27 insertions, 2 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 3e6fa9c6cff..029fc75f0ae 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -96,6 +96,16 @@ static int buttons_context_path_world(ButsContextPath *path) return 0; } +// XXX - place holder, need to get this working +static int buttons_context_path_sequencer(ButsContextPath *path) +{ + PointerRNA *ptr= &path->ptr[path->len-1]; + + /* this one just verifies */ + return RNA_struct_is_a(ptr->type, &RNA_Scene); +} + + static int buttons_context_path_object(ButsContextPath *path) { Scene *scene; @@ -302,6 +312,9 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path) case BCONTEXT_WORLD: found= buttons_context_path_world(path); break; + case BCONTEXT_SEQUENCER: + found= buttons_context_path_sequencer(path); // XXX - place holder + break; case BCONTEXT_OBJECT: case BCONTEXT_PHYSICS: case BCONTEXT_MODIFIER: diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 03b2ce9d11c..12ee528f8e0 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -182,6 +182,9 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) if(!ob && !ELEM(sbuts->mainb, (float)BCONTEXT_SCENE, (float)BCONTEXT_WORLD)) sbuts->mainb = (float)BCONTEXT_WORLD; + + if(!ob && !ELEM(sbuts->mainb, (float)BCONTEXT_SCENE, (float)BCONTEXT_SEQUENCER)) + sbuts->mainb = (float)BCONTEXT_SEQUENCER; if((ob && ELEM5(ob->type, OB_EMPTY, OB_MBALL, OB_LAMP, OB_CAMERA, OB_ARMATURE)) && (sbuts->mainb == (float) BCONTEXT_MODIFIER)) sbuts->mainb = (float)BCONTEXT_DATA; @@ -190,6 +193,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) uiBlockBeginAlign(block); uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene"); uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_WORLD, 0, 0, "World"); + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SEQUENCE, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_SEQUENCER, 0, 0, "Sequencer"); // Specific panels, check on active object seletion if(ob) { diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 57ca7cc23d8..35b398fbbb7 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -176,6 +176,8 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, vertical, "scene"); else if(sbuts->mainb == BCONTEXT_WORLD) ED_region_panels(C, ar, vertical, "world"); + else if(sbuts->mainb == BCONTEXT_SEQUENCER) + ED_region_panels(C, ar, vertical, "sequencer"); else if(sbuts->mainb == BCONTEXT_OBJECT) ED_region_panels(C, ar, vertical, "object"); else if(sbuts->mainb == BCONTEXT_DATA) diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index b2c5121c1ed..b32be6cb369 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -477,6 +477,7 @@ typedef struct SpaceImaSel { #define BCONTEXT_GAME 8 #define BCONTEXT_BONE 9 #define BCONTEXT_MODIFIER 10 +#define BCONTEXT_SEQUENCER 11 /* sbuts->flag */ diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c index 302e7623b18..813a3bf39e8 100644 --- a/source/blender/makesrna/intern/rna_sequence.c +++ b/source/blender/makesrna/intern/rna_sequence.c @@ -308,9 +308,9 @@ static void rna_def_sequence(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MUTE); RNA_def_property_ui_text(prop, "Mute", ""); - prop= RNA_def_property(srna, "ipo_frame_locked", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "frame_locked", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_IPO_FRAME_LOCKED); - RNA_def_property_ui_text(prop, "IPO Frame Locked", "Lock the IPO coordinates to the global frame counter."); + RNA_def_property_ui_text(prop, "Frame Locked", "Lock the animation curve to the global frame counter."); prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK); @@ -385,6 +385,10 @@ void rna_def_editor(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Sequence"); RNA_def_property_ui_text(prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip."); RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_SequenceEdtior_meta_stack_get", 0, 0, 0); + + prop= RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "act_seq"); + RNA_def_property_ui_text(prop, "Active Strip", "Sequencers active strip"); } static void rna_def_filter_video(StructRNA *srna) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 55c56beea7c..fc0cd36c1ad 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -488,6 +488,7 @@ static void rna_def_space_buttons(BlenderRNA *brna) {BCONTEXT_GAME, "GAME", "Game", ""}, {BCONTEXT_BONE, "BONE", "Bone", ""}, {BCONTEXT_MODIFIER, "MODIFIER", "Modifier", ""}, + {BCONTEXT_SEQUENCER, "SEQUENCER", "Sequencer", ""}, {0, NULL, NULL, NULL}}; static EnumPropertyItem panel_alignment_items[] = { |