From da349dd4a9637c1b6f76416bc998bda44babdf28 Mon Sep 17 00:00:00 2001 From: Swann Date: Wed, 21 Apr 2021 11:10:24 +0200 Subject: [PATCH] refactor: io_bpy architecture revamp --- multi_user/{bl_types => io_bpy}/__init__.py | 14 +++++--- multi_user/{bl_types => io_bpy}/bl_action.py | 0 .../{bl_types => io_bpy}/bl_armature.py | 0 multi_user/{bl_types => io_bpy}/bl_camera.py | 0 .../{bl_types => io_bpy}/bl_collection.py | 0 multi_user/{bl_types => io_bpy}/bl_curve.py | 0 .../{bl_types => io_bpy}/bl_datablock.py | 0 multi_user/{bl_types => io_bpy}/bl_file.py | 0 multi_user/{bl_types => io_bpy}/bl_font.py | 0 multi_user/{bl_types => io_bpy}/bl_gpencil.py | 0 multi_user/{bl_types => io_bpy}/bl_image.py | 0 multi_user/{bl_types => io_bpy}/bl_lattice.py | 0 multi_user/{bl_types => io_bpy}/bl_library.py | 0 multi_user/{bl_types => io_bpy}/bl_light.py | 0 .../{bl_types => io_bpy}/bl_lightprobe.py | 0 .../{bl_types => io_bpy}/bl_material.py | 0 multi_user/{bl_types => io_bpy}/bl_mesh.py | 0 .../{bl_types => io_bpy}/bl_metaball.py | 0 .../{bl_types => io_bpy}/bl_node_group.py | 0 multi_user/{bl_types => io_bpy}/bl_object.py | 6 +++- .../{bl_types => io_bpy}/bl_particle.py | 0 multi_user/{bl_types => io_bpy}/bl_scene.py | 0 multi_user/{bl_types => io_bpy}/bl_sound.py | 0 multi_user/{bl_types => io_bpy}/bl_speaker.py | 0 multi_user/{bl_types => io_bpy}/bl_texture.py | 0 multi_user/{bl_types => io_bpy}/bl_volume.py | 0 multi_user/{bl_types => io_bpy}/bl_world.py | 0 .../{bl_types => io_bpy}/dump_anything.py | 0 multi_user/libs/replication | 2 +- multi_user/operators.py | 32 ++++++------------- multi_user/preferences.py | 21 ++++++------ tests/test_bl_types/test_action.py | 2 +- tests/test_bl_types/test_armature.py | 2 +- tests/test_bl_types/test_camera.py | 2 +- tests/test_bl_types/test_collection.py | 2 +- tests/test_bl_types/test_curve.py | 2 +- tests/test_bl_types/test_gpencil.py | 2 +- tests/test_bl_types/test_lattice.py | 2 +- tests/test_bl_types/test_lightprobes.py | 2 +- tests/test_bl_types/test_lights.py | 2 +- tests/test_bl_types/test_material.py | 2 +- tests/test_bl_types/test_mesh.py | 2 +- tests/test_bl_types/test_metaball.py | 2 +- tests/test_bl_types/test_object.py | 2 +- tests/test_bl_types/test_scene.py | 2 +- tests/test_bl_types/test_speaker.py | 2 +- tests/test_bl_types/test_texture.py | 2 +- tests/test_bl_types/test_volume.py | 2 +- tests/test_bl_types/test_world.py | 2 +- 49 files changed, 53 insertions(+), 58 deletions(-) rename multi_user/{bl_types => io_bpy}/__init__.py (74%) rename multi_user/{bl_types => io_bpy}/bl_action.py (100%) rename multi_user/{bl_types => io_bpy}/bl_armature.py (100%) rename multi_user/{bl_types => io_bpy}/bl_camera.py (100%) rename multi_user/{bl_types => io_bpy}/bl_collection.py (100%) rename multi_user/{bl_types => io_bpy}/bl_curve.py (100%) rename multi_user/{bl_types => io_bpy}/bl_datablock.py (100%) rename multi_user/{bl_types => io_bpy}/bl_file.py (100%) rename multi_user/{bl_types => io_bpy}/bl_font.py (100%) rename multi_user/{bl_types => io_bpy}/bl_gpencil.py (100%) rename multi_user/{bl_types => io_bpy}/bl_image.py (100%) rename multi_user/{bl_types => io_bpy}/bl_lattice.py (100%) rename multi_user/{bl_types => io_bpy}/bl_library.py (100%) rename multi_user/{bl_types => io_bpy}/bl_light.py (100%) rename multi_user/{bl_types => io_bpy}/bl_lightprobe.py (100%) rename multi_user/{bl_types => io_bpy}/bl_material.py (100%) rename multi_user/{bl_types => io_bpy}/bl_mesh.py (100%) rename multi_user/{bl_types => io_bpy}/bl_metaball.py (100%) rename multi_user/{bl_types => io_bpy}/bl_node_group.py (100%) rename multi_user/{bl_types => io_bpy}/bl_object.py (99%) rename multi_user/{bl_types => io_bpy}/bl_particle.py (100%) rename multi_user/{bl_types => io_bpy}/bl_scene.py (100%) rename multi_user/{bl_types => io_bpy}/bl_sound.py (100%) rename multi_user/{bl_types => io_bpy}/bl_speaker.py (100%) rename multi_user/{bl_types => io_bpy}/bl_texture.py (100%) rename multi_user/{bl_types => io_bpy}/bl_volume.py (100%) rename multi_user/{bl_types => io_bpy}/bl_world.py (100%) rename multi_user/{bl_types => io_bpy}/dump_anything.py (100%) diff --git a/multi_user/bl_types/__init__.py b/multi_user/io_bpy/__init__.py similarity index 74% rename from multi_user/bl_types/__init__.py rename to multi_user/io_bpy/__init__.py index 5857e42..2273c8a 100644 --- a/multi_user/bl_types/__init__.py +++ b/multi_user/io_bpy/__init__.py @@ -16,6 +16,7 @@ # ##### END GPL LICENSE BLOCK ##### import bpy +from replication.protocol import ReplicatedDatablock __all__ = [ 'bl_object', @@ -48,9 +49,14 @@ __all__ = [ # if bpy.app.version[1] >= 91: # __all__.append('bl_volume') -from . import bl_object, bl_action, bl_scene, bl_mesh, bl_collection from replication.protocol import DataTranslationProtocol -def types_to_register(): - return __all__ - +def get_data_translation_protocol()-> DataTranslationProtocol: + """ Return a data translation protocol from implemented bpy types + """ + bpy_protocol = DataTranslationProtocol() + for module_name in __all__: + impl = globals().get(module_name) + if impl and hasattr(impl, "_type") and hasattr(impl, "_type"): + bpy_protocol.register_implementation(impl._type, impl._class) + return bpy_protocol diff --git a/multi_user/bl_types/bl_action.py b/multi_user/io_bpy/bl_action.py similarity index 100% rename from multi_user/bl_types/bl_action.py rename to multi_user/io_bpy/bl_action.py diff --git a/multi_user/bl_types/bl_armature.py b/multi_user/io_bpy/bl_armature.py similarity index 100% rename from multi_user/bl_types/bl_armature.py rename to multi_user/io_bpy/bl_armature.py diff --git a/multi_user/bl_types/bl_camera.py b/multi_user/io_bpy/bl_camera.py similarity index 100% rename from multi_user/bl_types/bl_camera.py rename to multi_user/io_bpy/bl_camera.py diff --git a/multi_user/bl_types/bl_collection.py b/multi_user/io_bpy/bl_collection.py similarity index 100% rename from multi_user/bl_types/bl_collection.py rename to multi_user/io_bpy/bl_collection.py diff --git a/multi_user/bl_types/bl_curve.py b/multi_user/io_bpy/bl_curve.py similarity index 100% rename from multi_user/bl_types/bl_curve.py rename to multi_user/io_bpy/bl_curve.py diff --git a/multi_user/bl_types/bl_datablock.py b/multi_user/io_bpy/bl_datablock.py similarity index 100% rename from multi_user/bl_types/bl_datablock.py rename to multi_user/io_bpy/bl_datablock.py diff --git a/multi_user/bl_types/bl_file.py b/multi_user/io_bpy/bl_file.py similarity index 100% rename from multi_user/bl_types/bl_file.py rename to multi_user/io_bpy/bl_file.py diff --git a/multi_user/bl_types/bl_font.py b/multi_user/io_bpy/bl_font.py similarity index 100% rename from multi_user/bl_types/bl_font.py rename to multi_user/io_bpy/bl_font.py diff --git a/multi_user/bl_types/bl_gpencil.py b/multi_user/io_bpy/bl_gpencil.py similarity index 100% rename from multi_user/bl_types/bl_gpencil.py rename to multi_user/io_bpy/bl_gpencil.py diff --git a/multi_user/bl_types/bl_image.py b/multi_user/io_bpy/bl_image.py similarity index 100% rename from multi_user/bl_types/bl_image.py rename to multi_user/io_bpy/bl_image.py diff --git a/multi_user/bl_types/bl_lattice.py b/multi_user/io_bpy/bl_lattice.py similarity index 100% rename from multi_user/bl_types/bl_lattice.py rename to multi_user/io_bpy/bl_lattice.py diff --git a/multi_user/bl_types/bl_library.py b/multi_user/io_bpy/bl_library.py similarity index 100% rename from multi_user/bl_types/bl_library.py rename to multi_user/io_bpy/bl_library.py diff --git a/multi_user/bl_types/bl_light.py b/multi_user/io_bpy/bl_light.py similarity index 100% rename from multi_user/bl_types/bl_light.py rename to multi_user/io_bpy/bl_light.py diff --git a/multi_user/bl_types/bl_lightprobe.py b/multi_user/io_bpy/bl_lightprobe.py similarity index 100% rename from multi_user/bl_types/bl_lightprobe.py rename to multi_user/io_bpy/bl_lightprobe.py diff --git a/multi_user/bl_types/bl_material.py b/multi_user/io_bpy/bl_material.py similarity index 100% rename from multi_user/bl_types/bl_material.py rename to multi_user/io_bpy/bl_material.py diff --git a/multi_user/bl_types/bl_mesh.py b/multi_user/io_bpy/bl_mesh.py similarity index 100% rename from multi_user/bl_types/bl_mesh.py rename to multi_user/io_bpy/bl_mesh.py diff --git a/multi_user/bl_types/bl_metaball.py b/multi_user/io_bpy/bl_metaball.py similarity index 100% rename from multi_user/bl_types/bl_metaball.py rename to multi_user/io_bpy/bl_metaball.py diff --git a/multi_user/bl_types/bl_node_group.py b/multi_user/io_bpy/bl_node_group.py similarity index 100% rename from multi_user/bl_types/bl_node_group.py rename to multi_user/io_bpy/bl_node_group.py diff --git a/multi_user/bl_types/bl_object.py b/multi_user/io_bpy/bl_object.py similarity index 99% rename from multi_user/bl_types/bl_object.py rename to multi_user/io_bpy/bl_object.py index 783f340..4951b97 100644 --- a/multi_user/bl_types/bl_object.py +++ b/multi_user/io_bpy/bl_object.py @@ -295,11 +295,12 @@ def load_vertex_groups(dumped_vertex_groups: dict, target_object: bpy.types.Obje class BlObject(ReplicatedDatablock): bl_id = "objects" - bl_class = bpy.types.Object bl_check_common = False bl_icon = 'OBJECT_DATA' bl_reload_parent = False + is_root = False + @staticmethod def construct(data: dict) -> bpy.types.Object: datablock = None @@ -711,3 +712,6 @@ class BlObject(ReplicatedDatablock): deps.extend(find_geometry_nodes_dependencies(datablock.modifiers)) return deps + +_type = bpy.types.Object +_class = BlObject diff --git a/multi_user/bl_types/bl_particle.py b/multi_user/io_bpy/bl_particle.py similarity index 100% rename from multi_user/bl_types/bl_particle.py rename to multi_user/io_bpy/bl_particle.py diff --git a/multi_user/bl_types/bl_scene.py b/multi_user/io_bpy/bl_scene.py similarity index 100% rename from multi_user/bl_types/bl_scene.py rename to multi_user/io_bpy/bl_scene.py diff --git a/multi_user/bl_types/bl_sound.py b/multi_user/io_bpy/bl_sound.py similarity index 100% rename from multi_user/bl_types/bl_sound.py rename to multi_user/io_bpy/bl_sound.py diff --git a/multi_user/bl_types/bl_speaker.py b/multi_user/io_bpy/bl_speaker.py similarity index 100% rename from multi_user/bl_types/bl_speaker.py rename to multi_user/io_bpy/bl_speaker.py diff --git a/multi_user/bl_types/bl_texture.py b/multi_user/io_bpy/bl_texture.py similarity index 100% rename from multi_user/bl_types/bl_texture.py rename to multi_user/io_bpy/bl_texture.py diff --git a/multi_user/bl_types/bl_volume.py b/multi_user/io_bpy/bl_volume.py similarity index 100% rename from multi_user/bl_types/bl_volume.py rename to multi_user/io_bpy/bl_volume.py diff --git a/multi_user/bl_types/bl_world.py b/multi_user/io_bpy/bl_world.py similarity index 100% rename from multi_user/bl_types/bl_world.py rename to multi_user/io_bpy/bl_world.py diff --git a/multi_user/bl_types/dump_anything.py b/multi_user/io_bpy/dump_anything.py similarity index 100% rename from multi_user/bl_types/dump_anything.py rename to multi_user/io_bpy/dump_anything.py diff --git a/multi_user/libs/replication b/multi_user/libs/replication index 0614a09..adf5d8b 160000 --- a/multi_user/libs/replication +++ b/multi_user/libs/replication @@ -1 +1 @@ -Subproject commit 0614a09e70cb52e57c4f3bb1b9e02876f8b6c6cd +Subproject commit adf5d8be885d383faa259e55d928e6bf7a5c2641 diff --git a/multi_user/operators.py b/multi_user/operators.py index e928ab0..0d7a562 100644 --- a/multi_user/operators.py +++ b/multi_user/operators.py @@ -51,7 +51,7 @@ from replication.interface import session from replication.porcelain import add, apply, commit from replication.repository import Repository -from . import bl_types, environment, timers, ui, utils +from . import io_bpy, environment, timers, ui, utils from .presence import SessionStatusWidget, renderer, view3d_find from .timers import registry @@ -189,29 +189,15 @@ class SessionStartOperator(bpy.types.Operator): handler.setFormatter(formatter) - bpy_protocol = DataTranslationProtocol() - supported_bl_types = [] + bpy_protocol = io_bpy.get_data_translation_protocol() # init the factory with supported types - for type in bl_types.types_to_register(): - type_module = getattr(bl_types, type) - name = [e.capitalize() for e in type.split('_')[1:]] - type_impl_name = 'Bl'+''.join(name) - type_module_class = getattr(type_module, type_impl_name) - - supported_bl_types.append(type_module_class.bl_id) - - if type_impl_name not in settings.supported_datablocks: - logging.info(f"{type_impl_name} not found, \ + for impl in bpy_protocol.implementations.values(): + if impl.__name__ not in settings.supported_datablocks: + logging.info(f"{impl.__name__} not found, \ regenerate type settings...") settings.generate_supported_types() - type_local_config = settings.supported_datablocks[type_impl_name] - - bpy_protocol.register_type( - type_module_class.bl_class, - type_module_class) - if bpy.app.version[1] >= 91: python_binary_path = sys.executable else: @@ -658,7 +644,7 @@ class ApplyArmatureOperator(bpy.types.Operator): if event.type == 'TIMER': if session and session.state == STATE_ACTIVE: - nodes = session.list(filter=bl_types.bl_armature.BlArmature) + nodes = session.list(filter=io_bpy.bl_armature.BlArmature) for node in nodes: node_ref = session.repository.get_node(node) @@ -857,8 +843,8 @@ class SessionLoadSaveOperator(bpy.types.Operator, ImportHelper): # init the factory with supported types bpy_protocol = DataTranslationProtocol() - for type in bl_types.types_to_register(): - type_module = getattr(bl_types, type) + for type in io_bpy.types_to_register(): + type_module = getattr(io_bpy, type) name = [e.capitalize() for e in type.split('_')[1:]] type_impl_name = 'Bl'+''.join(name) type_module_class = getattr(type_module, type_impl_name) @@ -928,7 +914,7 @@ classes = ( ) def update_external_dependencies(): - nodes_ids = session.list(filter=bl_types.bl_file.BlFile) + nodes_ids = session.list(filter=io_bpy.bl_file.BlFile) for node_id in nodes_ids: node = session.repository.get_node(node_id) if node and node.owner in [session.id, RP_COMMON] \ diff --git a/multi_user/preferences.py b/multi_user/preferences.py index c5c16b2..7401c87 100644 --- a/multi_user/preferences.py +++ b/multi_user/preferences.py @@ -24,7 +24,7 @@ import os from pathlib import Path -from . import bl_types, environment, addon_updater_ops, presence, ui +from . import io_bpy, environment, addon_updater_ops, presence, ui from .utils import get_preferences, get_expanded_icon from replication.constants import RP_COMMON from replication.interface import session @@ -407,18 +407,17 @@ class SessionPrefs(bpy.types.AddonPreferences): def generate_supported_types(self): self.supported_datablocks.clear() - for type in bl_types.types_to_register(): + bpy_protocol = io_bpy.get_data_translation_protocol() + + # init the factory with supported types + for impl in bpy_protocol.implementations.values(): new_db = self.supported_datablocks.add() - type_module = getattr(bl_types, type) - name = [e.capitalize() for e in type.split('_')[1:]] - type_impl_name = 'Bl'+''.join(name) - type_module_class = getattr(type_module, type_impl_name) - new_db.name = type_impl_name - new_db.type_name = type_impl_name + new_db.name = impl.__name__ + new_db.type_name = impl.__name__ new_db.use_as_filter = True - new_db.icon = type_module_class.bl_icon - new_db.bl_name = type_module_class.bl_id + new_db.icon = impl.bl_icon + new_db.bl_name = impl.bl_id def client_list_callback(scene, context): @@ -537,7 +536,7 @@ def register(): prefs = bpy.context.preferences.addons[__package__].preferences if len(prefs.supported_datablocks) == 0: - logging.debug('Generating bl_types preferences') + logging.debug('Generating io_bpy preferences') prefs.generate_supported_types() diff --git a/tests/test_bl_types/test_action.py b/tests/test_bl_types/test_action.py index 3659777..43ced9c 100644 --- a/tests/test_bl_types/test_action.py +++ b/tests/test_bl_types/test_action.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_action import BlAction +from multi_user.io_bpy.bl_action import BlAction INTERPOLATION = ['CONSTANT', 'LINEAR', 'BEZIER', 'SINE', 'QUAD', 'CUBIC', 'QUART', 'QUINT', 'EXPO', 'CIRC', 'BACK', 'BOUNCE', 'ELASTIC'] diff --git a/tests/test_bl_types/test_armature.py b/tests/test_bl_types/test_armature.py index 9684d14..d19606a 100644 --- a/tests/test_bl_types/test_armature.py +++ b/tests/test_bl_types/test_armature.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_armature import BlArmature +from multi_user.io_bpy.bl_armature import BlArmature def test_armature(clear_blend): bpy.ops.object.armature_add() diff --git a/tests/test_bl_types/test_camera.py b/tests/test_bl_types/test_camera.py index c863293..73409bb 100644 --- a/tests/test_bl_types/test_camera.py +++ b/tests/test_bl_types/test_camera.py @@ -4,7 +4,7 @@ import pytest from deepdiff import DeepDiff import bpy -from multi_user.bl_types.bl_camera import BlCamera +from multi_user.io_bpy.bl_camera import BlCamera @pytest.mark.parametrize('camera_type', ['PANO','PERSP','ORTHO']) diff --git a/tests/test_bl_types/test_collection.py b/tests/test_bl_types/test_collection.py index d7df8a1..50a73f9 100644 --- a/tests/test_bl_types/test_collection.py +++ b/tests/test_bl_types/test_collection.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff from uuid import uuid4 import bpy import random -from multi_user.bl_types.bl_collection import BlCollection +from multi_user.io_bpy.bl_collection import BlCollection def test_collection(clear_blend): # Generate a collection with childrens and a cube diff --git a/tests/test_bl_types/test_curve.py b/tests/test_bl_types/test_curve.py index 4432d4d..2fae42d 100644 --- a/tests/test_bl_types/test_curve.py +++ b/tests/test_bl_types/test_curve.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_curve import BlCurve +from multi_user.io_bpy.bl_curve import BlCurve @pytest.mark.parametrize('curve_type', ['TEXT','BEZIER']) def test_curve(clear_blend, curve_type): diff --git a/tests/test_bl_types/test_gpencil.py b/tests/test_bl_types/test_gpencil.py index 9e29bbe..fa51aa3 100644 --- a/tests/test_bl_types/test_gpencil.py +++ b/tests/test_bl_types/test_gpencil.py @@ -4,7 +4,7 @@ import pytest from deepdiff import DeepDiff import bpy -from multi_user.bl_types.bl_gpencil import BlGpencil +from multi_user.io_bpy.bl_gpencil import BlGpencil def test_gpencil(clear_blend): diff --git a/tests/test_bl_types/test_lattice.py b/tests/test_bl_types/test_lattice.py index fc23e5f..2a8297a 100644 --- a/tests/test_bl_types/test_lattice.py +++ b/tests/test_bl_types/test_lattice.py @@ -4,7 +4,7 @@ import pytest from deepdiff import DeepDiff import bpy -from multi_user.bl_types.bl_lattice import BlLattice +from multi_user.io_bpy.bl_lattice import BlLattice def test_lattice(clear_blend): diff --git a/tests/test_bl_types/test_lightprobes.py b/tests/test_bl_types/test_lightprobes.py index 391a391..bdc1c68 100644 --- a/tests/test_bl_types/test_lightprobes.py +++ b/tests/test_bl_types/test_lightprobes.py @@ -4,7 +4,7 @@ import pytest from deepdiff import DeepDiff import bpy -from multi_user.bl_types.bl_lightprobe import BlLightprobe +from multi_user.io_bpy.bl_lightprobe import BlLightprobe @pytest.mark.skipif(bpy.app.version[1] < 83, reason="requires blender 2.83 or higher") diff --git a/tests/test_bl_types/test_lights.py b/tests/test_bl_types/test_lights.py index ef88327..d242fcd 100644 --- a/tests/test_bl_types/test_lights.py +++ b/tests/test_bl_types/test_lights.py @@ -4,7 +4,7 @@ import pytest from deepdiff import DeepDiff import bpy -from multi_user.bl_types.bl_light import BlLight +from multi_user.io_bpy.bl_light import BlLight @pytest.mark.parametrize('light_type', ['SPOT','SUN','POINT','AREA']) diff --git a/tests/test_bl_types/test_material.py b/tests/test_bl_types/test_material.py index 953bae2..4f63e40 100644 --- a/tests/test_bl_types/test_material.py +++ b/tests/test_bl_types/test_material.py @@ -4,7 +4,7 @@ import pytest from deepdiff import DeepDiff import bpy -from multi_user.bl_types.bl_material import BlMaterial +from multi_user.io_bpy.bl_material import BlMaterial def test_material_nodes(clear_blend): diff --git a/tests/test_bl_types/test_mesh.py b/tests/test_bl_types/test_mesh.py index 454b858..6391a9a 100644 --- a/tests/test_bl_types/test_mesh.py +++ b/tests/test_bl_types/test_mesh.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_mesh import BlMesh +from multi_user.io_bpy.bl_mesh import BlMesh @pytest.mark.parametrize('mesh_type', ['EMPTY','FILLED']) def test_mesh(clear_blend, mesh_type): diff --git a/tests/test_bl_types/test_metaball.py b/tests/test_bl_types/test_metaball.py index cb7a1f1..5037329 100644 --- a/tests/test_bl_types/test_metaball.py +++ b/tests/test_bl_types/test_metaball.py @@ -4,7 +4,7 @@ import pytest from deepdiff import DeepDiff import bpy -from multi_user.bl_types.bl_metaball import BlMetaball +from multi_user.io_bpy.bl_metaball import BlMetaball @pytest.mark.parametrize('metaballs_type', ['PLANE','CAPSULE','BALL','ELLIPSOID','CUBE']) diff --git a/tests/test_bl_types/test_object.py b/tests/test_bl_types/test_object.py index db63981..6104fde 100644 --- a/tests/test_bl_types/test_object.py +++ b/tests/test_bl_types/test_object.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_object import BlObject +from multi_user.io_bpy.bl_object import BlObject # Removed 'BUILD', 'SOFT_BODY' modifier because the seed doesn't seems to be # correctly initialized (#TODO: report the bug) diff --git a/tests/test_bl_types/test_scene.py b/tests/test_bl_types/test_scene.py index bdcc452..b42c11f 100644 --- a/tests/test_bl_types/test_scene.py +++ b/tests/test_bl_types/test_scene.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_scene import BlScene +from multi_user.io_bpy.bl_scene import BlScene from multi_user.utils import get_preferences def test_scene(clear_blend): diff --git a/tests/test_bl_types/test_speaker.py b/tests/test_bl_types/test_speaker.py index 81afe0e..96ed5af 100644 --- a/tests/test_bl_types/test_speaker.py +++ b/tests/test_bl_types/test_speaker.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_speaker import BlSpeaker +from multi_user.io_bpy.bl_speaker import BlSpeaker def test_speaker(clear_blend): bpy.ops.object.speaker_add() diff --git a/tests/test_bl_types/test_texture.py b/tests/test_bl_types/test_texture.py index 462128b..32d3acc 100644 --- a/tests/test_bl_types/test_texture.py +++ b/tests/test_bl_types/test_texture.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_texture import BlTexture +from multi_user.io_bpy.bl_texture import BlTexture TEXTURE_TYPES = ['NONE', 'BLEND', 'CLOUDS', 'DISTORTED_NOISE', 'IMAGE', 'MAGIC', 'MARBLE', 'MUSGRAVE', 'NOISE', 'STUCCI', 'VORONOI', 'WOOD'] diff --git a/tests/test_bl_types/test_volume.py b/tests/test_bl_types/test_volume.py index f4fcf6c..5ef7b92 100644 --- a/tests/test_bl_types/test_volume.py +++ b/tests/test_bl_types/test_volume.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_volume import BlVolume +from multi_user.io_bpy.bl_volume import BlVolume def test_volume(clear_blend): datablock = bpy.data.volumes.new("Test") diff --git a/tests/test_bl_types/test_world.py b/tests/test_bl_types/test_world.py index 4e42a50..d22536b 100644 --- a/tests/test_bl_types/test_world.py +++ b/tests/test_bl_types/test_world.py @@ -5,7 +5,7 @@ from deepdiff import DeepDiff import bpy import random -from multi_user.bl_types.bl_world import BlWorld +from multi_user.io_bpy.bl_world import BlWorld def test_world(clear_blend): datablock = bpy.data.worlds.new('test')