feat: skip external updates
This commit is contained in:
parent
07358802f7
commit
569543650f
@ -19,6 +19,8 @@
|
||||
import bpy
|
||||
import mathutils
|
||||
|
||||
from deepdiff import DeepDiff, Delta
|
||||
|
||||
from .. import utils
|
||||
from replication.protocol import ReplicatedDatablock
|
||||
from .dump_anything import Loader, Dumper
|
||||
@ -140,5 +142,22 @@ class BlCollection(ReplicatedDatablock):
|
||||
def resolve_deps(datablock: object) -> [object]:
|
||||
return resolve_collection_dependencies(datablock)
|
||||
|
||||
@staticmethod
|
||||
def compute_delta(last_data: dict, current_data: dict) -> Delta:
|
||||
diff_params = {
|
||||
'ignore_order': True,
|
||||
'report_repetition': True
|
||||
}
|
||||
delta_params = {
|
||||
# 'mutate': True
|
||||
}
|
||||
|
||||
return Delta(
|
||||
DeepDiff(last_data,
|
||||
current_data,
|
||||
cache_size=5000,
|
||||
**diff_params),
|
||||
**delta_params)
|
||||
|
||||
_type = bpy.types.Collection
|
||||
_class = BlCollection
|
@ -952,7 +952,11 @@ def depsgraph_evaluation(scene):
|
||||
|
||||
update_external_dependencies()
|
||||
|
||||
is_internal = [u for u in dependency_updates if u.is_updated_geometry or u.is_updated_shading or u.is_updated_transform]
|
||||
|
||||
# NOTE: maybe we don't need to check each update but only the first
|
||||
if not is_internal:
|
||||
return
|
||||
for update in reversed(dependency_updates):
|
||||
# Is the object tracked ?
|
||||
if update.id.uuid:
|
||||
|
Loading…
Reference in New Issue
Block a user