[Bf-committers] I'm nearly done fixing Text undo
joeedh
joeeagar at prodigy.net
Tue Nov 9 07:55:42 CET 2004
Well,since it looks like this may slide, I've decided that I would jsut
do thsi myself. However, I need to know something about this code
(wrtefile.c):
int BLO_write_file(char *dir, int write_flags, char **error_r)
{
char userfilename[FILE_MAXDIR+FILE_MAXFILE];
char tempname[FILE_MAXDIR+FILE_MAXFILE];
int file, fout, write_user_block;
#ifdef WIN32
char tmpdir[FILE_MAXDIR+FILE_MAXFILE];
#endif
sprintf(tempname, "%s@", dir);
file = open(tempname,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
if(file == -1) {
*error_r= "Unable to open";
return 0;
}
BLI_make_file_string(G.sce, userfilename, BLI_gethome(), ".B.blend");
write_user_block= BLI_streq(dir, userfilename);
What does the above line of code do? I renamed the write_user_block
parameter of write_file_handle to includeNonUndo, since obviously Text
objects should not be included in global undo, and as such the user
blocks are not alone anymore in undo exclusion.
But, I'm afraid that this may not be a pure-undo thing, and as such
could keep text objects from getting saved in a file. As far as I can
tell, it does. . . ehh. . .no, I looked up BLI_streq, but I cant see how
it works. . .
joeedh
More information about the Bf-committers
mailing list