fix: edit-mode error while pushing
This commit is contained in:
parent
2913e6d5a7
commit
52ebb874b0
@ -76,21 +76,25 @@ def session_callback(name):
|
||||
def initialize_session():
|
||||
"""Session connection init hander
|
||||
"""
|
||||
logging.info("Intializing the scene")
|
||||
settings = utils.get_preferences()
|
||||
runtime_settings = bpy.context.window_manager.session
|
||||
|
||||
logging.info("Constructing nodes")
|
||||
# Step 1: Constrect nodes
|
||||
for node in session._graph.list_ordered():
|
||||
node_ref = session.get(uuid=node)
|
||||
if node_ref.state == FETCHED:
|
||||
node_ref.resolve()
|
||||
|
||||
logging.info("Loading nodes")
|
||||
# Step 2: Load nodes
|
||||
for node in session._graph.list_ordered():
|
||||
node_ref = session.get(uuid=node)
|
||||
if node_ref.state == FETCHED:
|
||||
node_ref.apply()
|
||||
|
||||
logging.info("Registering timers")
|
||||
# Step 4: Register blender timers
|
||||
for d in deleyables:
|
||||
d.register()
|
||||
@ -965,14 +969,6 @@ def depsgraph_evaluation(scene):
|
||||
# Retrieve local version
|
||||
node = session.get(uuid=update.id.uuid)
|
||||
|
||||
# Check if the update needs to be replicated else ignore it
|
||||
if update.is_updated_transform \
|
||||
or update.is_updated_shading \
|
||||
or update.is_updated_geometry \
|
||||
or isinstance(update.id,bpy.types.Collection):
|
||||
else:
|
||||
continue
|
||||
|
||||
# Check our right on this update:
|
||||
# - if its ours or ( under common and diff), launch the
|
||||
# update process
|
||||
|
@ -140,21 +140,18 @@ class PushTimer(Timer):
|
||||
while self.q_push:
|
||||
node = session.get(uuid= self.q_push.pop())
|
||||
|
||||
if node.has_changed():
|
||||
try:
|
||||
try:
|
||||
if node.has_changed():
|
||||
session.commit(node.uuid)
|
||||
session.push(node.uuid, check_data=False)
|
||||
except ReferenceError:
|
||||
logging.debug(f"Reference error {node.uuid}")
|
||||
if not node.is_valid():
|
||||
session.remove(node.uuid)
|
||||
except ContextError as e:
|
||||
logging.debug(e)
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
else:
|
||||
logging.debug("Skipping update no changes")
|
||||
|
||||
except ReferenceError:
|
||||
logging.debug(f"Reference error {node.uuid}")
|
||||
if not node.is_valid():
|
||||
session.remove(node.uuid)
|
||||
except ContextError as e:
|
||||
logging.debug(e)
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
class DynamicRightSelectTimer(Timer):
|
||||
def __init__(self, timeout=.1):
|
||||
super().__init__(timeout)
|
||||
|
Loading…
Reference in New Issue
Block a user