Compare commits

...

21 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
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
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
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
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
7 changed files with 29 additions and 53 deletions

View File

@ -264,4 +264,10 @@ All notable changes to this project will be documented in this file.
- Server crashing during snapshots
- Blender 3.1 numpy loading error during early connection process
- Server docker arguments
- 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 = 'Multi-User 0.5.0 Documentation'
project = 'Multi-User 0.5.x Documentation'
copyright = '2020, Swann Martinez'
author = 'Swann Martinez, Poochy, Fabian'
# The full version, including alpha/beta/rc tags
version_release = '0.5.1-develop'
version_release = '0.5.5'
# -- General configuration ---------------------------------------------------

View File

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

View File

@ -26,8 +26,8 @@ import numpy as np
BPY_TO_NUMPY_TYPES = {
'FLOAT': np.float32,
'INT': np.int32,
'BOOL': np.bool,
'BOOLEAN': np.bool}
'BOOL': bool,
'BOOLEAN': bool}
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")
REPLICATION = os.path.join(LIBS,"replication")
PYTHON_PATH = None
SUBPROCESS_DIR = None
rtypes = []
@ -50,13 +48,13 @@ def module_can_be_imported(name: str) -> bool:
return False
def install_pip():
def install_pip(python_path):
# 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):
logging.info(f"installing {name} version...")
def install_requirements(python_path:str, module_requirement: str, install_dir: str):
logging.info(f"Installing {module_requirement} dependencies in {install_dir}")
env = os.environ
if "PIP_REQUIRE_VIRTUALENV" in 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 = os.environ.copy()
del env["PIP_REQUIRE_VIRTUALENV"]
subprocess.run([str(PYTHON_PATH), "-m", "pip", "install", f"{name}", "-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
subprocess.run([str(python_path), "-m", "pip", "install", "-r", f"{install_dir}/{module_requirement}/requirements.txt", "-t", install_dir], env=env)
def get_ip():
@ -117,21 +99,7 @@ def remove_paths(paths: list):
if path in sys.path:
logging.debug(f"Removing {path} dir from the 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():
if bpy.app.version >= (2,91,0):
@ -139,12 +107,21 @@ def register():
else:
python_binary_path = bpy.app.binary_path_python
python_path = Path(python_binary_path)
for module_name in list(sys.modules.keys()):
if 'replication' in module_name:
del sys.modules[module_name]
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():
remove_paths([REPLICATION, LIBS])

@ -1 +1 @@
Subproject commit d722cf0d65568b436d61d139cea42da000c5fea9
Subproject commit 3e9eb4f5c052177c2fe1e16ff5d1f042456c30d0

View File

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