feat: server preset

This commit is contained in:
Fabian 2021-06-08 17:03:43 +02:00
parent b6a8a2ec01
commit a1b6fb0533
2 changed files with 22 additions and 0 deletions

View File

@ -34,6 +34,8 @@ from queue import Queue
from time import gmtime, strftime
import traceback
from bpy.props import FloatProperty
try:
import _pickle as pickle
except ImportError:
@ -902,6 +904,17 @@ class SessionLoadSaveOperator(bpy.types.Operator, ImportHelper):
def poll(cls, context):
return True
class SessionPresetServerAdd(bpy.types.Operator):
"""Add a server to the server list preset"""
bl_idname = "session.preset_server_add"
bl_label = "add server preset"
bl_description = "add the current server preset to the server preset list"
bl_options = {"REGISTER"}
# name :
def menu_func_import(self, context):
self.layout.operator(SessionLoadSaveOperator.bl_idname, text='Multi-user session snapshot (.db)')

View File

@ -172,6 +172,15 @@ class SESSION_PT_settings_network(bpy.types.Panel):
row = box.row()
row.operator("session.start", text="HOST").host = True
else:
row = box.row()
row.prop(settings, "init_method", text="Preset")
# row = box.row()
# row.template_list("SERVER_group","server_group",settings,"server_group", settings, "active_server", rows=3)
# col = row.column(align=True)
# col.operator("session.preset_server_add", icon='ADD', text="")
# col.operator("session.preset_server_remove", icon='REMOVE', text="")
row = box.row()
row.prop(settings, "ip", text="IP")
row = box.row()