[Bf-python] __blender__ constant
dunk
dunk at dunkfordyce.co.uk
Fri Dec 30 19:50:48 CET 2005
hi,
it would be nice to be able to detect when a script/module is being run inside
blender or not. perhaps the existence of a __blender__ variable would help
here? im not entirely sure what the variable would contain... maybe the
blender version?
the only other way i can think to detect if blender is around is using a
try/except around import Blender but this doesnt "feel" quite right.
of course even using a variable would still mean the same try/except but it
would read nicer:
try:
__blender__
except NameError:
# no blender
dunk
More information about the Bf-python
mailing list