blendercam/scripts/addons/cam/ui/panels/slice.py

42 wiersze
1.1 KiB
Python
Czysty Zwykły widok Historia

2024-10-25 02:47:11 +00:00
"""Fabex 'slice.py'
2024-10-22 20:19:27 +00:00
'Slice Model to Plywood Sheets' panel in Properties > Render
"""
import bpy
from bpy.types import Panel
from .buttons_panel import CAMButtonsPanel
class CAM_SLICE_Panel(CAMButtonsPanel, Panel):
"""CAM Slicer Panel"""
2024-10-22 21:13:36 +00:00
2024-10-29 20:58:51 +00:00
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "render"
2024-11-06 10:49:38 +00:00
bl_label = "[ Slice ]"
2024-10-22 20:19:27 +00:00
bl_idname = "WORLD_PT_CAM_SLICE"
2024-10-27 17:54:48 +00:00
bl_options = {"DEFAULT_CLOSED"}
2024-10-24 13:36:37 +00:00
panel_interface_level = 2
2024-10-26 01:17:12 +00:00
use_property_split = True
2024-10-22 20:19:27 +00:00
def draw(self, context):
2024-10-26 01:17:12 +00:00
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False
scene = bpy.context.scene
settings = scene.cam_slice
2024-10-27 17:54:48 +00:00
col = layout.column(align=True)
col.prop(settings, "slice_distance")
col.prop(settings, "slice_above0")
col.prop(settings, "slice_3d")
col.prop(settings, "indexes")
2024-10-29 20:58:51 +00:00
box = layout.box()
col = box.column()
col.scale_y = 1.2
col.operator("object.cam_slice_objects", text="Slice Object", icon="ALIGN_JUSTIFY")