[Bf-python] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11293] branches/pyapi_devel/source/ blender/python/api2_2x: * Added Constants to Mesh
Ken Hughes
khughes at pacific.edu
Tue Jul 17 00:24:21 CEST 2007
Campbell Barton wrote:
> Revision: 11293
> http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11293
> Author: campbellbarton
> Date: 2007-07-16 23:20:52 +0200 (Mon, 16 Jul 2007)
>
> Log Message:
> -----------
> * added utility functions for new constants Const_FromPyObject to make getting the const from a PyObject easier.
> (also changed a few things you may want to look Ken)
>
May want to discuss this further before we make a lot of changes. One
thing which came up during the discussion
about constants was being able to use strings instead of actual constant
objects:
ob.drawType = "BOUNDBOX"
Turns out this was not hard to implement so I wrote an API function
PyConst_Lookup() which searched for a match and
returned the constant's value. But since we didn't actually agree to
support this in the API, maybe we should decide whether
we want this or not. Again, from a coding standpoint it's not a big
issue, it's just a "standards issue".
Ken
(PS: description of implementation:
http://wiki.blender.org/index.php/BlenderDev/Bitfields#Use_of_Strings_in_Place_of_Constants
)
More information about the Bf-python
mailing list