[Bf-taskforce25] Tool state and undo

Brecht Van Lommel brecht at blender.org
Mon Jun 22 15:20:22 CEST 2009


Hi Nicholas,

On Sun, 2009-06-21 at 13:23 -0400, Nicholas Bishop wrote: 
> That last undo removes the stroke from step 3, but it also reverts the
> change to the brush size in step 2. This could be sort-of fixed by
> doing an undo push for step 2, but this doesn't give exactly the right
> workflow either. I think ideally all these sculpt/brush settings
> should stay the same through the sculpting session regardless of
> undo/redo, and still of course be saved with the file. Is there a good
> way to do this?

Currently the undo code keeps the Screen datablock through undo's
(lib_link_screen_restore), this could be extended to Brush datablocks.
The same could also be done for other sculpt settings, but this is of
course a broader issue, it applies to all tool settings, which should
all be moved to ToolSettings.

I'm not sure what the ideal place is to store the settings. In cases it
may be useful to get them as part of the scene as is done now, but it
seems more logical to have them at the same level as screens (not inside
a screen, you want to keep the settings when switching screens). The
most logical place then seems to be the Main struct. There isn't any
other data like this stored at that level, but it makes sense to me.

ToolSettings could also be made an ID block, I don't really see the
point of that so I wouldn't do it, but perhaps someone can think of an
argument for it?

Brecht.





More information about the Bf-taskforce25 mailing list