mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-01 17:36:27 +00:00
Experimental undo and redo Python prototype (#1539)
* Experimental undo and redo Python prototype * Simplify history, use transaction jargon, use walk for more robust serialisation * Black file, set history size, add file reference to entity_instance constructor * Ensure that files are always passed when entities are wrapped * Add support for undo/redo of all project module operations * Minor fix * Blender to IFC mappings are now managed by Blender RNA, so they don't break on undo operations. See #1475. * Implement undo for all attribute operations. See #1475. * Update documentation for installation of add-on * Revert Blender RNA approach for Blender-IFC mappings, because it didn't scale, but still fix the undo/redo object memory corruption with new "reload_linked_elements" method.
This commit is contained in:
@@ -5,6 +5,19 @@ import blenderbim.bim.import_ifc as import_ifc
|
||||
from blenderbim.bim.ifc import IfcStore
|
||||
|
||||
|
||||
class ValidateIfcFile(bpy.types.Operator):
|
||||
bl_idname = "bim.validate_ifc_file"
|
||||
bl_label = "Validate IFC File"
|
||||
|
||||
def execute(self, context):
|
||||
import ifcopenshell.validate
|
||||
|
||||
logger = logging.getLogger("validate")
|
||||
logger.setLevel(logging.DEBUG)
|
||||
ifcopenshell.validate.validate(IfcStore.get_file(), logger)
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
class ProfileImportIFC(bpy.types.Operator):
|
||||
bl_idname = "bim.profile_import_ifc"
|
||||
bl_label = "Profile Import IFC"
|
||||
|
||||
Reference in New Issue
Block a user