Adding confirmation message when refactoring batches

pull/54/head
Torrin Leonard 2022-02-03 18:57:23 -05:00
rodzic cd62dfa62b
commit f73dc9ed2a
1 zmienionych plików z 13 dodań i 3 usunięć

Wyświetl plik

@ -186,12 +186,19 @@ class exportNFTs(bpy.types.Operator):
return {"FINISHED"}
class refactor_Batches(bpy.types.Operator):
"""Refactor your Batches? This action cannot be undone."""
bl_idname = 'refactor.batches'
bl_label = 'Refactor Batches'
bl_description = 'Generate and export a given batch of NFTs.'
bl_options = {"REGISTER", "UNDO"}
bl_label = 'Refactor your Batches?'
bl_description = 'This action cannot be undone.'
bl_options = {'REGISTER', 'INTERNAL'}
@classmethod
def poll(cls, context):
return True
def execute(self, context):
self.report({'INFO'}, "YES!")
save_path = bpy.context.scene.my_tool.save_path
cardanoMetaDataBool = bpy.context.scene.my_tool.cardanoMetaDataBool
@ -204,6 +211,9 @@ class refactor_Batches(bpy.types.Operator):
cardanoMetaDataBool, solanaMetaDataBool, erc721MetaData)
return {"FINISHED"}
def invoke(self, context, event):
return context.window_manager.invoke_confirm(self, event)
# Main Panel:
class BMNFTS_PT_MainPanel(bpy.types.Panel):
bl_label = "Blend_My_NFTs"