[Bf-blender-cvs] [f87ca5f] master: Fix for missing Freestyle sections in the Blender Python API documentation.
Tamito Kajiyama
noreply at git.blender.org
Thu Sep 18 08:48:42 CEST 2014
Commit: f87ca5f1c314f67353b6111d3647aef159dc07c6
Author: Tamito Kajiyama
Date: Thu Sep 18 15:44:53 2014 +0900
Branches: master
https://developer.blender.org/rBf87ca5f1c314f67353b6111d3647aef159dc07c6
Fix for missing Freestyle sections in the Blender Python API documentation.
Freestyle sections of the API docs were empty due to Freestyle module reorganization
in commit rB6498b96ce7081db039354228213d72e8c70bd3aa.
Module __all__ property was added to submodules so as to properly exclude irrelevant
documentation elements such as mathutils.Vector.
===================================================================
M doc/python_api/sphinx_doc_gen.py
M release/scripts/freestyle/modules/freestyle/__init__.py
M release/scripts/freestyle/modules/freestyle/chainingiterators.py
M release/scripts/freestyle/modules/freestyle/functions.py
M release/scripts/freestyle/modules/freestyle/predicates.py
M release/scripts/freestyle/modules/freestyle/shaders.py
M release/scripts/freestyle/modules/freestyle/types.py
M release/scripts/freestyle/modules/freestyle/utils.py
M source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
===================================================================
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 9ec8f9a..226b1ec 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -274,6 +274,12 @@ else:
"mathutils.kdtree",
"mathutils.noise",
"freestyle",
+ "freestyle.chainingiterators",
+ "freestyle.functions",
+ "freestyle.predicates",
+ "freestyle.shaders",
+ "freestyle.types",
+ "freestyle.utils",
]
# ------
@@ -316,7 +322,13 @@ try:
__import__("freestyle")
except ImportError:
BPY_LOGGER.debug("Warning: Built without 'freestyle' module, docs incomplete...")
- EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle"]
+ EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle",
+ "freestyle.chainingiterators",
+ "freestyle.functions",
+ "freestyle.predicates",
+ "freestyle.shaders",
+ "freestyle.types",
+ "freestyle.utils"]
# examples
EXAMPLES_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "examples"))
@@ -1780,8 +1792,14 @@ def write_rst_importable_modules(basepath):
"mathutils.geometry" : "Geometry Utilities",
"mathutils.kdtree" : "KDTree Utilities",
"mathutils.noise" : "Noise Utilities",
- "freestyle" : "Freestyle Data Types & Operators",
- }
+ "freestyle" : "Freestyle Module",
+ "freestyle.types" : "Freestyle Types",
+ "freestyle.predicates" : "Freestyle Predicates",
+ "freestyle.functions" : "Freestyle Functions",
+ "freestyle.chainingiterators" : "Freestyle Chaining Iterators",
+ "freestyle.shaders" : "Freestyle Shaders",
+ "freestyle.utils" : "Freestyle Utilities",
+ }
for mod_name, mod_descr in importable_modules.items():
if mod_name not in EXCLUDE_MODULES:
module = __import__(mod_name,
diff --git a/release/scripts/freestyle/modules/freestyle/__init__.py b/release/scripts/freestyle/modules/freestyle/__init__.py
index 5874488..d2795f6 100644
--- a/release/scripts/freestyle/modules/freestyle/__init__.py
+++ b/release/scripts/freestyle/modules/freestyle/__init__.py
@@ -17,8 +17,21 @@
# ##### END GPL LICENSE BLOCK #####
"""
-Top-level module containing all Freestyle stylization constructs
+This module provides data types of view map components (0D and 1D
+elements), base classes for defining line stylization rules
+(predicates, functions, chaining iterators, and stroke shaders), as
+well as helper functions for style module writing.
+
+Submodules:
+
+* :mod:`freestyle.types`
+* :mod:`freestyle.predicates`
+* :mod:`freestyle.functions`
+* :mod:`freestyle.chainingiterators`
+* :mod:`freestyle.shaders`
+* :mod:`freestyle.utils`
"""
+
# module members
from . import chainingiterators, functions, predicates, shaders, types, utils
diff --git a/release/scripts/freestyle/modules/freestyle/chainingiterators.py b/release/scripts/freestyle/modules/freestyle/chainingiterators.py
index 8d144bf..90523f9 100644
--- a/release/scripts/freestyle/modules/freestyle/chainingiterators.py
+++ b/release/scripts/freestyle/modules/freestyle/chainingiterators.py
@@ -17,10 +17,10 @@
# ##### END GPL LICENSE BLOCK #####
"""
-Chaining iterators used for the chaining operation to construct long
-strokes by concatenating feature edges according to selected chaining
-rules. Also intended to be a collection of examples for defining
-chaining iterators in Python
+This module contains chaining iterators used for the chaining
+operation to construct long strokes by concatenating feature edges
+according to selected chaining rules. The module is also intended to
+be a collection of examples for defining chaining iterators in Python.
"""
__all__ = (
diff --git a/release/scripts/freestyle/modules/freestyle/functions.py b/release/scripts/freestyle/modules/freestyle/functions.py
index 674c1f0..8ad7e74 100644
--- a/release/scripts/freestyle/modules/freestyle/functions.py
+++ b/release/scripts/freestyle/modules/freestyle/functions.py
@@ -17,11 +17,99 @@
# ##### END GPL LICENSE BLOCK #####
"""
-Functions operating on vertices (0D elements) and polylines (1D
-elements). Also intended to be a collection of examples for predicate
-definition in Python.
+This module contains functions operating on vertices (0D elements) and
+polylines (1D elements). The module is also intended to be a
+collection of examples for function definition in Python.
+
+User-defined functions inherit one of the following base classes,
+depending on the object type (0D or 1D) to operate on and the return
+value type:
+
+- :class:`freestyle.types.UnaryFunction0DDouble`
+- :class:`freestyle.types.UnaryFunction0DEdgeNature`
+- :class:`freestyle.types.UnaryFunction0DFloat`
+- :class:`freestyle.types.UnaryFunction0DId`
+- :class:`freestyle.types.UnaryFunction0DMaterial`
+- :class:`freestyle.types.UnaryFunction0DUnsigned`
+- :class:`freestyle.types.UnaryFunction0DVec2f`
+- :class:`freestyle.types.UnaryFunction0DVec3f`
+- :class:`freestyle.types.UnaryFunction0DVectorViewShape`
+- :class:`freestyle.types.UnaryFunction0DViewShape`
+- :class:`freestyle.types.UnaryFunction1DDouble`
+- :class:`freestyle.types.UnaryFunction1DEdgeNature`
+- :class:`freestyle.types.UnaryFunction1DFloat`
+- :class:`freestyle.types.UnaryFunction1DUnsigned`
+- :class:`freestyle.types.UnaryFunction1DVec2f`
+- :class:`freestyle.types.UnaryFunction1DVec3f`
+- :class:`freestyle.types.UnaryFunction1DVectorViewShape`
+- :class:`freestyle.types.UnaryFunction1DVoid`
"""
+__all__ = (
+ "ChainingTimeStampF1D",
+ "Curvature2DAngleF0D",
+ "Curvature2DAngleF1D",
+ "CurveMaterialF0D",
+ "CurveNatureF0D",
+ "CurveNatureF1D",
+ "DensityF0D",
+ "DensityF1D",
+ "GetCompleteViewMapDensityF1D",
+ "GetCurvilinearAbscissaF0D",
+ "GetDirectionalViewMapDensityF1D",
+ "GetOccludeeF0D",
+ "GetOccludeeF1D",
+ "GetOccludersF0D",
+ "GetOccludersF1D",
+ "GetParameterF0D",
+ "GetProjectedXF0D",
+ "GetProjectedXF1D",
+ "GetProjectedYF0D",
+ "GetProjectedYF1D",
+ "GetProjectedZF0D",
+ "GetProjectedZF1D",
+ "GetShapeF0D",
+ "GetShapeF1D",
+ "GetSteerableViewMapDensityF1D",
+ "GetViewMapGradientNormF0D",
+ "GetViewMapGradientNormF1D",
+ "GetXF0D",
+ "GetXF1D",
+ "GetYF0D",
+ "GetYF1D",
+ "GetZF0D",
+ "GetZF1D",
+ "IncrementChainingTimeStampF1D",
+ "LocalAverageDepthF0D",
+ "LocalAverageDepthF1D",
+ "MaterialF0D",
+ "Normal2DF0D",
+ "Normal2DF1D",
+ "Orientation2DF1D",
+ "Orientation3DF1D",
+ "QuantitativeInvisibilityF0D",
+ "QuantitativeInvisibilityF1D",
+ "ReadCompleteViewMapPixelF0D",
+ "ReadMapPixelF0D",
+ "ReadSteerableViewMapPixelF0D",
+ "ShapeIdF0D",
+ "TimeStampF1D",
+ "VertexOrientation2DF0D",
+ "VertexOrientation3DF0D",
+ "ZDiscontinuityF0D",
+ "ZDiscontinuityF1D",
+ "pyCurvilinearLengthF0D",
+ "pyDensityAnisotropyF0D",
+ "pyDensityAnisotropyF1D",
+ "pyGetInverseProjectedZF1D",
+ "pyGetSquareInverseProjectedZF1D",
+ "pyInverseCurvature2DAngleF0D",
+ "pyViewMapGradientNormF0D",
+ "pyViewMapGradientNormF1D",
+ "pyViewMapGradientVectorF0D",
+ )
+
+
# module members
from _freestyle import (
ChainingTimeStampF1D,
diff --git a/release/scripts/freestyle/modules/freestyle/predicates.py b/release/scripts/freestyle/modules/freestyle/predicates.py
index 344b89d..68ec9e0 100644
--- a/release/scripts/freestyle/modules/freestyle/predicates.py
+++ b/release/scripts/freestyle/modules/freestyle/predicates.py
@@ -17,11 +17,84 @@
# ##### END GPL LICENSE BLOCK #####
"""
-Predicates operating on vertices (0D elements) and polylines (1D
-elements). Also intended to be a collection of examples for predicate
-definition in Python
+This module contains predicates operating on vertices (0D elements)
+and polylines (1D elements). It is also intended to be a collection
+of examples for predicate definition in Python.
+
+User-defined predicates inherit one of the following base classes,
+depending on the object type (0D or 1D) to operate on and the arity
+(unary or binary):
+
+- :class:`freestyle.types.BinaryPredicate0D`
+- :class:`freestyle.types.BinaryPredicate1D`
+- :class:`freestyle.types.UnaryPredicate0D`
+- :class:`freestyle.types.UnaryPredicate1D`
"""
+__all__ = (
+ "AndBP1D",
+ "AndUP1D",
+ "ContourUP1D",
+ "DensityLowerThanUP1D",
+ "EqualToChainingTimeStampUP1D",
+ "EqualToTimeStampUP1D",
+ "ExternalContourUP1D",
+ "FalseBP1D",
+ "FalseUP0D",
+ "FalseUP1D",
+ "Length2DBP1D",
+ "NotBP1D",
+ "NotUP1D",
+ "ObjectNamesUP1D",
+ "OrBP1D",
+ "OrUP1D",
+ "QuantitativeInvisibilityRangeUP1D",
+ "QuantitativeInvisibilityUP1D",
+ "SameShapeIdBP1D",
+ "ShapeUP1D",
+ "TrueBP1D",
+ "TrueUP0D",
+ "TrueUP1D",
+ "ViewMapGradientNormBP1D",
+ "WithinImageBoundaryUP1D",
+ "pyBackTVertexUP0D",
+ "pyClosedCurveUP1D",
+ "pyDensityFunctorUP1D",
+ "pyDensityUP1D",
+ "pyDensityVariableSigmaUP1D",
+ "pyHighDensityAnisotropyUP1D",
+ "pyHighDirectionalViewMapDensityUP1D",
+ "pyHighSteerableViewMapDensityUP1D",
+ "pyHighViewMapDensityUP1D",
+ "pyHighViewMapGradientNormUP1D",
+ "pyHigherCurvature2DAngleUP0D",
+ "pyHigherLengthUP1D",
+ "pyHigherNumberOfTurnsUP1D",
+ "pyIsInOccludersListUP1D",
+ "pyIsOccludedByIdListUP1D",
+ "pyIsOccludedByItselfUP1D",
+ "pyIsOccludedByUP1D",
+ "pyLengthBP1D",
+ "pyLowDirectionalViewMapDensityUP1D",
+ "pyLowSteerableViewMapDensityUP1D",
+ "pyNFirstUP1D",
+ "pyNatureBP1D",
+ "pyNatureUP1D",
+ "pyParameterUP0D",
+ "pyParameterUP0DGoodOne",
+ "pyShapeIdListUP1D",
+ "pyShapeIdUP1D",
+ "pyShuffleBP1D",
+ "pySilhouetteFirstBP1D",
+ "pyUEqualsUP0D",
+ "pyVertexNatureUP0D",
+ "pyViewMapGradientNormBP1D",
+ "pyZBP1D",
+ "pyZDiscontinuityBP1D",
+ "pyZSmall
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list