[Bf-python] invoke_confirm with custom confirm message?

Campbell Barton ideasman42 at gmail.com
Tue Oct 15 07:57:51 CEST 2013


Have you looked into using a custom python popup?

http://www.blender.org/documentation/blender_python_api_2_69_1/bpy.types.WindowManager.html#bpy.types.WindowManager.popup_menu

On Mon, Oct 14, 2013 at 2:25 PM, Dalai Felinto <dfelinto at gmail.com> wrote:
> Hi,
>
> First a question, is it possible to have a custom message when I use
> invoke_confirm?
>
> Apparently there is not, and the not-so-nice alternative is to use
> invoke_props_dialog and have my own draw() function.
>
> Assuming that it's not possible, would that be a nice addition?
> I think I can do that myself, but I would like to get 'design approval'
> first.
>
> My proposal is to do:
> context.window_manager.invoke_confirm(self, event, text="Are you sure you
> want to do whatever with object \"{0}\"".format(context.object))
>
> I may do it anyways for a project I'm working on. But it would be nicer if
> it can be incorporated back in Blender.
>
> (also I may not do it any soon, so if anyone wants to do first, be my guest)
>
> Cheers,
> Dalai
> --
> blendernetwork.org/dalai-felinto
> www.dalaifelinto.com
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>



-- 
- Campbell



More information about the Bf-python mailing list