Asset Pipeline v2 #145
@ -283,6 +283,13 @@ class ASSETPIPE_OT_sync_pull(bpy.types.Operator):
|
||||
description="Save Current File and Images before Push",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context: bpy.types.Context) -> bool:
|
||||
if context.mode == 'OBJECT':
|
||||
return True
|
||||
cls.poll_message_set("Pull is only avaliable in Object Mode")
|
||||
return False
|
||||
|
||||
def invoke(self, context: bpy.types.Context, event: bpy.types.Event):
|
||||
sync_invoke(self, context)
|
||||
return context.window_manager.invoke_props_dialog(self, width=400)
|
||||
@ -332,6 +339,13 @@ class ASSETPIPE_OT_sync_push(bpy.types.Operator):
|
||||
description="Save Current File and Images before Push",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context: bpy.types.Context) -> bool:
|
||||
if context.mode == 'OBJECT':
|
||||
return True
|
||||
cls.poll_message_set("Push is only avaliable in Object Mode")
|
||||
return False
|
||||
|
||||
def invoke(self, context: bpy.types.Context, event: bpy.types.Event):
|
||||
sync_invoke(self, context)
|
||||
return context.window_manager.invoke_props_dialog(self, width=400)
|
||||
|
Loading…
Reference in New Issue
Block a user