[Bf-committers] SystemError when using simple mesh commands in scripts started from the command line...

Martin Poirier theeth at yahoo.com
Sat Nov 7 19:22:27 CET 2009


Hi,

--- On Sat, 11/7/09, Dietrich Bollmann <diresu at web.de> wrote:

> I understand that the scene has to be set (the syntax could
> be nicer
> though) and I suppose that the window is necessary for
> polling the
> current windows event queue before executing the command
> when creating
> meshes from the GUI.

The window is used to get the event during operator execution when using invoke and not exec[1].

> If this intuition should be right it probably doesn't make
> sense to poll
> any window queue when executing code from a script and it
> should be
> enough to skip the polling when the window context is not
> set at the
> place of throwing an error?

The event is required for all invoke operator calls, there's no way to skip it in those case. What could be done is not requiring it when an operator runs with exec.

Martin

[1] Operators have two calling modes: exec and invoke. Invoke is for interactive operations and exec is for instantaneous operations (an operator can be made to work in both modes, some have invoke redirect to exec).


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/


More information about the Bf-committers mailing list