[Bf-python] Blender edit modes
Toni Alatalo
antont at kyperjokki.fi
Thu Jan 5 12:50:58 CET 2006
On Thursday 05 January 2006 04:55, Campbell Barton wrote:
> Could we depricate Window.EditMode() in favor
> Window.Mode(Window.Modes['EDITMODE'])
i guess that style would be better, except i think as:
window.mode = Window.EDITMODE
.. as =, and not (), is the python assignment operator, and as module/class
members are dictionary items anyway, it is nicer to have something.CONSTANT
instead of constdict['CONSTANT'] .. also allows importing of constants (like
pygame has pygame.locals which is made for the exceptionally acceptable *
importing, so after 'from pygame.locals import *' you can just do if
kbevent.val == SPACEKEY etc.)
> Any non logical action would raise an error.
the mode property setter could do that checking in the = using case.
> - Cam
~Toni
More information about the Bf-python
mailing list