28 lines
941 B
Python
28 lines
941 B
Python
import bpy
|
|
|
|
|
|
class CABLENORMALIZER_PT_panel(bpy.types.Panel):
|
|
bl_label = "Cable Normalizer"
|
|
bl_idname = "CABLENORMALIZER_PT_panel"
|
|
bl_space_type = 'VIEW_3D'
|
|
bl_region_type = 'UI'
|
|
bl_category = "Cable Normalizer"
|
|
|
|
def draw(self, context):
|
|
layout = self.layout
|
|
settings = context.scene.cable_normalizer
|
|
|
|
box = layout.box()
|
|
box.label(text="Dimensions", icon='MESH_DATA')
|
|
box.prop(settings, "target_diameter")
|
|
box.prop(settings, "target_length")
|
|
|
|
box = layout.box()
|
|
box.label(text="Labels", icon='FONT_DATA')
|
|
box.prop(scene, "normalizer_target_label_scale", text="Label Visual Size")
|
|
box.prop(scene, "normalizer_target_label_rotation", text="Label Rotation")
|
|
|
|
layout.separator()
|
|
row = layout.row(align=True)
|
|
row.scale_y = 2.0
|
|
row.operator("cablenormalizer.normalize", text="Normalize Cable", icon='CHECKMARK') |