-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoldPanel.py
More file actions
64 lines (52 loc) · 2.29 KB
/
moldPanel.py
File metadata and controls
64 lines (52 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import bpy
from . operator import DRMoldHelper
class DRPanel(bpy.types.Panel):
bl_category = "Dauntless Molds"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@classmethod
def poll(cls, context):
obj = context.active_object
return obj is not None and obj.type == 'MESH' and obj.mode in {'OBJECT'}
class DRMoldPanel(DRPanel):
bl_idname = "DR_MOLDS_PT_MoldPanel"
bl_label = "Dauntless Molds"
def draw(self, context):
layout = self.layout
obj = DRMoldHelper.getParentModel(context.active_object)
if(not obj):
return
props = obj.dr_molds
box = layout.box()
box.label(text="Settings")
box.operator("drmold.set_units", text="Set Units To MM Scale")
box.prop(props, "remesh_resolution")
box.prop(props, "sides_upside_down")
#box.prop(props, "symmetry_mode")
box.prop(props, "glove_thickness")
box.prop(props, "glove_rim_height")
box.prop(props, "glove_rim_width")
box.prop(props, "shell_thickness")
box.prop(props, "shell_rim_height")
box.prop(props, "shell_rim_width")
box = layout.box()
box.label(text="Building the mold")
box.operator("drmold.cleanup", text="Clean up")
box.operator("drmold.addfunnel", text="Add funnel")
box.operator("drmold.doall", text="Do all steps")
box = layout.box()
box.label(text="Adding clamps and pins")
box.operator("drmold.addvclamp", text="Add vertical clamp")
box.operator("drmold.addhclamp", text="Add horizontal clamp")
box.operator("drmold.addpin", text="Add pin")
class DRDonatePanel(DRPanel):
bl_idname = "DR_MOLDS_PT_DonatePanel"
bl_label = "Donate"
def draw(self, context):
layout = self.layout
layout.label(text="If you haven't already,")
layout.label(text="Consider donating to the")
layout.label(text="developer of this add-on!")
layout.operator("wm.url_open", text="Paypal.me").url="https://www.paypal.com/paypalme/DauntlessRooster"
layout.operator("wm.url_open", text="Ko-fi (offers credit card donations)").url="https://ko-fi.com/dauntlessrooster"
layout.operator("wm.url_open", text="GitHub link").url="https://github.com/Dekker3D/DauntlessMolds"