[Bf-committers] I'm nearly done fixing Text undo
Ton Roosendaal
ton at blender.org
Tue Nov 9 12:47:36 CET 2004
Hi,
I need a more complete description of the problem...
What text undo, in the Text Window, or in 3D window for 'Text Object'?
The latter I've added sunday, and you can just report problems with it
to me.
Local undo for the texteditor gets lost after doing a 'global' undo
yes. That's not easy to bypass, also as result of having no UI
information in the undo system.
-Ton-
On 9 Nov, 2004, at 7:55, joeedh wrote:
> 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
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton at blender.org
http://www.blender.org
More information about the Bf-committers
mailing list