Asset Pipeline v2 #145
@ -112,7 +112,6 @@ def ownership_set(temp_transfer_data: bpy.types.CollectionProperty) -> None:
|
||||
|
||||
def get_invalid_objects(
|
||||
local_col: bpy.types.Collection,
|
||||
scene: bpy.types.Scene,
|
||||
) -> list[bpy.types.Object]:
|
||||
"""Returns a list of objects not used in the merge processing,
|
||||
which are considered invalid. The objects will be excluded from
|
||||
@ -129,7 +128,7 @@ def get_invalid_objects(
|
||||
task_layer_objs = get_task_layer_objects()
|
||||
|
||||
invalid_obj = []
|
||||
for obj in scene.objects:
|
||||
for obj in local_col.all_objects:
|
||||
if obj.asset_id_owner == "NONE":
|
||||
invalid_obj.append(obj)
|
||||
if obj not in task_layer_objs and obj.asset_id_owner in local_task_layer_keys:
|
||||
|
@ -45,7 +45,7 @@ def sync_invoke(self, context):
|
||||
|
||||
ownership_get(local_col, context.scene)
|
||||
|
||||
self._invalid_objs = get_invalid_objects(local_col, context.scene)
|
||||
self._invalid_objs = get_invalid_objects(local_col)
|
||||
self._shared_ids = init_shared_ids(context.scene)
|
||||
|
||||
|
||||
@ -119,16 +119,18 @@ def create_temp_file_backup(self, context):
|
||||
context.scene.asset_pipeline.temp_file = temp_file.__str__()
|
||||
return temp_file.__str__()
|
||||
|
||||
|
||||
def update_temp_file_paths(self, context, temp_file_path):
|
||||
asset_pipe = context.scene.asset_pipeline
|
||||
asset_pipe.temp_file = temp_file_path
|
||||
asset_pipe.source_file = self._current_file.__str__()
|
||||
|
||||
|
||||
def sync_execute_pull(self, context):
|
||||
temp_file_path = create_temp_file_backup(self, context)
|
||||
update_temp_file_paths(self, context, temp_file_path)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=temp_file_path, copy=True)
|
||||
|
||||
|
||||
error_msg = merge_task_layer(
|
||||
context,
|
||||
local_tls=self._task_layer_keys,
|
||||
@ -147,7 +149,6 @@ def sync_execute_push(self, context):
|
||||
|
||||
if self._sync_target not in push_targets:
|
||||
push_targets.append(self._sync_target)
|
||||
|
||||
|
||||
for file in push_targets:
|
||||
file_path = file.__str__()
|
||||
|
Loading…
Reference in New Issue
Block a user