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 6 additions and 3 deletions
Showing only changes of commit 3888a31873 - Show all commits

View File

@ -31,12 +31,12 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
pull: bpy.props.BoolProperty( pull: bpy.props.BoolProperty(
name="Pull before Pushing", name="Pull before Pushing",
default=True, default=False,
description="Pull in any new data from the Published file before Pushing", description="Pull in any new data from the Published file before Pushing",
) )
push: bpy.props.BoolProperty( push: bpy.props.BoolProperty(
name="Push", default=True, description="Push any new data to Published file" name="Push", default=False, description="Push any new data to Published file"
) )
def invoke(self, context: bpy.types.Context, event: bpy.types.Event): def invoke(self, context: bpy.types.Context, event: bpy.types.Event):
@ -49,6 +49,8 @@ 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'}
self._new_transfer_data = core.get_ownership(local_col, task_layer_name) self._new_transfer_data = core.get_ownership(local_col, task_layer_name)
if self.push:
self.pull = True
return context.window_manager.invoke_props_dialog(self, width=400) return context.window_manager.invoke_props_dialog(self, width=400)
def get_transfer_data(self, name): def get_transfer_data(self, name):

View File

@ -12,12 +12,13 @@ class ASSETPIPE_PT_TestUI(bpy.types.Panel):
text=f"Active Task Layer: {context.collection.name.split('.')[-1]}" text=f"Active Task Layer: {context.collection.name.split('.')[-1]}"
) )
self.layout.label(text="Test UI") self.layout.label(text="Test UI")
self.layout.operator("assetpipe.sync_with_publish", text="Update Ownership")
self.layout.operator( self.layout.operator(
"assetpipe.sync_with_publish", text="Push to Publish", icon="TRIA_UP" "assetpipe.sync_with_publish", text="Push to Publish", icon="TRIA_UP"
).push = True ).push = True
self.layout.operator( self.layout.operator(
"assetpipe.sync_with_publish", text="Pull from Publish", icon="TRIA_DOWN" "assetpipe.sync_with_publish", text="Pull from Publish", icon="TRIA_DOWN"
).push = False ).pull = True
if not context.active_object: if not context.active_object:
return return