feat: skip external updates
This commit is contained in:
@ -19,6 +19,8 @@
|
|||||||
import bpy
|
import bpy
|
||||||
import mathutils
|
import mathutils
|
||||||
|
|
||||||
|
from deepdiff import DeepDiff, Delta
|
||||||
|
|
||||||
from .. import utils
|
from .. import utils
|
||||||
from replication.protocol import ReplicatedDatablock
|
from replication.protocol import ReplicatedDatablock
|
||||||
from .dump_anything import Loader, Dumper
|
from .dump_anything import Loader, Dumper
|
||||||
@ -140,5 +142,22 @@ class BlCollection(ReplicatedDatablock):
|
|||||||
def resolve_deps(datablock: object) -> [object]:
|
def resolve_deps(datablock: object) -> [object]:
|
||||||
return resolve_collection_dependencies(datablock)
|
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
|
_type = bpy.types.Collection
|
||||||
_class = BlCollection
|
_class = BlCollection
|
@ -952,7 +952,11 @@ def depsgraph_evaluation(scene):
|
|||||||
|
|
||||||
update_external_dependencies()
|
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
|
# 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):
|
for update in reversed(dependency_updates):
|
||||||
# Is the object tracked ?
|
# Is the object tracked ?
|
||||||
if update.id.uuid:
|
if update.id.uuid:
|
||||||
|
Reference in New Issue
Block a user