[Bf-python] tp_getset Texture.c uploaded
Willian Padovani Germano
wgermano at superig.com.br
Sun Aug 28 16:26:20 CEST 2005
Stephen Swaney wrote:
> Some of these patches have #defines where we create an
> EXPP_ version of an existing Blender constant.
>(...) Is there a rason not to use the Blender #defines directy?
Hi Stephen,
Back in the very beginning I used those to have all our constants
together 1) with a clear convention. I know this is not a good practice
in general, mostly I also did it because:
2) Some constants are not defined anywhere (are hardcoded values in the
interface), like the _MIN and _MAX ones. Since I needed those I also
added the default values:
EXPP_SOMECONSTANT_MIN
EXPP_SOMECONSTANT_MAX
EXPP_SOMECONSTANT <- this is the default already defined somewhere else
3) We wanted to keep all interface stuff clearly separated, to avoid
Blender functions and constants in bpython code. It seemed possible back
then, but obviously the growth of the code showed bpython needed to be a
normal part of Blender using code from the others.
So the EXPP constants already defined elsewhere can be killed, no
problem. Blame my lack of experience back then! (Not that I've gained
much later... ;)
--
Willian
More information about the Bf-python
mailing list