fix: mesh uv loading issue

refacotr: loading status
refactor: cleanup logs
This commit is contained in:
Swann
2020-02-08 23:23:00 +01:00
parent b182632723
commit 378f52a1ab
4 changed files with 12 additions and 11 deletions

View File

@ -80,8 +80,6 @@ class BlDatablock(ReplicatedDatablock):
if self.pointer and hasattr(self.pointer, 'uuid'): if self.pointer and hasattr(self.pointer, 'uuid'):
self.pointer.uuid = self.uuid self.pointer.uuid = self.uuid
self.diff_method = DIFF_BINARY
def library_apply(self): def library_apply(self):
"""Apply stored data """Apply stored data

View File

@ -3,7 +3,7 @@ import bmesh
import mathutils import mathutils
from .. import utils from .. import utils
from ..libs.replication.replication.constants import DIFF_BINARY
from .bl_datablock import BlDatablock from .bl_datablock import BlDatablock
def dump_mesh(mesh, data={}): def dump_mesh(mesh, data={}):
@ -85,7 +85,7 @@ class BlMesh(BlDatablock):
bl_icon = 'MESH_DATA' bl_icon = 'MESH_DATA'
def construct(self, data): def construct(self, data):
self.diff_method = DIFF_BINARY
instance = bpy.data.meshes.new(data["name"]) instance = bpy.data.meshes.new(data["name"])
instance.uuid = self.uuid instance.uuid = self.uuid
return instance return instance
@ -136,8 +136,10 @@ class BlMesh(BlDatablock):
# 3 - LOAD METADATA # 3 - LOAD METADATA
# uv's # uv's
for uv_layer in data['uv_layers']: # target.uv_layers.clear()
target.uv_layers.new(name=uv_layer) utils.dump_anything.load(target.uv_layers, data['uv_layers'])
# for uv_layer in data['uv_layers']:
# target.uv_layers.new(name=uv_layer)
bevel_layer = mesh_buffer.verts.layers.bevel_weight.verify() bevel_layer = mesh_buffer.verts.layers.bevel_weight.verify()
skin_layer = mesh_buffer.verts.layers.skin.verify() skin_layer = mesh_buffer.verts.layers.skin.verify()

View File

@ -18,9 +18,9 @@ ICONS_PROP_STATES = ['TRIA_DOWN', # ADDED
def get_state_str(state): def get_state_str(state):
state_str = 'None' state_str = 'None'
if state == STATE_WAITING: if state == STATE_WAITING:
state_str = 'COMMITING DATA' state_str = 'WRMING UP DATA'
elif state == STATE_SYNCING: elif state == STATE_SYNCING:
state_str = 'SYNCING' state_str = 'FETCHING FROM SERVER'
elif state == STATE_AUTH: elif state == STATE_AUTH:
state_str = 'AUTHENTIFICATION' state_str = 'AUTHENTIFICATION'
elif state == STATE_CONFIG: elif state == STATE_CONFIG:
@ -28,7 +28,7 @@ def get_state_str(state):
elif state == STATE_ACTIVE: elif state == STATE_ACTIVE:
state_str = 'ACTIVE' state_str = 'ACTIVE'
elif state == STATE_SRV_SYNC: elif state == STATE_SRV_SYNC:
state_str = 'SERVER SYNC' state_str = 'PUSHING TO SERVER'
return state_str return state_str
class SESSION_PT_settings(bpy.types.Panel): class SESSION_PT_settings(bpy.types.Panel):
@ -274,7 +274,8 @@ class SESSION_PT_presence(bpy.types.Panel):
@classmethod @classmethod
def poll(cls, context): def poll(cls, context):
return True return not operators.client \
or (operators.client and operators.client.state['STATE'] in [STATE_INITIAL, STATE_ACTIVE])
def draw_header(self, context): def draw_header(self, context):
self.layout.prop(context.window_manager.session, "enable_presence", text="") self.layout.prop(context.window_manager.session, "enable_presence", text="")