BlenderPlugins
SystemBlender 4.0+

Guard Edit Mode for MACHIN3tools

Overview

Prevent entering Edit Mode on extremely heavy meshes by patching MACHIN3tools operators and object.mode_set, with optional debug logging.

UI Location

EditPreferencesAdd-ons → search for Guard Edit Mode for MACHIN3tools (debug).

Features

  • Vertex-count guard: Checks the active mesh’s vertex count before allowing Edit Mode, and blocks it when the count exceeds a configurable threshold.
  • Operator patching: Wraps machin3.edit_mode, machin3.mesh_mode, and object.mode_set to enforce the guard, handling both execute() and invoke() where needed.
  • User preferences: Vertex Threshold sets the maximum allowed vertices; Enable debug logging prints detailed events and errors to the system console.
  • Non-destructive: On unregister, restores original operator methods.

Usage

  1. Install and enable the addon.
  2. In the add-on preferences, set Vertex Threshold (e.g. 1,000,000) and optionally enable debug logging to see guard decisions in the console.
  3. Use MACHIN3tools (or Tab/mode switching) as usual — if the active mesh exceeds the threshold when attempting to enter Edit Mode, a popup warns you and the action is cancelled.
  4. Disable or uninstall the addon to remove all patches and restore original behavior.