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
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB
3 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ from . import environment
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
"""
if not dikt or len(collection) == 0:
logging.warning(f'Skipping collection')
logging.debug(f'Skipping collection')
return
if attributes is None:

View File

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