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:
authorAndrea Weikert <elubie@gmx.net>2009-09-12 23:54:39 +0400
committerAndrea Weikert <elubie@gmx.net>2009-09-12 23:54:39 +0400
commit9a25d22326060395b09cd6d81d7b4ac080bafb8f (patch)
treeeb9ef68ff4b155f69d3d8beedc221b72d92ea83c /source/blender/editors/screen/screendump.c
parentc1e2e3fea2dd1b22cf22a9dca4d88bde2d280ab6 (diff)
2.5 filebrowser
Appending and Linking * Linking Operator, invokes filebrowser for Append/Link * Separated the append/link function into three parts: ** BLO_library_append_begin finds main for appending ** BLO_library_append_named_part appends one Object,Group, Material, ... ** BLO_library_append_end actually reads and expands the libraries NOTE 1: I also changed the returned properties for the filebrowser operators to the following convention: "path" - the full path to a file or directory, means what is in directory + filename buttons in filebrowser "directory" - the content of the directory button in filebrowser "filename" - the content of the filename button in filebrowser Usually only path should be required, but in some cases it might be more convenient to retrieve the parts separately. Ton, Brecht: If you have time to take a look, let me know if anything needs to be fixed.
Diffstat (limited to 'source/blender/editors/screen/screendump.c')
-rw-r--r--source/blender/editors/screen/screendump.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 5ae1bdf84aa..fb3da4a5353 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -73,24 +73,24 @@ static int screenshot_exec(bContext *C, wmOperator *op)
if(scd && scd->dumprect) {
Scene *scene= CTX_data_scene(C);
ImBuf *ibuf;
- char filename[FILE_MAX];
+ char path[FILE_MAX];
- RNA_string_get(op->ptr, "filename", filename);
+ RNA_string_get(op->ptr, "path", path);
- strcpy(G.ima, filename);
- BLI_convertstringcode(filename, G.sce);
+ strcpy(G.ima, path);
+ BLI_convertstringcode(path, G.sce);
/* BKE_add_image_extension() checks for if extension was already set */
if(scene->r.scemode & R_EXTENSION)
- if(strlen(filename)<FILE_MAXDIR+FILE_MAXFILE-5)
- BKE_add_image_extension(scene, filename, scene->r.imtype);
+ if(strlen(path)<FILE_MAXDIR+FILE_MAXFILE-5)
+ BKE_add_image_extension(scene, path, scene->r.imtype);
ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0, 0);
ibuf->rect= scd->dumprect;
if(scene->r.planes == 8) IMB_cspace(ibuf, rgb_to_bw);
- BKE_write_ibuf(scene, ibuf, filename, scene->r.imtype, scene->r.subimtype, scene->r.quality);
+ BKE_write_ibuf(scene, ibuf, path, scene->r.imtype, scene->r.subimtype, scene->r.quality);
IMB_freeImBuf(ibuf);
@@ -149,10 +149,10 @@ static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *event)
scd->dumprect= dumprect;
op->customdata= scd;
- if(RNA_property_is_set(op->ptr, "filename"))
+ if(RNA_property_is_set(op->ptr, "path"))
return screenshot_exec(C, op);
- RNA_string_set(op->ptr, "filename", G.ima);
+ RNA_string_set(op->ptr, "path", G.ima);
WM_event_add_fileselect(C, op);
@@ -173,7 +173,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot)
ot->flag= 0;
- WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE);
+ WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL);
RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
}
@@ -327,7 +327,7 @@ void SCREEN_OT_screencast(wmOperatorType *ot)
ot->flag= 0;
- RNA_def_property(ot->srna, "filename", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property(ot->srna, "path", PROP_STRING, PROP_FILEPATH);
RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
}