diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-07-25 15:27:18 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-07-25 15:27:18 +0400 |
commit | fec3ddabb1d75ee6a3a28589813f2acc85215e18 (patch) | |
tree | fd50e11cb9540fdcfad454458f6887091b330281 /source/blender/freestyle/intern/python/BPy_Convert.h | |
parent | d7bce7e10952ac47551132c93f64d9aa8e54f1db (diff) |
* Better support for vector-like objects in method arguments.
Now the following methods in the Freestyle Python API accept
not only Blender.Mathutils.Vector instances but also lists and
tuples having an appropriate number of elements.
FrsNoise::turbulence2()
FrsNoise::turbulence3()
FrsNoise::smoothNoise2()
FrsNoise::smoothNoise3()
SVertex::__init__()
SVertex::setPoint3D()
SVertex::setPoint2D()
SVertex::AddNormal()
FEdgeSharp::setNormalA()
FEdgeSharp::setNormalB()
FEdgeSmooth::setNormal()
CalligraphicShader::__init__()
StrokeAttribute::setAttributeVec2f()
StrokeAttribute::setAttributeVec3f()
StrokeAttribute::setColor()
StrokeVertex::setPoint()
* Added the following converters for the sake of the improvements
mentioned above.
Vec2f_ptr_from_PyObject()
Vec3f_ptr_from_PyObject()
Vec3r_ptr_from_PyObject()
Vec2f_ptr_from_PyList()
Vec3f_ptr_from_PyList()
Vec3r_ptr_from_PyList()
Vec2f_ptr_from_PyTuple()
Vec3f_ptr_from_PyTuple()
Vec3r_ptr_from_PyTuple()
Those converters with the suffixes _PyList and _PyTuple accept
only lists and tuples having an appropriate number of elements,
respectively, while those with the suffix _PyObject accept lists,
tuples, or Blender.Mathutils.Vector instances.
* Fixed a null pointer reference in Interface0D___dealloc__().
* Corrected the names of 3 methods in the FEdgeSmooth class.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Convert.h')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Convert.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 3d0e3adf235..3d298c0db9a 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -115,9 +115,18 @@ bool bool_from_PyBool( PyObject *b ); IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ); Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ); Nature::EdgeNature EdgeNature_from_BPy_Nature( PyObject* obj ); +Vec2f * Vec2f_ptr_from_PyObject( PyObject* obj ); +Vec3f * Vec3f_ptr_from_PyObject( PyObject* obj ); +Vec3r * Vec3r_ptr_from_PyObject( PyObject* obj ); Vec2f * Vec2f_ptr_from_Vector( PyObject* obj ); Vec3f * Vec3f_ptr_from_Vector( PyObject* obj ); Vec3r * Vec3r_ptr_from_Vector( PyObject* obj ); +Vec2f * Vec2f_ptr_from_PyList( PyObject* obj ); +Vec3f * Vec3f_ptr_from_PyList( PyObject* obj ); +Vec3r * Vec3r_ptr_from_PyList( PyObject* obj ); +Vec2f * Vec2f_ptr_from_PyTuple( PyObject* obj ); +Vec3f * Vec3f_ptr_from_PyTuple( PyObject* obj ); +Vec3r * Vec3r_ptr_from_PyTuple( PyObject* obj ); |