refactor: clean

This commit is contained in:
Swann Martinez 2019-04-10 11:21:10 +02:00
parent 92f9070bd9
commit cc4033978d
No known key found for this signature in database
GPG Key ID: 414CCAFD8DA720E1
6 changed files with 7 additions and 81 deletions

View File

@ -8,8 +8,6 @@ bl_info = {
"category" : "Collaboration"
}
from .libs.bsyncio import bsyncio
import bpy
import os
@ -21,7 +19,6 @@ from . import net_ui
from . import net_ecs
def register():
bsyncio.register()
net_operators.register()
net_ui.register()
net_ecs.register()
@ -30,5 +27,4 @@ def unregister():
net_ui.unregister()
net_operators.unregister()
net_ecs.unregister()
bsyncio.unregister()

0
libs/__init__.py Normal file
View File

@ -1 +0,0 @@
Subproject commit 95275093b79d9289f939079550bb47ab25c1eacd

@ -1 +0,0 @@
Subproject commit 5b6cd0c51718d5dcfa0e5613f824b5251cf092ac

View File

@ -4,14 +4,19 @@ import threading
from uuid import uuid4
import binascii
import os
import sys
from random import randint
import time
from enum import Enum
try:
from .libs import umsgpack, zmq
from .libs import umsgpack
from .libs import zmq
except:
from libs import umsgpack, zmq
# Server import
from libs import umsgpack
from libs import zmq
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)

View File

@ -1,73 +0,0 @@
import bpy
from .libs.esper import esper
class Object:
def __init__(self, name=None):
self.name = name
class Vector:
def __init__(self, x=0.0 ,y=0.0,z=0.0):
self.x = x
self.y = y
self.z = z
class Pointer:
def __init__(self, path=None):
self.path = path
class ObjectProcessor(esper.Processor):
def __init__(self):
super().__init__()
def process(self):
for ent in self.world.get_component(Object):
print('asdasd')
class ecs_launch(bpy.types.Operator):
bl_idname = "ecs.launch"
bl_label = "ecs_launch"
bl_description = "Description that shows in blender tooltips"
bl_options = {'REGISTER'}
@classmethod
def poll(cls, context):
return True
def invoke(self, context, event):
context.window_manager.modal_handler_add(self)
return {"RUNNING_MODAL"}
def modal(self, context, event):
if event.type == "LEFTMOUSE":
return {"FINISHED"}
if event.type in {"RIGHTMOUSE", "ESC"}:
return {"CANCELLED"}
return {"RUNNING_MODAL"}
class ecs_init(bpy.types.Operator):
bl_idname = "ecs.init"
bl_label = "ecs_init"
bl_description = "Description that shows in blender tooltips"
bl_options = {"REGISTER"}
@classmethod
def poll(cls, context):
return True
def execute(self, context):
return {"FINISHED"}
classes = (
ecs_init,
ecs_launch,
)
register, unregister = bpy.utils.register_classes_factory(classes)