diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-08-17 00:23:34 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-08-17 00:23:34 +0400 |
commit | 19babf988d2e9e8cb9537161d5e331f35a05c2b5 (patch) | |
tree | 2cb1c3d583048c331d77c84b1c3df7988eb2f90e /source/blender/editors/space_file/file_panels.c | |
parent | 5765b1bfa46b76ba93494d074460a6e0471cc3c9 (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/editors/space_file/file_panels.c')
-rw-r--r-- | source/blender/editors/space_file/file_panels.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index f3c18859fb0..30598d39d58 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -170,23 +170,28 @@ static void file_panel_operator(const bContext *C, Panel *pa) wmOperator *op= sfile->op; int empty= 1; - RNA_STRUCT_BEGIN(op->ptr, prop) { - if(strcmp(RNA_property_identifier(prop), "rna_type") == 0) - continue; - if(strcmp(RNA_property_identifier(prop), "filename") == 0) - continue; - if(strcmp(RNA_property_identifier(prop), "display") == 0) - continue; - if(strncmp(RNA_property_identifier(prop), "filter", 6) == 0) - continue; - - uiItemFullR(pa->layout, NULL, 0, op->ptr, prop, -1, 0, 0, 0, 0); - empty= 0; + if(op->type->ui) { + op->type->ui((bContext*)C, op->ptr, pa->layout); } - RNA_STRUCT_END; + else { + RNA_STRUCT_BEGIN(op->ptr, prop) { + if(strcmp(RNA_property_identifier(prop), "rna_type") == 0) + continue; + if(strcmp(RNA_property_identifier(prop), "filename") == 0) + continue; + if(strcmp(RNA_property_identifier(prop), "display") == 0) + continue; + if(strncmp(RNA_property_identifier(prop), "filter", 6) == 0) + continue; + + uiItemFullR(pa->layout, NULL, 0, op->ptr, prop, -1, 0, 0, 0, 0); + empty= 0; + } + RNA_STRUCT_END; - if(empty) - uiItemL(pa->layout, "No properties.", 0); + if(empty) + uiItemL(pa->layout, "No properties.", 0); + } } void file_panels_register(ARegionType *art) |