This repository has been archived by the owner on Dec 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
panel.py
45 lines (38 loc) · 1.35 KB
/
panel.py
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
import bpy
import operator
class ClothExporter_PT_Panel(bpy.types.Panel):
bl_idname = "ClothExporter_PT_Panel"
bl_label = "Cloth Exporter for Unity"
bl_description = "Exports cloth data in a unique topology for Unity"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_category = "Cloth Exporter"
def draw(self, context):
layout = self.layout
obj = context.object
scene = context.scene
prop_ClothExp = scene.prop_ClothExp
if (obj != None):
if (obj.data.is_editmode):
row = layout.row()
row.operator("cloth_exporter.transform", text="Transform Mesh for PBD")
row = layout.row()
row.prop(prop_ClothExp, "mass")
row = layout.row()
row.prop(prop_ClothExp, "inv_mass")
row.enabled = False
row = layout.row()
row.prop(prop_ClothExp, "filename")
row = layout.row()
row.prop(prop_ClothExp, "directory")
row = layout.row()
row.operator("cloth_exporter.export", text="Export data for Unity")
else:
layout.label(text="Enter edit mode to access the features.")
# box = layout.box()
# row = box.row()
# row.label(text="Distance Constraint")
# row = box.row()
# row.prop(prop_ClothExp, "compression_stiffness")
# row = box.row()
# row.prop(prop_ClothExp, "strech_stiffness")