Asset Pipeline v2 #145

Closed
Nick Alberelli wants to merge 431 commits from (deleted):feature/asset-pipeline-v2 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 23 additions and 1 deletions
Showing only changes of commit 618e17edbf - Show all commits

View File

@ -344,12 +344,33 @@ class ASSETPIPE_OT_publish_new_version(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
class ASSETPIPE_OT_reset_ownership(bpy.types.Operator):
bl_idname = "assetpipe.reset_ownership"
bl_label = "Reset Ownership"
bl_description = (
"""Reset the Object owner and transfer data on selected object(s)"""
)
def execute(self, context: bpy.types.Context):
objs = context.selected_objects
for obj in objs:
obj = context.active_object
obj.asset_id_owner = "NONE"
obj.transfer_data_ownership.clear()
self.report(
{'INFO'},
f"'{obj.name}' ownership data cleared ",
)
return {'FINISHED'}
classes = ( classes = (
ASSETPIPE_OT_update_ownership, ASSETPIPE_OT_update_ownership,
ASSETPIPE_OT_sync_push, ASSETPIPE_OT_sync_push,
ASSETPIPE_OT_sync_pull, ASSETPIPE_OT_sync_pull,
ASSETPIPE_OT_publish_new_version, ASSETPIPE_OT_publish_new_version,
ASSETPIPE_OT_create_new_asset, ASSETPIPE_OT_create_new_asset,
ASSETPIPE_OT_reset_ownership,
) )

View File

@ -65,7 +65,8 @@ class ASSETPIPE_PT_sync_advanced(bpy.types.Panel):
bl_options = {'DEFAULT_CLOSED'} bl_options = {'DEFAULT_CLOSED'}
def draw(self, context: bpy.types.Context) -> None: def draw(self, context: bpy.types.Context) -> None:
self.layout.label(text="FOO") layout = self.layout
layout.operator("assetpipe.reset_ownership")
class ASSETPIPE_PT_ownership_inspector(bpy.types.Panel): class ASSETPIPE_PT_ownership_inspector(bpy.types.Panel):