refactor: disable force apply during the reparent

This commit is contained in:
Swann
2020-10-08 15:00:27 +02:00
parent 8e7be5afde
commit 724c2345df
3 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ from . import environment
DEPENDENCIES = { DEPENDENCIES = {
("replication", '0.0.21a15'), ("replication", '0.0.21a17'),
} }

View File

@ -47,7 +47,7 @@ def np_load_collection(dikt: dict, collection: bpy.types.CollectionProperty, att
:type attributes: list :type attributes: list
""" """
if not dikt or len(collection) == 0: if not dikt or len(collection) == 0:
logging.warning(f'Skipping collection') logging.debug(f'Skipping collection')
return return
if attributes is None: if attributes is None:

View File

@ -119,14 +119,14 @@ class ApplyTimer(Timer):
if node_ref.state == FETCHED: if node_ref.state == FETCHED:
try: try:
session.apply(node, force=True) session.apply(node)
except Exception as e: except Exception as e:
logging.error(f"Fail to apply {node_ref.uuid}: {e}") logging.error(f"Fail to apply {node_ref.uuid}: {e}")
elif node_ref.state == REPARENT: elif node_ref.state == REPARENT:
# Reload the node # Reload the node
node_ref.remove_instance() node_ref.remove_instance()
node_ref.resolve() node_ref.resolve()
session.apply(node, force=True) session.apply(node)
for parent in session._graph.find_parents(node): for parent in session._graph.find_parents(node):
logging.info(f"Applying parent {parent}") logging.info(f"Applying parent {parent}")
session.apply(parent, force=True) session.apply(parent, force=True)