[Bf-committers] operators with "invoke" but without "exec"

Joshua Leung aligorith at gmail.com
Tue Apr 20 04:43:06 CEST 2010


Hi,

As requested by ZanQdo again, I've had a look into this.

This is patch is not correct, since this would cause compiler warnings
(exec callbacks only have 2 args, while invoke callbacks have 3). The
invoke() (with the extra wmEvent* arg) is superfluous here, so there
shouldn't be any problems with making this exec() only instead.

Most of the operators without exec() calls *should* only be those
which require mouse input for determining what they're supposed to
operate on. Any other operator that doesn't do so we should review at
some point (a list here would be great), though there may be some
other exceptions I've overlooked now.


Aligorith

On Mon, Apr 19, 2010 at 11:14 AM, Dalai Felinto <dfelinto at gmail.com> wrote:
> Hi,
> I was trying to help Daniel Salazar (ZanQdo) with python scripts and
> realized that some operators still lack an exec function.
> Specifically the screen.animation_play() and screen.animation_cancel().
>
> Is this by design or simply missing functionality?
> Using the invoke function as exec works in those cases [1]. But I
> don't know whether a specific exec is needed there, or how else to
> proceed with cases like this.
>
> [1] - http://www.pasteall.org/12502/diff
>
> Thanks,
> Dalai
>
> http://blenderecia.orgfree.com
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list