homemaker-addon icon indicating copy to clipboard operation
homemaker-addon copied to clipboard

Undo functionality needs to use Blenderbim hooks

Open brunopostle opened this issue 2 years ago • 1 comments

Undo currently sort-of works: if there are no IfcProject collections in the blender file, the Blenderbim ifcstore singleton is flushed, and the IFC model is generated as if this was a fresh project.

This works with a single building project, as there is no need to retain any other IFC buildings, however when there are other buildings in the ifcstore, this flushing step is skipped (to avoid destroying user data), the result is duplicated buildings (as undo only removes the blender geometry and collections).

Blenderbim registers the ifcstore with blender so as to allow clean undo, the Homemaker-addon needs to use the same hooks.

brunopostle avatar Feb 27 '22 11:02 brunopostle

See IfcOpenShell/IfcOpenShell#2200

brunopostle avatar May 23 '22 20:05 brunopostle