kopia lustrzana https://github.com/vilemduha/blendercam
fixed import errors for blender 4.2. but may cause problems. still all work on blender 4.1.1
rodzic
cdb0a7e42c
commit
1e11fa9b8c
|
|
@ -72,7 +72,7 @@ from .curvecamtools import (
|
|||
CamObjectSilhouete,
|
||||
)
|
||||
from .engine import (
|
||||
BLENDERCAM_ENGINE,
|
||||
CNCCAM_ENGINE,
|
||||
get_panels,
|
||||
)
|
||||
from .machine_settings import machineSettings
|
||||
|
|
@ -234,7 +234,7 @@ classes = [
|
|||
CamObjectSilhouete,
|
||||
|
||||
# .engine
|
||||
BLENDERCAM_ENGINE,
|
||||
CNCCAM_ENGINE,
|
||||
|
||||
# .machine_settings
|
||||
machineSettings,
|
||||
|
|
@ -382,7 +382,7 @@ def register() -> None:
|
|||
)
|
||||
|
||||
for panel in get_panels():
|
||||
panel.COMPAT_ENGINES.add("BLENDERCAM_RENDER")
|
||||
panel.COMPAT_ENGINES.add("CNCCAM_RENDER")
|
||||
|
||||
wm = bpy.context.window_manager
|
||||
addon_kc = wm.keyconfigs.addon
|
||||
|
|
@ -418,12 +418,12 @@ def unregister() -> None:
|
|||
del scene.cam_slice
|
||||
|
||||
for panel in get_panels():
|
||||
if 'BLENDERCAM_RENDER' in panel.COMPAT_ENGINES:
|
||||
panel.COMPAT_ENGINES.remove('BLENDERCAM_RENDER')
|
||||
if 'CNCCAM_RENDER' in panel.COMPAT_ENGINES:
|
||||
panel.COMPAT_ENGINES.remove('CNCCAM_RENDER')
|
||||
|
||||
wm = bpy.context.window_manager
|
||||
active_kc = wm.keyconfigs.active
|
||||
|
||||
for key in active_kc.keymaps['Object Mode'].keymap_items:
|
||||
if (key.idname == 'wm.call_menu' and key.properties.name == 'VIEW3D_MT_PIE_CAM'):
|
||||
active_kc.keymaps['Object Mode'].keymap_items.remove(key)
|
||||
active_kc.keymaps['Object Mode'].keymap_items.remove(key)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
"""BlenderCAM 'engine.py'
|
||||
"""CNCCAM 'engine.py'
|
||||
|
||||
Engine definition, options and panels.
|
||||
"""
|
||||
|
|
@ -28,9 +28,9 @@ from .ui_panels.pack import CAM_PACK_Panel
|
|||
from .ui_panels.slice import CAM_SLICE_Panel
|
||||
|
||||
|
||||
class BLENDERCAM_ENGINE(RenderEngine):
|
||||
bl_idname = "BLENDERCAM_RENDER"
|
||||
bl_label = "BlenderCAM"
|
||||
class CNCCAM_ENGINE(RenderEngine):
|
||||
bl_idname = "CNCCAM_RENDER"
|
||||
bl_label = "CNC CAM"
|
||||
bl_use_eevee_viewport = True
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1849,8 +1849,9 @@ def updateOperation(self, context):
|
|||
def isValid(o, context):
|
||||
valid = True
|
||||
if o.geometry_source == 'OBJECT':
|
||||
if o.object_name not in bpy.data.objects:
|
||||
valid = False
|
||||
if not o.object_name.endswith('_cut_bridges'): # let empty bridge cut be valid
|
||||
if o.object_name not in bpy.data.objects:
|
||||
valid = False
|
||||
if o.geometry_source == 'COLLECTION':
|
||||
if o.collection_name not in bpy.data.collections:
|
||||
valid = False
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue