POPUP DIalog WITH YES NO OPTIONS

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
rasamohamed
Posts: 0
Joined: Sat Oct 05, 2013 11:44 am
Location: INDIA

POPUP DIalog WITH YES NO OPTIONS

Post by rasamohamed » Thu Oct 24, 2013 1:22 pm

class DialogOperator(bpy.types.Operator):
bl_idname = "object.dialog_operator"
bl_label = "Save Before You QUIT!"
def execute(self, context):
message = " You didn't saved yet "
self.report({'INFO'}, message)
print(message)
return {'FINISHED'}

def invoke(self, context, event):
return context.window_manager.invoke_props_dialog(self)

class DialogPanel(bpy.types.Panel):
bl_label = "Dialog"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"

def draw(self, context):
self.layout.operator("object.dialog_operator")


Hi,
From the above POPUP Dialog code, I have to ADD two buttons like Yes and No options. If I make choose on yes or No, different functionality have to be done.
Please tell how to write the code to create the Yes No buttons. :roll:

Thanks in advance who'll help me............?

Regards
Rasa [India]
http://projectvismaya.com/
Regards
Rasa [India]
http://projectvismaya.com/

CoDEmanX
Posts: 0
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Post by CoDEmanX » Sat Oct 26, 2013 4:09 pm

I'm sitting, waiting, wishing, building Blender in superstition...

Post Reply