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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-22 22:39:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-22 22:39:44 +0400
commitaf02a0aa4e0b80c3c1154e7be095f4a387f81179 (patch)
tree3f714e683c96929cc4e44962570860ab0f635bc9 /source/blender/editors/interface/interface_utils.c
parent643d59bb9bf3bdd46f41a0b8c79384146629f9c8 (diff)
UI
* Headers and menus can now be created in python. * Replaced the uiMenuItem functions to create menus with equivalent uiItem functions using a layout, removing duplicated code. * More uiItem functions are now exposed to python. * The text editor header, panels and one of its menus are now created in space_text.py. * Buttons window data context icon new changes depending on active object. Issues * Icons are not wrapped yet, hardcoded ints at the moment. * The ID browse template is unfinished.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r--source/blender/editors/interface/interface_utils.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 5ef1e68bd59..3bb7581b16c 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -297,7 +297,7 @@ int uiDefAutoButsRNA(const bContext *C, uiBlock *block, PointerRNA *ptr)
char *name;
int x= 0, y= 0;
- layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, x, y, DEF_BUT_WIDTH*2, 20);
+ layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, x, y, DEF_BUT_WIDTH*2, 20);
uiLayoutColumn(layout);
uiItemL(layout, (char*)RNA_struct_ui_name(ptr->type), 0);
@@ -317,7 +317,7 @@ int uiDefAutoButsRNA(const bContext *C, uiBlock *block, PointerRNA *ptr)
uiLayoutColumn(uiLayoutSub(layout, 0));
uiItemL(uiLayoutSub(layout, 0), name, 0);
uiLayoutColumn(uiLayoutSub(layout, 1));
- uiItemFullR(uiLayoutSub(layout, 1), "", 0, ptr, prop, -1, 0);
+ uiItemFullR(uiLayoutSub(layout, 1), "", 0, ptr, prop, -1, 0, 0);
}
RNA_property_collection_end(&iter);
@@ -506,18 +506,7 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code,
uiBlockSetButLock(block, id->lib!=0, "Can't edit external libdata");
/* name button */
- if(GS(id->name)==ID_SCE)
- strcpy(str1, "SCE:");
- else if(GS(id->name)==ID_SCE)
- strcpy(str1, "SCR:");
- else if(GS(id->name)==ID_MA && ((Material*)id)->use_nodes)
- strcpy(str1, "NT:");
- else {
- str1[0]= id->name[0];
- str1[1]= id->name[1];
- str1[2]= ':';
- str1[3]= 0;
- }
+ text_idbutton(id, str1);
if(GS(id->name)==ID_IP) len= 110;
else if((y) && (GS(id->name)==ID_AC)) len= 100; // comes from button panel (poselib)