diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-02-12 06:39:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-02-12 06:39:56 +0300 |
commit | b96180ec1763b29bdda4acd6cf79275058bcbde3 (patch) | |
tree | 74782072278e53659f1b1c3e66eaaed6d11e9ced /source/blender/editors/interface/interface.c | |
parent | 12811a096c8ec23477bdc29a02d5d9492d13e94d (diff) |
* Added description string to operator types, should be set along with ot->idname when defining ops.
* User interface uses this as a tooltip when NULL or "" is given.
* Python doc generation includes this description
* Python defined ops take the description as an argument.
* NULL check to image_ops.c, was crashing on exit when there was an image open.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index c2c15a4cd5c..c4bd05f8076 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -2308,6 +2308,10 @@ uiBut *ui_def_but_operator(uiBlock *block, int type, char *opname, int opcontext if(ot) str= ot->name; else str= opname; } + + if ((!tip || tip[0]=='\0') && ot->description) { + tip= ot->description; + } but= ui_def_but(block, type, -1, str, x1, y1, x2, y2, NULL, 0, 0, 0, 0, tip); but->opname= opname; |