[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28248] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python: Major documentation updates.

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Sun Apr 18 01:47:49 CEST 2010


Revision: 28248
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28248
Author:   kjym3
Date:     2010-04-18 01:47:47 +0200 (Sun, 18 Apr 2010)

Log Message:
-----------
Major documentation updates.  The original Freestyle API reference
(http://freestyle.sourceforge.net/doc/html/index.html) has been
incorporated into the Blender/Freestyle Python API implementation
in the form of Sphinx-based embedded docstrings.  Some C++-specific
descriptions of classes and functions were revised so that they are
suitable for Python programmers.  Missing docstrings were filled,
and sparse descriptions were extended.  By means of the new
documentation system for Blender, an up-to-date Freestyle Python
API reference will be part of the Blender 2.5 documentation.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_BBox.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Id.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Iterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_MediumType.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Nature.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Operators.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_SShape.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_ViewMap.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_ViewShape.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_BBox.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_BBox.cpp	2010-04-17 22:43:18 UTC (rev 28247)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_BBox.cpp	2010-04-17 23:47:47 UTC (rev 28248)
@@ -6,11 +6,45 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////////
 
-/*---------------  Python API function prototypes for BBox instance  -----------*/
-static int BBox___init__(BPy_BBox *self, PyObject *args, PyObject *kwds);
-static void BBox___dealloc__(BPy_BBox *self);
-static PyObject * BBox___repr__(BPy_BBox *self);
+//-------------------MODULE INITIALIZATION--------------------------------
+int BBox_Init( PyObject *module )
+{
+	if( module == NULL )
+		return -1;
 
+	if( PyType_Ready( &BBox_Type ) < 0 )
+		return -1;
+
+	Py_INCREF( &BBox_Type );
+	PyModule_AddObject(module, "BBox", (PyObject *)&BBox_Type);
+	return 0;
+}
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+static char BBox___doc__[] =
+"Class for representing a bounding box.\n";
+
+static int BBox___init__(BPy_BBox *self, PyObject *args, PyObject *kwds)
+{
+	if(!( PyArg_ParseTuple(args, "") ))
+		return -1;
+	self->bb = new BBox< Vec3r>();
+	return 0;
+}
+
+static void BBox___dealloc__(BPy_BBox* self)
+{
+	delete self->bb;
+    Py_TYPE(self)->tp_free((PyObject*)self);
+}
+
+
+static PyObject * BBox___repr__(BPy_BBox* self)
+{
+    return PyUnicode_FromFormat("BBox - address: %p", self->bb );
+}
+
 /*----------------------BBox instance definitions ----------------------------*/
 static PyMethodDef BPy_BBox_methods[] = {
 	{NULL, NULL, 0, NULL}
@@ -39,7 +73,7 @@
 	0,                              /* tp_setattro */
 	0,                              /* tp_as_buffer */
 	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
-	"BBox objects",                 /* tp_doc */
+	BBox___doc__,                   /* tp_doc */
 	0,                              /* tp_traverse */
 	0,                              /* tp_clear */
 	0,                              /* tp_richcompare */
@@ -59,43 +93,6 @@
 	PyType_GenericNew,              /* tp_new */
 };
 
-//-------------------MODULE INITIALIZATION--------------------------------
-int BBox_Init( PyObject *module )
-{
-	if( module == NULL )
-		return -1;
-
-	if( PyType_Ready( &BBox_Type ) < 0 )
-		return -1;
-
-	Py_INCREF( &BBox_Type );
-	PyModule_AddObject(module, "BBox", (PyObject *)&BBox_Type);
-	return 0;
-}
-
-//------------------------INSTANCE METHODS ----------------------------------
-
-int BBox___init__(BPy_BBox *self, PyObject *args, PyObject *kwds)
-{
-	if(!( PyArg_ParseTuple(args, "") ))
-		return -1;
-	self->bb = new BBox< Vec3r>();
-	return 0;
-}
-
-void BBox___dealloc__(BPy_BBox* self)
-{
-	delete self->bb;
-    Py_TYPE(self)->tp_free((PyObject*)self);
-}
-
-
-PyObject * BBox___repr__(BPy_BBox* self)
-{
-    return PyUnicode_FromFormat("BBox - address: %p", self->bb );
-}
-
-
 ///////////////////////////////////////////////////////////////////////////////////////////
 
 #ifdef __cplusplus

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp	2010-04-17 22:43:18 UTC (rev 28247)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp	2010-04-17 23:47:47 UTC (rev 28248)
@@ -9,63 +9,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////////
 
-/*---------------  Python API function prototypes for BinaryPredicate0D instance  -----------*/
-static int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds);
-static void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D *self);
-static PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D *self);
-
-static PyObject * BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *args);
-static PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds);
-
-/*----------------------BinaryPredicate0D instance definitions ----------------------------*/
-static PyMethodDef BPy_BinaryPredicate0D_methods[] = {
-	{"getName", ( PyCFunction ) BinaryPredicate0D_getName, METH_NOARGS, "() Returns the string of the name of the binary predicate."},
-	{NULL, NULL, 0, NULL}
-};
-
-/*-----------------------BPy_BinaryPredicate0D type definition ------------------------------*/
-
-PyTypeObject BinaryPredicate0D_Type = {
-	PyVarObject_HEAD_INIT(NULL, 0)
-	"BinaryPredicate0D",            /* tp_name */
-	sizeof(BPy_BinaryPredicate0D),  /* tp_basicsize */
-	0,                              /* tp_itemsize */
-	(destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */
-	0,                              /* tp_print */
-	0,                              /* tp_getattr */
-	0,                              /* tp_setattr */
-	0,                              /* tp_reserved */
-	(reprfunc)BinaryPredicate0D___repr__, /* tp_repr */
-	0,                              /* tp_as_number */
-	0,                              /* tp_as_sequence */
-	0,                              /* tp_as_mapping */
-	0,                              /* tp_hash  */
-	(ternaryfunc)BinaryPredicate0D___call__, /* tp_call */
-	0,                              /* tp_str */
-	0,                              /* tp_getattro */
-	0,                              /* tp_setattro */
-	0,                              /* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
-	"BinaryPredicate0D objects",    /* tp_doc */
-	0,                              /* tp_traverse */
-	0,                              /* tp_clear */
-	0,                              /* tp_richcompare */
-	0,                              /* tp_weaklistoffset */
-	0,                              /* tp_iter */
-	0,                              /* tp_iternext */
-	BPy_BinaryPredicate0D_methods,  /* tp_methods */
-	0,                              /* tp_members */
-	0,                              /* tp_getset */
-	0,                              /* tp_base */
-	0,                              /* tp_dict */
-	0,                              /* tp_descr_get */
-	0,                              /* tp_descr_set */
-	0,                              /* tp_dictoffset */
-	(initproc)BinaryPredicate0D___init__, /* tp_init */
-	0,                              /* tp_alloc */
-	PyType_GenericNew,              /* tp_new */
-};
-
 //-------------------MODULE INITIALIZATION--------------------------------
 int BinaryPredicate0D_Init( PyObject *module )
 {
@@ -82,7 +25,30 @@
 
 //------------------------INSTANCE METHODS ----------------------------------
 
-int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds)
+static char BinaryPredicate0D___doc__[] =
+"Base class for binary predicates working on :class:`Interface0D`\n"
+"objects.  A BinaryPredicate0D is typically an ordering relation\n"
+"between two Interface0D objects.  The predicate evaluates a relation\n"
+"between the two Interface0D instances and returns a boolean value (true\n"
+"or false).  It is used by invoking the __call__() method.\n"
+"\n"
+".. method:: __init__()\n"
+"\n"
+"   Default constructor.\n"
+"\n"
+".. method:: __call__(inter1, inter2)\n"
+"\n"
+"   Must be overload by inherited classes.  It evaluates a relation\n"
+"   between two Interface0D objects.\n"
+"\n"
+"   :arg inter1: The first Interface0D object.\n"
+"   :type inter1: :class:`Interface0D`\n"
+"   :arg inter2: The second Interface0D object.\n"
+"   :type inter2: :class:`Interface0D`\n"
+"   :return: True or false.\n"
+"   :rtype: bool\n";
+
+static int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds)
 {
     if ( !PyArg_ParseTuple(args, "") )
         return -1;
@@ -92,7 +58,7 @@
 	return 0;
 }
 
-void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D* self)
+static void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D* self)
 {
 	if (self->bp0D)
 		delete self->bp0D;
@@ -100,18 +66,25 @@
 }
 
 
-PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D* self)
+static PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D* self)
 {
     return PyUnicode_FromFormat("type: %s - address: %p", self->bp0D->getName().c_str(), self->bp0D );
 }
 
+static char BinaryPredicate0D_getName___doc__[] =
+".. method:: getName()\n"
+"\n"
+"   Returns the name of the binary 0D predicate.\n"
+"\n"
+"   :return: The name of the binary 0D predicate.\n"
+"   :rtype: string\n";
 
-PyObject * BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *args)
+static PyObject * BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *args)
 {
 	return PyUnicode_FromFormat( self->bp0D->getName().c_str() );
 }
 
-PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds)
+static PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds)
 {
 	BPy_Interface0D *obj1, *obj2;
 
@@ -137,7 +110,55 @@
 
 }
 
+/*----------------------BinaryPredicate0D instance definitions ----------------------------*/
+static PyMethodDef BPy_BinaryPredicate0D_methods[] = {
+	{"getName", ( PyCFunction ) BinaryPredicate0D_getName, METH_NOARGS, BinaryPredicate0D_getName___doc__},
+	{NULL, NULL, 0, NULL}
+};
 
+/*-----------------------BPy_BinaryPredicate0D type definition ------------------------------*/
+
+PyTypeObject BinaryPredicate0D_Type = {
+	PyVarObject_HEAD_INIT(NULL, 0)
+	"BinaryPredicate0D",            /* tp_name */
+	sizeof(BPy_BinaryPredicate0D),  /* tp_basicsize */
+	0,                              /* tp_itemsize */
+	(destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */
+	0,                              /* tp_print */
+	0,                              /* tp_getattr */
+	0,                              /* tp_setattr */
+	0,                              /* tp_reserved */
+	(reprfunc)BinaryPredicate0D___repr__, /* tp_repr */
+	0,                              /* tp_as_number */
+	0,                              /* tp_as_sequence */
+	0,                              /* tp_as_mapping */
+	0,                              /* tp_hash  */

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list