diff options
-rw-r--r-- | source/blender/editors/animation/fmodifier_ui.c | 14 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 1 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 6 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 3 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_fcurve.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 1 |
9 files changed, 20 insertions, 24 deletions
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 35c578d3ea8..b1241bd274c 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -331,7 +331,6 @@ static void draw_modifier__noise(uiLayout *layout, ID *id, FModifier *fcm, short static void draw_modifier__sound(const bContext *C, uiLayout *layout, ID *id, FModifier *fcm, short width) { FMod_Sound *data= (FMod_Sound *)fcm->data; - uiLayout *split, *col; PointerRNA ptr; /* init the RNA-pointer */ @@ -348,16 +347,9 @@ static void draw_modifier__sound(const bContext *C, uiLayout *layout, ID *id, FM /* blending mode */ uiItemR(layout, NULL, 0, &ptr, "modification", 0); - /* split into 2 columns */ - split= uiLayoutSplit(layout, 0.5f); - - /* col 1 */ - col= uiLayoutColumn(split, 0); - uiItemR(col, NULL, 0, &ptr, "strength", 0); - - /* col 2 */ - col= uiLayoutColumn(split, 0); - uiItemR(col, NULL, 0, &ptr, "delay", 0); + /* settings */ + uiItemR(layout, NULL, 0, &ptr, "strength", 0); + uiItemR(layout, NULL, 0, &ptr, "delay", 0); } else { diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 82ff756f601..00b060b836b 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -560,6 +560,7 @@ void UI_exit(void); #define UI_LAYOUT_PANEL 0 #define UI_LAYOUT_HEADER 1 #define UI_LAYOUT_MENU 2 +#define UI_LAYOUT_TOOLBAR 3 #define UI_UNIT_X 20 #define UI_UNIT_Y 20 diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 53ccc253b99..9ffd2bf434a 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -629,7 +629,11 @@ PointerRNA uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, IDP but= uiDefIconButO(block, BUT, ot->idname, context, icon, 0, 0, w, UI_UNIT_Y, NULL); else but= uiDefButO(block, BUT, ot->idname, context, (char*)name, 0, 0, w, UI_UNIT_Y, NULL); - + + /* text alignment for toolbar buttons */ + if((layout->root->type == UI_LAYOUT_TOOLBAR) && !icon) + but->flag |= UI_TEXT_LEFT; + /* assign properties */ if(properties || (flag & UI_ITEM_O_RETURN_PROPS)) { PointerRNA *opptr= uiButGetOperatorPtrRNA(but); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 649b19e2089..fa577f6be66 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2451,9 +2451,6 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct case BUT: wt= widget_type(UI_WTYPE_EXEC); - if (!(but->flag & UI_HAS_ICON)) { - but->flag |= UI_TEXT_LEFT; - } break; case NUM: diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 0f22b3041fb..08a05f4646a 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1272,7 +1272,15 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex } if(open) { - panel->layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, + short panelContext; + + /* panel context can either be toolbar region or normal panels region */ + if (ar->regiontype == RGN_TYPE_TOOLS) + panelContext= UI_LAYOUT_TOOLBAR; + else + panelContext= UI_LAYOUT_PANEL; + + panel->layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, panelContext, style->panelspace, 0, w-2*style->panelspace, em, style); pt->draw(C, panel); diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index d58055d05b2..08ac9194fcb 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -156,7 +156,7 @@ static void file_free(SpaceLink *sl) static void file_init(struct wmWindowManager *wm, ScrArea *sa) { SpaceFile *sfile= (SpaceFile*)sa->spacedata.first; - printf("file_init\n"); + //printf("file_init\n"); if(sfile->layout) sfile->layout->dirty= 1; } diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index eaffdc2cf29..67d562da23b 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -229,11 +229,6 @@ static int rna_FCurve_modifiers_remove(FCurve *fcu, bContext *C, int index) return remove_fmodifier_index(&fcu->modifiers, index); } -static int rna_Sound_id_editable(PointerRNA *ptr) -{ - return PROP_EDITABLE; -} - #else static void rna_def_fmodifier_generator(BlenderRNA *brna) @@ -578,7 +573,6 @@ static void rna_def_fmodifier_sound(BlenderRNA *brna) prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Sound"); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_editable_func(prop, "rna_Sound_id_editable"); RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this modifier."); } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index ad47a1c5535..d42e862052f 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1800,6 +1800,7 @@ static void rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "active_shape_key_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "shapenr"); + RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); // XXX this is really unpredictable... RNA_def_property_int_funcs(prop, "rna_Object_active_shape_key_index_get", "rna_Object_active_shape_key_index_set", "rna_Object_active_shape_key_index_range"); RNA_def_property_ui_text(prop, "Active Shape Key Index", "Current shape key index."); RNA_def_property_update(prop, 0, "rna_Object_active_shape_update"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 0aa669e20ec..babbf701bd6 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2340,7 +2340,6 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "set", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "set"); RNA_def_property_struct_type(prop, "Scene"); - //RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK); RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL); RNA_def_property_ui_text(prop, "Set Scene", "Background set scene."); |