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:
authorCampbell Barton <ideasman42@gmail.com>2009-02-12 06:39:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-02-12 06:39:56 +0300
commitb96180ec1763b29bdda4acd6cf79275058bcbde3 (patch)
tree74782072278e53659f1b1c3e66eaaed6d11e9ced /source/blender/editors
parent12811a096c8ec23477bdc29a02d5d9492d13e94d (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')
-rw-r--r--source/blender/editors/interface/interface.c4
-rw-r--r--source/blender/editors/space_image/image_ops.c3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c5
3 files changed, 12 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;
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index e24e7254553..51bca9d4fcc 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1221,6 +1221,9 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info)
ImBuf *ibuf= ED_space_image_buffer(sima);
ImageSampleInfo *info= arg_info;
+ if(ibuf == NULL)
+ return;
+
draw_image_info(ar, ibuf->channels, info->x, info->y, info->colp,
info->colfp, info->zp, info->zfp);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 5ab149ff6ca..c91972ec4f3 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -213,6 +213,7 @@ void SEQUENCER_OT_add_scene_strip(struct wmOperatorType *ot)
/* identifiers */
ot->name= "Add Scene Strip";
ot->idname= "SEQUENCER_OT_add_scene_strip";
+ ot->description= "Add a strip to the sequencer using a blender scene as a source";
/* api callbacks */
ot->invoke= sequencer_add_scene_strip_invoke;
@@ -300,6 +301,7 @@ void SEQUENCER_OT_add_movie_strip(struct wmOperatorType *ot)
/* identifiers */
ot->name= "Add Movie Strip";
ot->idname= "SEQUENCER_OT_add_movie_strip";
+ ot->description= "Add a movie strip to the sequencer";
/* api callbacks */
ot->invoke= sequencer_add_movie_strip_invoke;
@@ -400,6 +402,7 @@ void SEQUENCER_OT_add_sound_strip(struct wmOperatorType *ot)
/* identifiers */
ot->name= "Add Sound Strip";
ot->idname= "SEQUENCER_OT_add_sound_strip";
+ ot->description= "Add a sound strip to the sequencer";
/* api callbacks */
ot->invoke= sequencer_add_sound_strip_invoke;
@@ -492,6 +495,7 @@ void SEQUENCER_OT_add_image_strip(struct wmOperatorType *ot)
/* identifiers */
ot->name= "Add Image Strip";
ot->idname= "SEQUENCER_OT_add_image_strip";
+ ot->description= "Add an image or image sequence to the sequencer";
/* api callbacks */
ot->invoke= sequencer_add_image_strip_invoke;
@@ -623,6 +627,7 @@ void SEQUENCER_OT_add_effect_strip(struct wmOperatorType *ot)
/* identifiers */
ot->name= "Add Effect Strip";
ot->idname= "SEQUENCER_OT_add_effect_strip";
+ ot->description= "Add an effect to the sequencer, most are applied ontop of existing strips";
/* api callbacks */
ot->invoke= sequencer_add_effect_strip_invoke;