Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de9255f71c | |||
| 99528ea3e0 | |||
| bb342951a5 | |||
| 438a79177b | |||
| 08fc49c40f | |||
| d7e25b1192 | |||
| 1671422143 | |||
| a9620c0752 | |||
| 583beaf6fe | |||
| 126d2338f2 | |||
| 24b0c0ed8a | |||
| 07fc1cf000 | |||
| 8e0131b3a8 | |||
| 912a2d524c | |||
| 82a5124d64 | |||
| cca5bf903b | |||
| 4c0d4cb1c7 | |||
| ca64797641 | |||
| a49d9ee437 | |||
| 4c1cd6b8f8 | |||
| d6cda709a6 | |||
| 4bc0feb3a5 | |||
| 59aab7159a | |||
| 0a798bb21b | |||
| beaafce4fa | |||
| 6f77337832 | |||
| 07252d62df | |||
| ac615cd134 | |||
| 4846fbb589 | |||
| cf44e547a2 | |||
| 0269363c63 | |||
| 4ffca17c54 | |||
| fc91b252f4 | |||
| 41c7c569ca | |||
| a82d263f05 |
@@ -212,14 +212,14 @@ You can run the dedicated server on any platform by following these steps:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
replication.server
|
||||
replication.serve
|
||||
|
||||
.. hint::
|
||||
You can also specify a custom **port** (-p), **timeout** (-t), **admin password** (-pwd), **log level (ERROR, WARNING, INFO or DEBUG)** (-l) and **log file** (-lf) with the following optional arguments
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
replication.server -p 5555 -pwd admin -t 5000 -l INFO -lf server.log
|
||||
replication.serve -p 5555 -pwd admin -t 5000 -l INFO -lf server.log
|
||||
|
||||
Here, for example, a server is instantiated on port 5555, with password 'admin', a 5 second timeout, and logging enabled.
|
||||
|
||||
@@ -562,7 +562,7 @@ The default Docker image essentially runs the equivalent of:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
replication.server -pwd admin -p 5555 -t 5000 -l DEBUG -lf multiuser_server.log
|
||||
replication.serve -pwd admin -p 5555 -t 5000 -l DEBUG -lf multiuser_server.log
|
||||
|
||||
This means the server will be launched with 'admin' as the administrator password, run on ports 5555:5558, use a timeout of 5 seconds, verbose 'DEBUG' log level, and with log files written to 'multiuser_server.log'. See :ref:`cmd-line` for a description of optional parameters.
|
||||
|
||||
@@ -572,7 +572,7 @@ For example, I would like to launch my server with a different administrator pas
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
python3 -m replication.server -pwd supersecretpassword -p 5555 -t 3000 -l DEBUG -lf logname.log
|
||||
replication.serve -pwd supersecretpassword -p 5555 -t 3000 -l DEBUG -lf logname.log
|
||||
|
||||
Now, my configuration should look like this:
|
||||
|
||||
@@ -691,7 +691,7 @@ We're finally ready to launch the server. Simply run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
python3 -m replication.server -p 5555 -pwd admin -t 5000 -l INFO -lf server.log
|
||||
replication.serve -p 5555 -pwd admin -t 5000 -l INFO -lf server.log
|
||||
|
||||
See :ref:`cmd-line` for a description of optional parameters
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ def register():
|
||||
from . import operators
|
||||
from . import handlers
|
||||
from . import ui
|
||||
from . import icons
|
||||
from . import preferences
|
||||
from . import addon_updater_ops
|
||||
|
||||
@@ -70,6 +71,7 @@ def register():
|
||||
operators.register()
|
||||
handlers.register()
|
||||
ui.register()
|
||||
icons.register()
|
||||
except ModuleNotFoundError as e:
|
||||
raise Exception(module_error_msg)
|
||||
logging.error(module_error_msg)
|
||||
@@ -83,7 +85,9 @@ def register():
|
||||
type=preferences.SessionUser
|
||||
)
|
||||
bpy.types.WindowManager.user_index = bpy.props.IntProperty()
|
||||
bpy.types.WindowManager.server_index = bpy.props.IntProperty()
|
||||
bpy.types.TOPBAR_MT_file_import.append(operators.menu_func_import)
|
||||
bpy.types.TOPBAR_MT_file_export.append(operators.menu_func_export)
|
||||
|
||||
|
||||
def unregister():
|
||||
@@ -91,14 +95,17 @@ def unregister():
|
||||
from . import operators
|
||||
from . import handlers
|
||||
from . import ui
|
||||
from . import icons
|
||||
from . import preferences
|
||||
from . import addon_updater_ops
|
||||
|
||||
bpy.types.TOPBAR_MT_file_import.remove(operators.menu_func_import)
|
||||
bpy.types.TOPBAR_MT_file_export.remove(operators.menu_func_export)
|
||||
|
||||
presence.unregister()
|
||||
addon_updater_ops.unregister()
|
||||
ui.unregister()
|
||||
icons.unregister()
|
||||
handlers.unregister()
|
||||
operators.unregister()
|
||||
preferences.unregister()
|
||||
@@ -107,5 +114,6 @@ def unregister():
|
||||
del bpy.types.ID.uuid
|
||||
del bpy.types.WindowManager.online_users
|
||||
del bpy.types.WindowManager.user_index
|
||||
del bpy.types.WindowManager.server_index
|
||||
|
||||
environment.unregister()
|
||||
|
||||
@@ -79,8 +79,6 @@ def on_scene_update(scene):
|
||||
logging.debug(f"Ignoring distant update of {dependency_updates[0].id.name}")
|
||||
return
|
||||
|
||||
update_external_dependencies()
|
||||
|
||||
# NOTE: maybe we don't need to check each update but only the first
|
||||
for update in reversed(dependency_updates):
|
||||
update_uuid = getattr(update.id, 'uuid', None)
|
||||
@@ -109,6 +107,11 @@ def on_scene_update(scene):
|
||||
porcelain.commit(session.repository, scn_uuid)
|
||||
porcelain.push(session.repository, 'origin', scn_uuid)
|
||||
|
||||
scene_graph_changed = [u for u in reversed(dependency_updates) if getattr(u.id, 'uuid', None) and isinstance(u.id,(bpy.types.Scene,bpy.types.Collection))]
|
||||
if scene_graph_changed:
|
||||
porcelain.purge_orphan_nodes(session.repository)
|
||||
|
||||
update_external_dependencies()
|
||||
|
||||
@persistent
|
||||
def resolve_deps_graph(dummy):
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
import bpy
|
||||
import os
|
||||
|
||||
from pathlib import Path
|
||||
import bpy.utils.previews
|
||||
|
||||
def register():
|
||||
|
||||
global icons_col
|
||||
|
||||
pcoll = bpy.utils.previews.new()
|
||||
icons_dir = os.path.join(os.path.dirname(__file__), ".")
|
||||
for png in Path(icons_dir).rglob("*.png"):
|
||||
pcoll.load(png.stem, str(png), "IMAGE")
|
||||
|
||||
icons_col = pcoll
|
||||
|
||||
|
||||
def unregister():
|
||||
|
||||
global icons_col
|
||||
|
||||
try:
|
||||
bpy.utils.previews.remove(icons_col)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
icons_col = None
|
||||
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 11 KiB |
@@ -1,7 +1,7 @@
|
||||
# Download base image debian jessie
|
||||
FROM python:slim
|
||||
|
||||
ARG replication_version=0.1.13
|
||||
ARG replication_version=0.9.1
|
||||
ARG version=0.1.1
|
||||
|
||||
# Infos
|
||||
@@ -22,4 +22,4 @@ RUN pip install replication==$replication_version
|
||||
|
||||
# Run the server with parameters
|
||||
ENTRYPOINT ["/bin/sh", "-c"]
|
||||
CMD ["python3 -m replication.server -pwd ${password} -p ${port} -t ${timeout} -l ${log_level} -lf ${log_file}"]
|
||||
CMD ["replication.serve -apwd ${password} -spwd '' -p ${port} -t ${timeout} -l ${log_level} -lf ${log_file}"]
|
||||
@@ -1,20 +0,0 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from deepdiff import DeepDiff
|
||||
|
||||
import bpy
|
||||
import random
|
||||
|
||||
|
||||
def test_start_session():
|
||||
result = bpy.ops.session.start()
|
||||
|
||||
|
||||
assert 'FINISHED' in result
|
||||
|
||||
def test_stop_session():
|
||||
|
||||
result = bpy.ops.session.stop()
|
||||
|
||||
assert 'FINISHED' in result
|
||||