- packed Wheels for `shapely` and `opencamlib` dependencies
- refactored `curvecamequation` to use standard library, no dependencies needed
- removed `bl_info` from `__init__`
- added `blender_manifest.toml` file
- updated preferences references to the new syntax, either:
- `bl_ext` or `__package__`
- this should fix presets and any UI display issues
Blender restricts access to context (required to read and update the addons in preferences) during registration, so the initial implementation would not work.
This update moves the logic into the utils file in the `check_operations_on_load` function.
Added a few lines to the end of the register function in the __init__ file to ensure that the required curve addons are activated when the addon is installed.
Also removed the docstring from version.py as I believe it interfered with the regex in the Github Action
## Pie Menu
- bound to 'Alt + C' by default
- 2 main levels
- CAM - Machine, Tools, Material, Info
- Operation - Feedrate, Cutter, Setup etc
- navigate between all levels with 'Home' and 'Back' buttons
- most, if not all functionality from the ui_panels has been replicated here
## Curve Create Names
- most operations were named after the objects they created
- a few were named 'Create...' e.g. 'Create Lissajous'
- these have been renamed to remove the word 'Create', making them consistent with other Curve Creator names
Cutter and Machine Presets worked without issue.
Operation presets would load, but could not be saved - `AttributeError`
This was caused by 3 errors in `AddPresetCamOperation` in `init`:
- `o.movement.movement.spindle_rotation` changed to `o.movement.spindle_rotation`
- `o.optimize` and `o.optimize_threshold` changed to `o.optimisation.optimize` and `o.optimisation.optimize_threshold`
Discovered this while trying to add a small usability patch that would add an operation if there wasn't already on in the scene, so that loading an operation preset wouldn't cause an error message.
Patch was done by adding a `setup_operation_preset` function in `utils` that would `try: except` to try to adjust an existing operation, but add one if one isn't present.
I also patched the existing operation presets, though they aren't copied to disk by default, so I added a `BoolProperty` to the `AddonPreferences` and copy logic to the `check_operations_on_load` handler so that they will only be copied once. The copy operation does not affect any additional presets the user may have, only the default set that come with the addon.
Also fixed the 'Material Preview' viewport mode.
Previously the object would disappear when switching to that mode.
Render Engines have the option to 'borrow' Material Preview mode from EEVEE via a boolean `bl_use_eevee_viewport = True`
I set that, and added the panels to the Material tab when in Cam.
Commented out `numba` import from the `__init__` for now, until the issues with crashing can be resolved.
Moved `_IS_LOADING_DEFAULTS` out of the `updateMachine` function, declared the default value = False, and grabbed it via `utils.IS_LOADING_DEFAULTS`.
(Note: It was already declared a `global` variable within the function, and I thought that would have been enough to avoid this error, but it works now)
Lastly, altered the cleanup in the `_calc_path` function in `ops.py` - previously it was checking for and deleting objects without issues.
In Blender 4.1 deleting an object would still leave behind mesh data that retained the object name, causing the cleanup function to not recognize and update old operations.
Simply deleting the mesh data solves the issue, as it will also delete the object with it, even though the reverse is no longer true.