-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathslicedSurfacePanel.py
56 lines (44 loc) · 1.6 KB
/
slicedSurfacePanel.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
46
47
48
49
50
51
52
53
54
55
56
import bpy
class SlicedSurfacePanel(bpy.types.Panel):
bl_idname = "panel.sliced_surface_panel"
bl_label = 'SlicedSurface'
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
bl_category = 'Sliced Surface'
bl_options = set()
@classmethod
def poll(self, context):
return (context.mode == 'OBJECT'
and (context.active_object is not None)
and (context.active_object.sliced_surface is not None)
and context.active_object.sliced_surface.sliced_surface)
def draw(self, context):
layout = self.layout
obj = context.active_object.sliced_surface
layout.label('Surface Settings')
col = layout.column(align=True)
col.prop(obj, 'nSlices')
col.prop(obj, 'nRes')
col.prop(obj, 'slice')
col = layout.column(align=True)
col.prop(obj, 'seed')
col.prop(obj, 'amplitude')
col.prop(obj, 'maxFreq')
col.prop(obj, 'numWaves')
col.prop(obj, 'offset')
layout.label('Export SVG')
col = layout.column(align=True)
col.prop(obj, 'height')
col.prop(obj, 'width')
col.prop(obj, 'depth')
col.prop(obj, 'sliceDepth')
col = layout.column(align=True)
col.prop(obj, 'canvasWidth')
col.prop(obj, 'canvasHeight')
layout.operator('mesh.export_sliced_surface')
def register():
bpy.utils.register_class(SlicedSurfacePanel)
print('slicedSurfacePanel.py registered')
def unregister():
bpy.utils.unregister_class(SlicedSurfacePanel)
print('slicedSurfacePanel.py unregistered')