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-08-17 00:23:34 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-17 00:23:34 +0400
commit19babf988d2e9e8cb9537161d5e331f35a05c2b5 (patch)
tree2cb1c3d583048c331d77c84b1c3df7988eb2f90e /source/blender/windowmanager/intern
parent5765b1bfa46b76ba93494d074460a6e0471cc3c9 (diff)
2.5: Added operator ui() callback for defining own ui layout
to show properties. * One problem is that we currently have 3 different kinds of property layouts, single column, two column, and single column with text inside button, probably best to reduce this.. * Last operator panel now shows operator name in the header. * Fix extrude operator to not include transform properties anymore, since they are already there now due to macro system.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index dd4728d97af..1cdf68ebc19 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -543,7 +543,12 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 300, 20, style);
- uiDefAutoButsRNA(C, layout, &ptr, 2);
+ uiItemL(layout, op->type->name, 0);
+
+ if(op->type->ui)
+ op->type->ui((bContext*)C, &ptr, layout);
+ else
+ uiDefAutoButsRNA(C, layout, &ptr, 2);
uiPopupBoundsBlock(block, 4.0f, 0, 0);
uiEndBlock(C, block);
@@ -585,7 +590,12 @@ static uiBlock *wm_block_create_menu(bContext *C, ARegion *ar, void *arg_op)
uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1);
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 300, 20, style);
- uiDefAutoButsRNA(C, layout, op->ptr, 2);
+ uiItemL(layout, op->type->name, 0);
+
+ if(op->type->ui)
+ op->type->ui(C, op->ptr, layout);
+ else
+ uiDefAutoButsRNA(C, layout, op->ptr, 2);
uiPopupBoundsBlock(block, 4.0f, 0, 0);
uiEndBlock(C, block);