Compare commits

...

47 Commits

Author SHA1 Message Date
Swann Martinez
12355b6457 Merge branch 'develop' into 'master'
fix: blender 3.5 compatibility

See merge request slumber/multi-user!179
2023-04-11 12:48:36 +00:00
Swann Martinez
74ad4e5e1f fix: bump add-on version to 0.5.8 2023-04-11 12:43:52 +00:00
Swann
2a88c3e5ac feat: use requirement to install dependencies
fix: _bool numpy not found
2023-04-06 09:26:29 +02:00
Swann Martinez
4c42a5be92 fix: freeze deepdiff version in replication 2022-08-18 21:40:07 +02:00
Swann Martinez
757ee7015a Merge branch 'develop' into 'master'
fix: cross-platform serialization errors

See merge request slumber/multi-user!177
2022-08-07 12:39:06 +00:00
Swann Martinez
15d66579c6 fix: deepdiff dependency error, freezing it to 5.7.0. 2022-08-07 14:36:36 +02:00
Swann Martinez
4128a47b88 fix: put back numpy types 2022-07-31 14:57:32 +02:00
Swann Martinez
689a565c75 fix: bump version 2022-07-07 14:34:33 +02:00
Swann Martinez
c5f1bf1176 fix: cross-platform serialization errors 2022-07-07 14:29:32 +02:00
Swann Martinez
4dc6781c94 Merge branch 'develop' into 'master'
v0.5.5

See merge request slumber/multi-user!176
2022-06-12 19:23:41 +00:00
Swann Martinez
5311e55208 fix: doc version number 2022-06-12 21:16:11 +02:00
Swann Martinez
4cb64e5e77 doc: update changelog and version 2022-06-12 21:10:38 +02:00
Swann Martinez
ff67b581b1 Merge branch '256-numpy-mesh-serialization-error' into 'develop'
Resolve "Numpy mesh serialization error"

See merge request slumber/multi-user!175
2022-06-12 19:04:56 +00:00
Swann Martinez
f7bec3fc08 fix: try to use other numpy types to store data collection 2022-06-11 14:00:36 +02:00
Swann Martinez
5e929db3ee Merge branch 'develop' into 'master'
v0.5.3

See merge request slumber/multi-user!174
2022-03-11 17:59:27 +00:00
Swann Martinez
629f2e1cdb feat: update changelog 2022-03-11 18:52:30 +01:00
Swann Martinez
b8fed806ed feat: update version 2022-03-11 18:38:38 +01:00
Swann Martinez
8190846b59 fix: blender 3.1 numpy loading compatibility 2022-03-11 18:38:09 +01:00
Swann Martinez
c228b6ad7f refactpr: snapshot logs 2022-03-09 11:19:09 +01:00
Swann Martinez
48651ce890 fix: uuid error when joining a server 2022-03-09 10:42:44 +01:00
Swann Martinez
26847cf459 fix: server crashing during snapshots 2022-03-08 18:06:54 +01:00
Swann Martinez
bfa6991c00 fix: server docker file 2022-03-02 14:26:01 +01:00
Swann Martinez
0c60c86775 Merge branch 'develop' into 'master'
v0.5.2

See merge request slumber/multi-user!173
2022-02-18 15:12:56 +00:00
Swann Martinez
70b6f9bcfa feat: update changelog for 0.5.2 2022-02-18 11:28:56 +01:00
Swann Martinez
8d176b55e4 Merge branch '250-geometry-nodes-attribue-toogle-doesn-t-sync' into 'develop'
Resolve "Geometry nodes attribue toogle doesn't sync"

See merge request slumber/multi-user!172
2022-02-17 09:51:41 +00:00
Swann Martinez
4c0356e724 fix: geometry node boolean parameter loading
related to #250
2022-02-17 10:43:47 +01:00
Swann Martinez
6b04d1d8d6 Merge branch '248-objects-not-selectable-after-user-leaves-session' into 'develop'
Resolve "objects not selectable after user leaves session"

See merge request slumber/multi-user!171
2022-02-15 10:03:58 +00:00
Swann Martinez
edfcdd8867 feat: bump version 2022-02-15 11:00:18 +01:00
Swann Martinez
bdd6599614 fix: objects not selectable after user leaves session (or kicked)
Related to #248
2022-02-15 10:55:26 +01:00
Swann Martinez
6efd1321ce Merge branch 'develop' into 'master'
v0.5.1

See merge request slumber/multi-user!169
2022-02-10 15:25:02 +00:00
Swann Martinez
047bd47048 Merge branch '247-auto-updater-breaks-dependency-auto-installer' into 'develop'
feat: bump addon version

See merge request slumber/multi-user!170
2022-02-10 15:20:58 +00:00
Swann Martinez
d32cbb7b30 feat: bump addon version 2022-02-10 16:20:22 +01:00
Swann Martinez
adabce3822 Merge branch '247-auto-updater-breaks-dependency-auto-installer' into 'develop'
Resolve "Auto updater breaks dependency auto installer"

See merge request slumber/multi-user!168
2022-02-10 15:10:37 +00:00
Swann Martinez
62f52db5b2 fix: auto updater with tags 2022-02-10 16:06:53 +01:00
Swann Martinez
745f45b682 fix: addon directory not cleared during an update 2022-02-10 15:44:46 +01:00
Swann Martinez
4b7573234a Merge branch 'develop' into 'master'
v0.5.0

See merge request slumber/multi-user!164
2022-02-10 13:15:45 +00:00
Swann Martinez
f84860f520 feat: update changelog 2022-02-10 12:06:29 +01:00
Swann Martinez
c7ee67d4dd fix: replication typo (@kromar) 2022-02-10 11:58:09 +01:00
Swann Martinez
7ed4644b75 feat: added 0.5.0 update to the changelog 2022-02-10 11:55:14 +01:00
Swann Martinez
e0c4a17be9 feat: update version 2022-02-10 11:23:46 +01:00
Swann Martinez
2a6181b832 fix: replication typo 2022-02-10 11:23:01 +01:00
Swann Martinez
0f7c9adec5 fix: Panel calss prefix warning 2022-02-10 11:20:11 +01:00
Swann Martinez
f094ec097c doc: remove replication version 2022-02-10 11:15:08 +01:00
Swann Martinez
2495b5b0e7 Merge branch '245-skin-modifier-vertex-radius-not-synchronized' into 'develop'
Resolve "skin modifier vertex radius not synchronized"

See merge request slumber/multi-user!165
2022-02-07 14:08:22 +00:00
Swann Martinez
ac84509b83 Merge branch 'develop' into 'master'
fix: old replication installation conflicts

See merge request slumber/multi-user!145
2021-07-20 14:28:04 +00:00
Swann Martinez
69565b3852 Merge branch 'develop' into 'master'
v0.4.0

See merge request slumber/multi-user!144
2021-07-20 13:41:29 +00:00
Swann Martinez
57fdd492ef Merge branch 'develop' into 'master'
fix: auto-updater operators registration to ensure blender 2.93 compatibility

See merge request slumber/multi-user!117
2021-04-15 13:39:47 +00:00
13 changed files with 96 additions and 69 deletions

View File

@ -217,3 +217,57 @@ All notable changes to this project will be documented in this file.
- GPencil fill stroke - GPencil fill stroke
- Sculpt and GPencil brushes deleted when joining a session (@Kysios) - Sculpt and GPencil brushes deleted when joining a session (@Kysios)
- Auto-updater doesn't work for master and develop builds - Auto-updater doesn't work for master and develop builds
## [0.5.0] - 2022-02-10
### Added
- New overall UI and UX (@Kysios)
- Documentation overall update (@Kysios)
- Server presets (@Kysios)
- Server online status (@Kysios)
- Draw connected user color in the user list
- Private session (access protected with a password) (@Kysios)
### Changed
- Dependencies are now installed in the addon folder and correctly cleaned during the addon removal process
### Fixed
- Python 3.10 compatibility (@notfood)
- Blender 3.x compatibility
- Skin vertex radius synchronization (@kromar)
- Sequencer audio strip synchronization
- Crash with empty after a reconnection
## [0.5.1] - 2022-02-10
### Fixed
- Auto updater breaks dependency auto installer
- Auto updater update from tag
## [0.5.2] - 2022-02-18
### Fixed
- Objects not selectable after user leaves session
- Geometry nodes attribute toogle doesn't sync
## [0.5.3] - 2022-03-11
### Changed
- Snapshots logs
### Fixed
- Server crashing during snapshots
- Blender 3.1 numpy loading error during early connection process
- Server docker arguments
## [0.5.5] - 2022-06-12
### Fixed
- Numpy mesh serialization error

View File

@ -16,12 +16,12 @@ import sys
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'Multi-User 0.5.0 Documentation' project = 'Multi-User 0.5.x Documentation'
copyright = '2020, Swann Martinez' copyright = '2020, Swann Martinez'
author = 'Swann Martinez, Poochy, Fabian' author = 'Swann Martinez, Poochy, Fabian'
# The full version, including alpha/beta/rc tags # The full version, including alpha/beta/rc tags
version_release = '0.5.1-develop' version_release = '0.5.5'
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------

View File

@ -206,9 +206,9 @@ You can run the dedicated server on any platform by following these steps:
.. code-block:: bash .. code-block:: bash
python -m pip install replication==0.1.13 python -m pip install replication
4. Launch the server with: 3. Launch the server with:
.. code-block:: bash .. code-block:: bash
@ -562,7 +562,7 @@ The default Docker image essentially runs the equivalent of:
.. code-block:: bash .. code-block:: bash
replication.serve -pwd admin -p 5555 -t 5000 -l DEBUG -lf multiuser_server.log replication.server -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. 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.

View File

@ -19,7 +19,7 @@
bl_info = { bl_info = {
"name": "Multi-User", "name": "Multi-User",
"author": "Swann Martinez", "author": "Swann Martinez",
"version": (0, 4, 1), "version": (0, 5, 8),
"description": "Enable real-time collaborative workflow inside blender", "description": "Enable real-time collaborative workflow inside blender",
"blender": (2, 82, 0), "blender": (2, 82, 0),
"location": "3D View > Sidebar > Multi-User tab", "location": "3D View > Sidebar > Multi-User tab",

View File

@ -1015,16 +1015,18 @@ class Singleton_updater(object):
for path, dirs, files in os.walk(base): for path, dirs, files in os.walk(base):
# prune ie skip updater folder # prune ie skip updater folder
dirs[:] = [d for d in dirs if os.path.join(path,d) not in [self._updater_path]] dirs[:] = [d for d in dirs if os.path.join(path,d) not in [self._updater_path]]
for directory in dirs:
shutil.rmtree(os.path.join(path,directory))
for file in files: for file in files:
for ptrn in self.remove_pre_update_patterns: try:
if fnmatch.filter([file],ptrn): fl = os.path.join(path,file)
try: os.remove(fl)
fl = os.path.join(path,file) if self._verbose: print("Pre-removed file "+file)
os.remove(fl) except OSError:
if self._verbose: print("Pre-removed file "+file) print("Failed to pre-remove "+file)
except OSError: self.print_trace()
print("Failed to pre-remove "+file)
self.print_trace()
# Walk through the temp addon sub folder for replacements # Walk through the temp addon sub folder for replacements
# this implements the overwrite rules, which apply after # this implements the overwrite rules, which apply after
@ -1701,7 +1703,7 @@ class GitlabEngine(object):
def parse_tags(self, response, updater): def parse_tags(self, response, updater):
if response == None: if response == None:
return [] return []
return [{"name": tag["name"], "zipball_url": self.get_zip_url(tag["commit"]["id"], updater)} for tag in response] return [{"name": tag["name"], "zipball_url": f"https://gitlab.com/slumber/multi-user/-/jobs/artifacts/{tag['name']}/download?job=build"} for tag in response]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------

View File

@ -267,7 +267,7 @@ class addon_updater_update_now(bpy.types.Operator):
clean_install: bpy.props.BoolProperty( clean_install: bpy.props.BoolProperty(
name="Clean install", name="Clean install",
description="If enabled, completely clear the addon's folder before installing new update, creating a fresh install", description="If enabled, completely clear the addon's folder before installing new update, creating a fresh install",
default=False, default=True,
options={'HIDDEN'} options={'HIDDEN'}
) )

View File

@ -172,7 +172,7 @@ def load_modifier_geometry_node_props(dumped_modifier: dict, target_modifier: bp
for input_index, inpt in enumerate(get_node_group_properties_identifiers(target_modifier.node_group)): for input_index, inpt in enumerate(get_node_group_properties_identifiers(target_modifier.node_group)):
dumped_value, dumped_type = dumped_modifier['props'][input_index] dumped_value, dumped_type = dumped_modifier['props'][input_index]
input_value = target_modifier[inpt[0]] input_value = target_modifier[inpt[0]]
if dumped_type in ['INT', 'VALUE', 'STR']: if dumped_type in ['INT', 'VALUE', 'STR', 'BOOL']:
logging.info(f"{inpt[0]}/{dumped_value}") logging.info(f"{inpt[0]}/{dumped_value}")
target_modifier[inpt[0]] = dumped_value target_modifier[inpt[0]] = dumped_value
elif dumped_type in ['RGBA', 'VECTOR']: elif dumped_type in ['RGBA', 'VECTOR']:

View File

@ -26,7 +26,8 @@ import numpy as np
BPY_TO_NUMPY_TYPES = { BPY_TO_NUMPY_TYPES = {
'FLOAT': np.float32, 'FLOAT': np.float32,
'INT': np.int32, 'INT': np.int32,
'BOOL': np.bool} 'BOOL': bool,
'BOOLEAN': bool}
PRIMITIVE_TYPES = ['FLOAT', 'INT', 'BOOLEAN'] PRIMITIVE_TYPES = ['FLOAT', 'INT', 'BOOLEAN']

View File

@ -36,8 +36,6 @@ REPLICATION_DEPENDENCIES = {
LIBS = os.path.join(os.path.dirname(os.path.abspath(__file__)), "libs") LIBS = os.path.join(os.path.dirname(os.path.abspath(__file__)), "libs")
REPLICATION = os.path.join(LIBS,"replication") REPLICATION = os.path.join(LIBS,"replication")
PYTHON_PATH = None
SUBPROCESS_DIR = None
rtypes = [] rtypes = []
@ -50,13 +48,13 @@ def module_can_be_imported(name: str) -> bool:
return False return False
def install_pip(): def install_pip(python_path):
# pip can not necessarily be imported into Blender after this # pip can not necessarily be imported into Blender after this
subprocess.run([str(PYTHON_PATH), "-m", "ensurepip"]) subprocess.run([str(python_path), "-m", "ensurepip"])
def install_package(name: str, install_dir: str): def install_requirements(python_path:str, module_requirement: str, install_dir: str):
logging.info(f"installing {name} version...") logging.info(f"Installing {module_requirement} dependencies in {install_dir}")
env = os.environ env = os.environ
if "PIP_REQUIRE_VIRTUALENV" in env: if "PIP_REQUIRE_VIRTUALENV" in env:
# PIP_REQUIRE_VIRTUALENV is an env var to ensure pip cannot install packages outside a virtual env # PIP_REQUIRE_VIRTUALENV is an env var to ensure pip cannot install packages outside a virtual env
@ -65,23 +63,7 @@ def install_package(name: str, install_dir: str):
# env var for the subprocess. # env var for the subprocess.
env = os.environ.copy() env = os.environ.copy()
del env["PIP_REQUIRE_VIRTUALENV"] del env["PIP_REQUIRE_VIRTUALENV"]
subprocess.run([str(PYTHON_PATH), "-m", "pip", "install", f"{name}", "-t", install_dir], env=env) subprocess.run([str(python_path), "-m", "pip", "install", "-r", f"{install_dir}/{module_requirement}/requirements.txt", "-t", install_dir], env=env)
if name in sys.modules:
del sys.modules[name]
def check_package_version(name: str, required_version: str):
logging.info(f"Checking {name} version...")
out = subprocess.run([str(PYTHON_PATH), "-m", "pip", "show", name], capture_output=True)
version = VERSION_EXPR.search(out.stdout.decode())
if version and version.group() == required_version:
logging.info(f"{name} is up to date")
return True
else:
logging.info(f"{name} need an update")
return False
def get_ip(): def get_ip():
@ -117,21 +99,7 @@ def remove_paths(paths: list):
if path in sys.path: if path in sys.path:
logging.debug(f"Removing {path} dir from the path.") logging.debug(f"Removing {path} dir from the path.")
sys.path.remove(path) sys.path.remove(path)
def install_modules(dependencies: list, python_path: str, install_dir: str):
global PYTHON_PATH, SUBPROCESS_DIR
PYTHON_PATH = Path(python_path)
SUBPROCESS_DIR = PYTHON_PATH.parent
if not module_can_be_imported("pip"):
install_pip()
for package_name in dependencies:
if not module_can_be_imported(package_name):
install_package(package_name, install_dir=install_dir)
module_can_be_imported(package_name)
def register(): def register():
if bpy.app.version >= (2,91,0): if bpy.app.version >= (2,91,0):
@ -139,12 +107,21 @@ def register():
else: else:
python_binary_path = bpy.app.binary_path_python python_binary_path = bpy.app.binary_path_python
python_path = Path(python_binary_path)
for module_name in list(sys.modules.keys()): for module_name in list(sys.modules.keys()):
if 'replication' in module_name: if 'replication' in module_name:
del sys.modules[module_name] del sys.modules[module_name]
setup_paths([LIBS, REPLICATION]) setup_paths([LIBS, REPLICATION])
install_modules(REPLICATION_DEPENDENCIES, python_binary_path, install_dir=LIBS)
if not module_can_be_imported("pip"):
install_pip(python_path)
deps_not_installed = [package_name for package_name in REPLICATION_DEPENDENCIES if not module_can_be_imported(package_name)]
if any(deps_not_installed):
install_requirements(python_path, module_requirement='replication', install_dir=LIBS)
def unregister(): def unregister():
remove_paths([REPLICATION, LIBS]) remove_paths([REPLICATION, LIBS])

@ -1 +1 @@
Subproject commit 029e12b2bee21db8a779de03cbcd582bb95c388b Subproject commit 3e9eb4f5c052177c2fe1e16ff5d1f042456c30d0

View File

@ -1036,7 +1036,7 @@ class SessionLoadSaveOperator(bpy.types.Operator, ImportHelper):
def poll(cls, context): def poll(cls, context):
return True return True
class SessionImportUser(bpy.types.Panel): class SESSION_PT_ImportUser(bpy.types.Panel):
bl_space_type = 'FILE_BROWSER' bl_space_type = 'FILE_BROWSER'
bl_region_type = 'TOOL_PROPS' bl_region_type = 'TOOL_PROPS'
bl_label = "Users" bl_label = "Users"
@ -1300,7 +1300,7 @@ classes = (
SessionNotifyOperator, SessionNotifyOperator,
SessionSaveBackupOperator, SessionSaveBackupOperator,
SessionLoadSaveOperator, SessionLoadSaveOperator,
SessionImportUser, SESSION_PT_ImportUser,
SessionStopAutoSaveOperator, SessionStopAutoSaveOperator,
SessionPurgeOperator, SessionPurgeOperator,
SessionPresetServerAdd, SessionPresetServerAdd,

View File

@ -44,13 +44,6 @@ DEFAULT_PRESETS = {
"admin_password": "admin", "admin_password": "admin",
"server_password": "" "server_password": ""
}, },
"public session" : {
"server_name": "public session",
"ip": "51.75.71.183",
"port": 5555,
"admin_password": "",
"server_password": ""
},
} }
def randomColor(): def randomColor():

View File

@ -22,4 +22,4 @@ RUN pip install replication==$replication_version
# Run the server with parameters # Run the server with parameters
ENTRYPOINT ["/bin/sh", "-c"] ENTRYPOINT ["/bin/sh", "-c"]
CMD ["replication.serve -apwd ${password} -spwd '' -p ${port} -t ${timeout} -l ${log_level} -lf ${log_file}"] CMD ["replication.server -apwd ${password} -spwd '' -p ${port} -t ${timeout} -l ${log_level} -lf ${log_file}"]