Asset Pipeline v2 #145
@ -31,12 +31,12 @@ class ASSETPIPE_OT_sync_with_publish(bpy.types.Operator):
|
||||
|
||||
pull: bpy.props.BoolProperty(
|
||||
name="Pull before Pushing",
|
||||
default=True,
|
||||
default=False,
|
||||
description="Pull in any new data from the Published file before Pushing",
|
||||
)
|
||||
|
||||
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):
|
||||
@ -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")
|
||||
return {'CANCELLED'}
|
||||
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)
|
||||
|
||||
def get_transfer_data(self, name):
|
||||
|
@ -12,12 +12,13 @@ class ASSETPIPE_PT_TestUI(bpy.types.Panel):
|
||||
text=f"Active Task Layer: {context.collection.name.split('.')[-1]}"
|
||||
)
|
||||
self.layout.label(text="Test UI")
|
||||
self.layout.operator("assetpipe.sync_with_publish", text="Update Ownership")
|
||||
self.layout.operator(
|
||||
"assetpipe.sync_with_publish", text="Push to Publish", icon="TRIA_UP"
|
||||
).push = True
|
||||
self.layout.operator(
|
||||
"assetpipe.sync_with_publish", text="Pull from Publish", icon="TRIA_DOWN"
|
||||
).push = False
|
||||
).pull = True
|
||||
|
||||
if not context.active_object:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user