Asset Pipeline v2 #145
@ -95,13 +95,13 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
|
|||||||
self.report({'ERROR'}, "Current File Name doesn't contain valid task layer")
|
self.report({'ERROR'}, "Current File Name doesn't contain valid task layer")
|
||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|
||||||
pub_file = core.find_sync_target(current_file)
|
sync_target = core.find_sync_target(current_file)
|
||||||
if self.pull:
|
if self.pull:
|
||||||
error_msg = core.merge_task_layer(
|
error_msg = core.merge_task_layer(
|
||||||
context,
|
context,
|
||||||
col_base_name=get_parent_col_name(),
|
col_base_name=get_parent_col_name(),
|
||||||
local_tls=[task_layer_name],
|
local_tls=[task_layer_name],
|
||||||
target_file=pub_file,
|
target_file=sync_target,
|
||||||
)
|
)
|
||||||
|
|
||||||
if error_msg:
|
if error_msg:
|
||||||
@ -114,8 +114,11 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
|
|||||||
if not self.push:
|
if not self.push:
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
# TODO Include staged file if it exists in this loop
|
push_targets = core.find_all_published(current_file, "publish")
|
||||||
for file in core.find_all_published(current_file, "publish"):
|
if sync_target not in push_targets:
|
||||||
|
push_targets.append(sync_target)
|
||||||
|
|
||||||
|
for file in push_targets:
|
||||||
file_path = file.__str__()
|
file_path = file.__str__()
|
||||||
bpy.ops.wm.open_mainfile(filepath=file_path)
|
bpy.ops.wm.open_mainfile(filepath=file_path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user