feat: config support prepararation

This commit is contained in:
Swann Martinez 2019-07-01 15:59:51 +02:00
parent 42fa210cee
commit f4ccab08c7
No known key found for this signature in database
GPG Key ID: 414CCAFD8DA720E1
4 changed files with 23 additions and 14 deletions

View File

@ -14,4 +14,13 @@ All notable changes to this project will be documented in this file.
### Removed
- Chat mecanism ( Will come back after the complete modularity refactoring)
- Unused files and sub-modules
- Unused files and sub-modules
## [v0.0.5]
### Added
- queued communication between threads
- various fixes
- multithreaded archiecture
- curve, gpencil support
- rightmanagment

View File

@ -1,4 +1,3 @@
bl_info = {
"name": "Multi-User",
"author": "CUBE CREATIVE",

View File

@ -4,10 +4,11 @@ import os
from pathlib import Path
import bpy
thirdPartyDir = os.path.dirname(os.path.abspath(__file__))+"/libs"
python_path = Path(bpy.app.binary_path_python)
cwd_for_subprocesses = python_path.parent
target = None
CONFIG_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),"config")
APP_CONFIG = os.path.join(CONFIG_DIR,"config.yaml")
THIRD_PARTY = os.path.join(os.path.dirname(os.path.abspath(__file__)),"libs")
PYTHON_PATH = Path(bpy.app.binary_path_python)
SUBPROCESS_DIR = PYTHON_PATH.parent
def module_can_be_imported(name):
try:
@ -26,14 +27,14 @@ def get_package_install_directory():
def install_pip():
# pip can not necessarily be imported into Blender after this
get_pip_path = Path(__file__).parent / "libs" / "get-pip.py"
subprocess.run([str(python_path), str(get_pip_path)], cwd=cwd_for_subprocesses)
subprocess.run([str(PYTHON_PATH), str(get_pip_path)], cwd=SUBPROCESS_DIR)
def install_package(name):
target = get_package_install_directory()
subprocess.run([str(python_path), "-m", "pip", "install",
name, '--target', target], cwd=cwd_for_subprocesses)
subprocess.run([str(PYTHON_PATH), "-m", "pip", "install",
name, '--target', target], cwd=SUBPROCESS_DIR)
def setup(dependencies):
if not module_can_be_imported("pip"):

10
ui.py
View File

@ -79,11 +79,10 @@ class SESSION_PT_settings(bpy.types.Panel):
row = layout.row()
row.operator("session.stop", icon='QUIT', text="Exit")
row = layout.row(align=True)
row.operator("session.dump", icon='QUIT', text="Dump")
row.operator("session.dump", icon='QUIT', text="Load")
row = layout.row()
# row = layout.row(align=True)
# row.operator("session.dump", icon='QUIT', text="Dump")
# row.operator("session.dump", icon='QUIT', text="Load")
# row = layout.row()
box = row.box()
row = box.row()
@ -144,6 +143,7 @@ class SESSION_PT_user(bpy.types.Panel):
row = layout.row()
def get_client_key(item):
return item[0]