Asset Pipeline v2 #145
@ -421,7 +421,14 @@ class ASSETPIPE_OT_revert_file(bpy.types.Operator):
|
|||||||
asset_pipe = context.scene.asset_pipeline
|
asset_pipe = context.scene.asset_pipeline
|
||||||
self._temp_file = asset_pipe.temp_file
|
self._temp_file = asset_pipe.temp_file
|
||||||
self._source_file = asset_pipe.source_file
|
self._source_file = asset_pipe.source_file
|
||||||
# TODO Add Error Messages if path is empty
|
|
||||||
|
if not Path(self._temp_file).exists():
|
||||||
|
self.report(
|
||||||
|
{'ERROR'},
|
||||||
|
"Revert failed; no file found",
|
||||||
|
)
|
||||||
|
return {'CANCELLED'}
|
||||||
|
|
||||||
bpy.ops.wm.open_mainfile(filepath=self._temp_file)
|
bpy.ops.wm.open_mainfile(filepath=self._temp_file)
|
||||||
bpy.ops.wm.save_as_mainfile(filepath=self._source_file)
|
bpy.ops.wm.save_as_mainfile(filepath=self._source_file)
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
@ -741,7 +748,6 @@ class ASSETPIPE_OT_batch_ownership_change(bpy.types.Operator):
|
|||||||
if transfer_data_item_to_update.owner in get_local_task_layers():
|
if transfer_data_item_to_update.owner in get_local_task_layers():
|
||||||
transfer_data_item_to_update.surrender = True
|
transfer_data_item_to_update.surrender = True
|
||||||
continue
|
continue
|
||||||
# TODO Update Prefixes when setting new ownership
|
|
||||||
transfer_data_item_to_update.owner = self.owner_selection
|
transfer_data_item_to_update.owner = self.owner_selection
|
||||||
task_layer_prefix_transfer_data_update(transfer_data_item_to_update)
|
task_layer_prefix_transfer_data_update(transfer_data_item_to_update)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user