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:
authorMartin Poirier <theeth@yahoo.com>2010-01-22 00:58:40 +0300
committerMartin Poirier <theeth@yahoo.com>2010-01-22 00:58:40 +0300
commitb400703403dd87c482824a1b10f40923c67412e4 (patch)
treeea6a6f97b09936ae6a4e60c789077e84105d7868 /source/blender/editors/space_view3d/view3d_toolbar.c
parent0d4583365a84078fac8351925b5caa663d64a108 (diff)
Macro operator properties using property groups in groups (initial code by brecht).
Works correctly with menu, keymap definitions and keymap export/import. Properties set in the macro definition overwrite those set by the user (there's no way to see that in the UI at this point). MISSING: Python operator calling code to fill in the properties hierarchy. Also contains some keymap export changes by Imran Syed (freakabcd on irc): the exported configuration will use the name of the file and the exported script will select the added configuration when ran.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_toolbar.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index a08413293a5..eb292b4bccc 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -159,6 +159,19 @@ static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa)
else BLI_strncpy(pa->drawname, "Operator", sizeof(pa->drawname));
}
+static void view3d_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOperator *op)
+{
+ if(op->type->flag & OPTYPE_MACRO) {
+ for(op= op->macro.first; op; op= op->next) {
+ uiItemL(pa->layout, op->idname, 0);
+ view3d_panel_operator_redo_operator(C, pa, op);
+ }
+ }
+ else {
+ view3d_panel_operator_redo_buts(C, pa, op);
+ }
+}
+
static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
{
wmOperator *op= view3d_last_operator(C);
@@ -173,13 +186,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa)
uiBlockSetFunc(block, redo_cb, op, NULL);
- if(op->macro.first) {
- for(op= op->macro.first; op; op= op->next)
- view3d_panel_operator_redo_buts(C, pa, op);
- }
- else {
- view3d_panel_operator_redo_buts(C, pa, op);
- }
+ view3d_panel_operator_redo_operator(C, pa, op);
}
/* ******************* */