fix: apply api
clean: ipc port propertie
This commit is contained in:
@ -374,15 +374,6 @@ Network
|
|||||||
|
|
||||||
Advanced network settings
|
Advanced network settings
|
||||||
|
|
||||||
**IPC Port** is the port used for Inter Process Communication. This port is used
|
|
||||||
by the multi-user subprocesses to communicate with each other. If different instances
|
|
||||||
of multi-user are using the same IPC port, this will create conflict !
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
You only need to modify this setting if you need to launch multiple clients from the same
|
|
||||||
computer (or if you try to host and join from the same computer). To resolve this, you simply need to enter a different
|
|
||||||
**IPC port** for each blender instance.
|
|
||||||
|
|
||||||
**Timeout (in milliseconds)** is the maximum ping authorized before auto-disconnecting.
|
**Timeout (in milliseconds)** is the maximum ping authorized before auto-disconnecting.
|
||||||
You should only increase it if you have a bad connection.
|
You should only increase it if you have a bad connection.
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ from operator import itemgetter
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
from time import gmtime, strftime
|
from time import gmtime, strftime
|
||||||
|
import traceback
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import _pickle as pickle
|
import _pickle as pickle
|
||||||
@ -247,7 +248,6 @@ class SessionStartOperator(bpy.types.Operator):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.report({'ERROR'}, repr(e))
|
self.report({'ERROR'}, repr(e))
|
||||||
logging.error(f"Error: {e}")
|
logging.error(f"Error: {e}")
|
||||||
import traceback
|
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
# Join a session
|
# Join a session
|
||||||
else:
|
else:
|
||||||
@ -604,14 +604,16 @@ class SessionApply(bpy.types.Operator):
|
|||||||
force=True,
|
force=True,
|
||||||
force_dependencies=self.reset_dependencies)
|
force_dependencies=self.reset_dependencies)
|
||||||
if node_ref.bl_reload_parent:
|
if node_ref.bl_reload_parent:
|
||||||
for parent in session.repository.find_parents(self.target):
|
for parent in session.repository.get_parents(self.target):
|
||||||
logging.debug(f"Refresh parent {parent}")
|
logging.debug(f"Refresh parent {parent}")
|
||||||
|
|
||||||
apply(session.repository,
|
apply(session.repository,
|
||||||
parent,
|
parent.uuid,
|
||||||
force=True)
|
force=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.report({'ERROR'}, repr(e))
|
self.report({'ERROR'}, repr(e))
|
||||||
return {"CANCELED"}
|
traceback.print_exc()
|
||||||
|
return {"CANCELLED"}
|
||||||
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
@ -66,14 +66,6 @@ def update_ip(self, context):
|
|||||||
self['ip'] = "127.0.0.1"
|
self['ip'] = "127.0.0.1"
|
||||||
|
|
||||||
|
|
||||||
def update_port(self, context):
|
|
||||||
max_port = self.port + 3
|
|
||||||
|
|
||||||
if self.ipc_port < max_port and \
|
|
||||||
self['ipc_port'] >= self.port:
|
|
||||||
logging.error(
|
|
||||||
"IPC Port in conflict with the port, assigning a random value")
|
|
||||||
self['ipc_port'] = random.randrange(self.port+4, 10000)
|
|
||||||
|
|
||||||
|
|
||||||
def update_directory(self, context):
|
def update_directory(self, context):
|
||||||
@ -174,12 +166,6 @@ class SessionPrefs(bpy.types.AddonPreferences):
|
|||||||
supported_datablocks: bpy.props.CollectionProperty(
|
supported_datablocks: bpy.props.CollectionProperty(
|
||||||
type=ReplicatedDatablock,
|
type=ReplicatedDatablock,
|
||||||
)
|
)
|
||||||
ipc_port: bpy.props.IntProperty(
|
|
||||||
name="ipc_port",
|
|
||||||
description='internal ttl port(only useful for multiple local instances)',
|
|
||||||
default=random.randrange(5570, 70000),
|
|
||||||
update=update_port,
|
|
||||||
)
|
|
||||||
init_method: bpy.props.EnumProperty(
|
init_method: bpy.props.EnumProperty(
|
||||||
name='init_method',
|
name='init_method',
|
||||||
description='Init repo',
|
description='Init repo',
|
||||||
|
@ -121,7 +121,7 @@ class ApplyTimer(Timer):
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
else:
|
else:
|
||||||
if node_ref.bl_reload_parent:
|
if node_ref.bl_reload_parent:
|
||||||
for parent in session.repository.find_parents(node):
|
for parent in session.repository.get_parents(node):
|
||||||
logging.debug("Refresh parent {node}")
|
logging.debug("Refresh parent {node}")
|
||||||
apply(session.repository, parent, force=True)
|
apply(session.repository, parent, force=True)
|
||||||
|
|
||||||
|
@ -251,9 +251,6 @@ class SESSION_PT_advanced_settings(bpy.types.Panel):
|
|||||||
emboss=False)
|
emboss=False)
|
||||||
|
|
||||||
if settings.sidebar_advanced_net_expanded:
|
if settings.sidebar_advanced_net_expanded:
|
||||||
net_section_row = net_section.row()
|
|
||||||
net_section_row.label(text="IPC Port:")
|
|
||||||
net_section_row.prop(settings, "ipc_port", text="")
|
|
||||||
net_section_row = net_section.row()
|
net_section_row = net_section.row()
|
||||||
net_section_row.label(text="Timeout (ms):")
|
net_section_row.label(text="Timeout (ms):")
|
||||||
net_section_row.prop(settings, "connection_timeout", text="")
|
net_section_row.prop(settings, "connection_timeout", text="")
|
||||||
|
Reference in New Issue
Block a user