Asset Pipeline v2 #145
@ -182,6 +182,7 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
|
|||||||
temp_transfer_data = context.scene.asset_pipeline.temp_transfer_data
|
temp_transfer_data = context.scene.asset_pipeline.temp_transfer_data
|
||||||
core.ownership_set(temp_transfer_data)
|
core.ownership_set(temp_transfer_data)
|
||||||
current_file = Path(bpy.data.filepath)
|
current_file = Path(bpy.data.filepath)
|
||||||
|
temp_dir = Path(bpy.app.tempdir).parent
|
||||||
task_layer_name = context.scene.asset_pipeline.task_layer_name
|
task_layer_name = context.scene.asset_pipeline.task_layer_name
|
||||||
if task_layer_name == "NONE":
|
if task_layer_name == "NONE":
|
||||||
self.report({'ERROR'}, "Current File Name doesn't contain valid task layer")
|
self.report({'ERROR'}, "Current File Name doesn't contain valid task layer")
|
||||||
@ -193,6 +194,10 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
|
|||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|
||||||
if self.pull:
|
if self.pull:
|
||||||
|
temp_file = temp_dir.joinpath(
|
||||||
|
current_file.name.replace(".blend", "") + "_Asset_Pipe_Backup.blend"
|
||||||
|
)
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=temp_file.__str__(), copy=True)
|
||||||
error_msg = core.merge_task_layer(
|
error_msg = core.merge_task_layer(
|
||||||
context,
|
context,
|
||||||
local_tls=[task_layer_name],
|
local_tls=[task_layer_name],
|
||||||
|
Loading…
Reference in New Issue
Block a user