[Bf-committers] GSoC 2016 - Improve Undo Memory Usage for Mesh Data

Campbell Barton ideasman42 at gmail.com
Tue Mar 22 05:44:25 CET 2016


On Sat, Mar 19, 2016 at 4:02 AM, Nuno Lopes <l33520 at alunos.uevora.pt> wrote:
> Hello Developers !
>
> I am Nuno Lopes and I'm in second year of Computer Science in Universidade
> de Evora, Portugal.
>
> I was looking for blender ideas for this year for google summer of code and
> I found this one that i thought interesting but didn't understand how does
> it store by looking to is description:
>
> "Blender’s undo currently compares memory, only storing arrays which
> differ, however for editing a mesh -
> adding or deleting a single vertex will cause the data to differ, causing
> the undo to store a lot of data for each operation."

This description was incorrect for edit-mode undo (the entire mesh is
store each time),
its since been pointed out and corrected.
However we do use this method of optimizing undo storage for
global-undo (outside of edit-mode).
The point is, simplistic array comparison isn't likely to be all that
efficient when storing incremental changes.

> I didn't understand how it stores, for example:
> I have the initial cube when blender starts:
>      _______
>     /      /|
>    /______/ |
>    |      | |
>    |      | /
>    |______|/
>
>    Are all 8 vertices and 6 faces stored?
>    Then I delete the 4 top vertices, does it store what I deleted(4 top
> vertices, 8 edges and 5 faces) or what still remains(4 bot vertices, 4
> edges, 1 face) ?

Edit-mode uses the BMesh API, see:

- https://wiki.blender.org/index.php/Dev:Source/Modeling/BMesh/Design
- https://developer.blender.org/diffusion/B/browse/master/source/blender/bmesh/bmesh.h

> Best regards,
> Nuno Lopes
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



-- 
- Campbell


More information about the Bf-committers mailing list