-
Notifications
You must be signed in to change notification settings - Fork 0
/
sync_panel.py
31 lines (28 loc) · 1.32 KB
/
sync_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
import bpy
class SyncPanel(bpy.types.Panel):
bl_idname = "panel.codesync_panel"
bl_space_type = "TEXT_EDITOR"
bl_region_type = "UI"
bl_category = "Text"
bl_label = "CodeSync"
def draw(self, context):
self.layout.label(text="Sync tools")
self.layout.operator("texts.sync_to_device", icon="FILE_SCRIPT",
text="Sync to device")
self.layout.operator("texts.sync_from_device", icon="FILE_SCRIPT",
text="Sync from device")
self.layout.operator("texts.back_up", icon="FILE_BACKUP",
text="BackUp to device")
self.layout.separator()
self.layout.label(text="Live sync")
lsrow = self.layout.row(align=True)
lsrow.operator("texts.start_live_sync", icon="PASTEDOWN",
text="Start")
lsrow.operator("texts.stop_live_sync", icon="PANEL_CLOSE",
text="Stop")
self.layout.separator()
self.layout.label(text="Delete scripts")
self.layout.operator("texts.del_device_scripts", icon="REMOVE",
text="Delete in-device scripts")
self.layout.operator("texts.del_blend_scripts", icon="REMOVE",
text="Delete in-blend scripts")