Merged changes in the trunk up to revision 31190.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Mon, 9 Aug 2010 11:32:55 +0000 (11:32 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Mon, 9 Aug 2010 11:32:55 +0000 (11:32 +0000)
618 files changed:
release/scripts/freestyle/data/env_map/brown00.png [new file with mode: 0755]
release/scripts/freestyle/data/env_map/gray00.png [new file with mode: 0755]
release/scripts/freestyle/data/env_map/gray01.png [new file with mode: 0755]
release/scripts/freestyle/data/env_map/gray02.png [new file with mode: 0755]
release/scripts/freestyle/data/env_map/gray03.png [new file with mode: 0755]
release/scripts/freestyle/style_modules/ChainingIterators.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/Functions0D.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/Functions1D.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/PredicatesB1D.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/PredicatesU0D.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/PredicatesU1D.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/anisotropic_diffusion.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/apriori_and_causal_density.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/apriori_density.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/backbone_stretcher.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/blueprint_circles.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/blueprint_ellipses.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/blueprint_squares.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/cartoon.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/contour.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/curvature2d.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/external_contour.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/external_contour_sketchy.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/external_contour_smooth.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/extra-lines.sml [new file with mode: 0755]
release/scripts/freestyle/style_modules/freestyle_init.py [new file with mode: 0644]
release/scripts/freestyle/style_modules/haloing.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/ignore_small_occlusions.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/invisible_lines.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/japanese_bigbrush.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/logical_operators.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/long_anisotropically_dense.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/multiple_parameterization.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/nature.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/near_lines.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/occluded_by_specific_object.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/parameter_editor.py [new file with mode: 0644]
release/scripts/freestyle/style_modules/polygonalize.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/qi0.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/qi0_not_external_contour.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/qi1.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/qi2.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/sequentialsplit_sketchy.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/shaders.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/sketchy_multiple_parameterization.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/sketchy_topology_broken.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/sketchy_topology_preserved.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/split_at_highest_2d_curvatures.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/split_at_tvertices.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/stroke_texture.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/suggestive.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/thickness_fof_depth_discontinuity.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/tipremover.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/tvertex_remover.py [new file with mode: 0755]
release/scripts/freestyle/style_modules/uniformpruning_zsort.py [new file with mode: 0755]
release/scripts/ui/properties_render.py
release/scripts/ui/space_userpref.py
source/blender/CMakeLists.txt
source/blender/SConscript
source/blender/blenkernel/BKE_linestyle.h [new file with mode: 0644]
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/linestyle.c [new file with mode: 0644]
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/scene.c
source/blender/blenloader/intern/readblenentry.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/render/CMakeLists.txt
source/blender/editors/render/SConscript
source/blender/editors/render/render_intern.h
source/blender/editors/render/render_ops.c
source/blender/editors/render/render_shading.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_orientations.c
source/blender/freestyle/CMakeLists.txt [new file with mode: 0644]
source/blender/freestyle/FRS_freestyle.h [new file with mode: 0644]
source/blender/freestyle/FRS_freestyle_config.h [new file with mode: 0644]
source/blender/freestyle/SConscript [new file with mode: 0644]
source/blender/freestyle/intern/application/AppCanvas.cpp [new file with mode: 0755]
source/blender/freestyle/intern/application/AppCanvas.h [new file with mode: 0755]
source/blender/freestyle/intern/application/AppConfig.cpp [new file with mode: 0755]
source/blender/freestyle/intern/application/AppConfig.h [new file with mode: 0755]
source/blender/freestyle/intern/application/AppView.cpp [new file with mode: 0644]
source/blender/freestyle/intern/application/AppView.h [new file with mode: 0644]
source/blender/freestyle/intern/application/Controller.cpp [new file with mode: 0755]
source/blender/freestyle/intern/application/Controller.h [new file with mode: 0755]
source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h [new file with mode: 0644]
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp [new file with mode: 0644]
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h [new file with mode: 0644]
source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h [new file with mode: 0644]
source/blender/freestyle/intern/blender_interface/BlenderTextureManager.cpp [new file with mode: 0644]
source/blender/freestyle/intern/blender_interface/BlenderTextureManager.h [new file with mode: 0644]
source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp [new file with mode: 0644]
source/blender/freestyle/intern/geometry/BBox.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/Bezier.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/Bezier.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/FastGrid.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/FastGrid.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/FitCurve.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/FitCurve.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/Geom.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/GeomCleaner.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/GeomCleaner.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/GeomUtils.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/GeomUtils.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/Grid.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/Grid.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/HashGrid.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/HashGrid.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/Noise.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/Noise.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/Polygon.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/SweepLine.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/VecMat.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/matrix_util.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/matrix_util.h [new file with mode: 0755]
source/blender/freestyle/intern/geometry/normal_cycle.cpp [new file with mode: 0755]
source/blender/freestyle/intern/geometry/normal_cycle.h [new file with mode: 0755]
source/blender/freestyle/intern/image/GaussianFilter.cpp [new file with mode: 0755]
source/blender/freestyle/intern/image/GaussianFilter.h [new file with mode: 0755]
source/blender/freestyle/intern/image/Image.h [new file with mode: 0755]
source/blender/freestyle/intern/image/ImagePyramid.cpp [new file with mode: 0755]
source/blender/freestyle/intern/image/ImagePyramid.h [new file with mode: 0755]
source/blender/freestyle/intern/python/BPy_BBox.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_BBox.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_ContextFunctions.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Convert.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Convert.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Freestyle.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Freestyle.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_FrsMaterial.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_FrsNoise.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_FrsNoise.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Id.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Id.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_IntegrationType.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_IntegrationType.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Interface0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Interface0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Interface1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Interface1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Iterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Iterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_MediumType.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_MediumType.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Nature.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Nature.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Operators.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_Operators.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_SShape.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_SShape.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_StrokeAttribute.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_StrokeShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_StrokeShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_ViewMap.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_ViewMap.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_ViewShape.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BPy_ViewShape.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Director.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Director.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_SmoothingShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp [new file with mode: 0644]
source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h [new file with mode: 0644]
source/blender/freestyle/intern/scene_graph/DrawingStyle.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/FrsMaterial.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/LineRep.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/LineRep.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/Node.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeCamera.cpp [new file with mode: 0644]
source/blender/freestyle/intern/scene_graph/NodeCamera.h [new file with mode: 0644]
source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeGroup.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeGroup.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeLight.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeLight.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeShape.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeShape.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeTransform.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/NodeTransform.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/OrientedLineRep.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/OrientedLineRep.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/Rep.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/Rep.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/SceneVisitor.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/SceneVisitor.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/TriangleRep.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/TriangleRep.h [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/VertexRep.cpp [new file with mode: 0755]
source/blender/freestyle/intern/scene_graph/VertexRep.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/AdvancedFunctions0D.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/AdvancedFunctions0D.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/AdvancedFunctions1D.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/AdvancedPredicates1D.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/BasicStrokeShaders.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Canvas.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Canvas.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Chain.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Chain.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/ChainingIterators.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/ChainingIterators.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/ContextFunctions.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/ContextFunctions.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Curve.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Curve.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/CurveIterators.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Modifiers.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Module.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Operators.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Operators.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/PSStrokeRenderer.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Predicates0D.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Predicates1D.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/QInformationMap.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Stroke.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/Stroke.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeAdvancedIterators.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeIO.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeIO.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeIterators.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeLayer.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeLayer.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeRenderer.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeRenderer.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeRep.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeRep.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeShader.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeTesselator.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StrokeTesselator.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/StyleModule.h [new file with mode: 0755]
source/blender/freestyle/intern/stroke/TextStrokeRenderer.cpp [new file with mode: 0755]
source/blender/freestyle/intern/stroke/TextStrokeRenderer.h [new file with mode: 0755]
source/blender/freestyle/intern/system/BaseIterator.h [new file with mode: 0755]
source/blender/freestyle/intern/system/BaseObject.cpp [new file with mode: 0755]
source/blender/freestyle/intern/system/BaseObject.h [new file with mode: 0755]
source/blender/freestyle/intern/system/Cast.h [new file with mode: 0755]
source/blender/freestyle/intern/system/Exception.cpp [new file with mode: 0755]
source/blender/freestyle/intern/system/Exception.h [new file with mode: 0755]
source/blender/freestyle/intern/system/FreestyleConfig.h [new file with mode: 0755]
source/blender/freestyle/intern/system/Id.h [new file with mode: 0755]
source/blender/freestyle/intern/system/Interpreter.h [new file with mode: 0755]
source/blender/freestyle/intern/system/Iterator.cpp [new file with mode: 0644]
source/blender/freestyle/intern/system/Iterator.h [new file with mode: 0644]
source/blender/freestyle/intern/system/Precision.h [new file with mode: 0755]
source/blender/freestyle/intern/system/ProgressBar.h [new file with mode: 0755]
source/blender/freestyle/intern/system/PseudoNoise.cpp [new file with mode: 0755]
source/blender/freestyle/intern/system/PseudoNoise.h [new file with mode: 0755]
source/blender/freestyle/intern/system/PythonInterpreter.cpp [new file with mode: 0755]
source/blender/freestyle/intern/system/PythonInterpreter.h [new file with mode: 0755]
source/blender/freestyle/intern/system/RandGen.cpp [new file with mode: 0755]
source/blender/freestyle/intern/system/RandGen.h [new file with mode: 0755]
source/blender/freestyle/intern/system/StringUtils.cpp [new file with mode: 0755]
source/blender/freestyle/intern/system/StringUtils.h [new file with mode: 0755]
source/blender/freestyle/intern/system/TimeStamp.cpp [new file with mode: 0755]
source/blender/freestyle/intern/system/TimeStamp.h [new file with mode: 0755]
source/blender/freestyle/intern/system/TimeUtils.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/FEdgeXDetector.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/Functions0D.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/Functions0D.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/Functions1D.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/Functions1D.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/Interface0D.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/Interface1D.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/Silhouette.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/Silhouette.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/SteerableViewMap.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/SteerableViewMap.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMap.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMap.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMapBuilder.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMapIO.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMapIO.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMapIterators.h [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp [new file with mode: 0755]
source/blender/freestyle/intern/view_map/ViewMapTesselator.h [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/Curvature.cpp [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/Curvature.h [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/Nature.h [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WEdge.cpp [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WEdge.h [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WFillGrid.cpp [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WFillGrid.h [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WSFillGrid.h [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WXEdge.cpp [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WXEdge.h [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.h [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp [new file with mode: 0755]
source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h [new file with mode: 0755]
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_freestyle_types.h [new file with mode: 0644]
source/blender/makesdna/DNA_linestyle_types.h [new file with mode: 0644]
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_linestyle.c [new file with mode: 0644]
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/python/CMakeLists.txt
source/blender/python/SConscript
source/blender/python/doc/sphinx_doc_gen.py
source/blender/python/intern/bpy.c
source/blender/render/CMakeLists.txt
source/blender/render/SConscript
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/creator/CMakeLists.txt
source/creator/SConscript
source/creator/creator.c

diff --git a/release/scripts/freestyle/data/env_map/brown00.png b/release/scripts/freestyle/data/env_map/brown00.png
new file mode 100755 (executable)
index 0000000..855f06f
Binary files /dev/null and b/release/scripts/freestyle/data/env_map/brown00.png differ
diff --git a/release/scripts/freestyle/data/env_map/gray00.png b/release/scripts/freestyle/data/env_map/gray00.png
new file mode 100755 (executable)
index 0000000..7c9b1a8
Binary files /dev/null and b/release/scripts/freestyle/data/env_map/gray00.png differ
diff --git a/release/scripts/freestyle/data/env_map/gray01.png b/release/scripts/freestyle/data/env_map/gray01.png
new file mode 100755 (executable)
index 0000000..0654290
Binary files /dev/null and b/release/scripts/freestyle/data/env_map/gray01.png differ
diff --git a/release/scripts/freestyle/data/env_map/gray02.png b/release/scripts/freestyle/data/env_map/gray02.png
new file mode 100755 (executable)
index 0000000..0208f49
Binary files /dev/null and b/release/scripts/freestyle/data/env_map/gray02.png differ
diff --git a/release/scripts/freestyle/data/env_map/gray03.png b/release/scripts/freestyle/data/env_map/gray03.png
new file mode 100755 (executable)
index 0000000..aab9b95
Binary files /dev/null and b/release/scripts/freestyle/data/env_map/gray03.png differ
diff --git a/release/scripts/freestyle/style_modules/ChainingIterators.py b/release/scripts/freestyle/style_modules/ChainingIterators.py
new file mode 100755 (executable)
index 0000000..f2d953d
--- /dev/null
@@ -0,0 +1,731 @@
+#
+#  Filename : ChainingIterators.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Chaining Iterators to be used with chaining operators
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+
+## the natural chaining iterator
+## It follows the edges of same nature following the topology of
+## objects with  preseance on silhouettes, then borders, 
+## then suggestive contours, then everything else. It doesn't chain the same ViewEdge twice
+## You can specify whether to stay in the selection or not.
+class pyChainSilhouetteIterator(ChainingIterator):
+       def __init__(self, stayInSelection=1):
+               ChainingIterator.__init__(self, stayInSelection, 1,None,1)
+       def getExactTypeName(self):
+               return "pyChainSilhouetteIterator"
+       def init(self):
+               pass
+       def traverse(self, iter):
+               winner = None
+               it = AdjacencyIterator(iter)
+               tvertex = self.getVertex()
+               if type(tvertex) is TVertex:
+                       mateVE = tvertex.mate(self.getCurrentEdge())
+                       while(it.isEnd() == 0):
+                               ve = it.getObject()
+                               if(ve.getId() == mateVE.getId() ):
+                                       winner = ve
+                                       break
+                               it.increment()
+               else:
+                       ## case of NonTVertex
+                       natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE]
+                       for i in range(len(natures)):
+                               currentNature = self.getCurrentEdge().getNature()
+                               if(natures[i] & currentNature):
+                                       count=0
+                                       while(it.isEnd() == 0):
+                                               visitNext = 0
+                                               oNature = it.getObject().getNature()
+                                               if(oNature & natures[i] != 0):
+                                                       if(natures[i] != oNature):
+                                                               for j in range(i):
+                                                                       if(natures[j] & oNature != 0):
+                                                                               visitNext = 1
+                                                                               break
+                                                               if(visitNext != 0):
+                                                                       break    
+                                                       count = count+1
+                                                       winner = it.getObject()
+                                               it.increment()
+                                       if(count != 1):
+                                               winner = None
+                                       break
+               return winner
+
+## the natural chaining iterator
+## It follows the edges of same nature on the same
+## objects with  preseance on silhouettes, then borders, 
+## then suggestive contours, then everything else. It doesn't chain the same ViewEdge twice
+## You can specify whether to stay in the selection or not.
+## You can specify whether to chain iterate over edges that were 
+## already visited or not.
+class pyChainSilhouetteGenericIterator(ChainingIterator):
+       def __init__(self, stayInSelection=1, stayInUnvisited=1):
+               ChainingIterator.__init__(self, stayInSelection, stayInUnvisited,None,1)
+       def getExactTypeName(self):
+               return "pyChainSilhouetteGenericIterator"
+       def init(self):
+               pass
+       def traverse(self, iter):
+               winner = None
+               it = AdjacencyIterator(iter)
+               tvertex = self.getVertex()
+               if type(tvertex) is TVertex:
+                       mateVE = tvertex.mate(self.getCurrentEdge())
+                       while(it.isEnd() == 0):
+                               ve = it.getObject()
+                               if(ve.getId() == mateVE.getId() ):
+                                       winner = ve
+                                       break
+                               it.increment()
+               else:
+                       ## case of NonTVertex
+                       natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE]
+                       for i in range(len(natures)):
+                               currentNature = self.getCurrentEdge().getNature()
+                               if(natures[i] & currentNature):
+                                       count=0
+                                       while(it.isEnd() == 0):
+                                               visitNext = 0
+                                               oNature = it.getObject().getNature()
+                                               ve = it.getObject()
+                                               if(ve.getId() == self.getCurrentEdge().getId()):
+                                                       it.increment()
+                                                       continue
+                                               if(oNature & natures[i] != 0):
+                                                       if(natures[i] != oNature):
+                                                               for j in range(i):
+                                                                       if(natures[j] & oNature != 0):
+                                                                               visitNext = 1
+                                                                               break
+                                                               if(visitNext != 0):
+                                                                       break    
+                                                       count = count+1
+                                                       winner = ve
+                                               it.increment()
+                                       if(count != 1):
+                                               winner = None
+                                       break
+               return winner
+                       
+class pyExternalContourChainingIterator(ChainingIterator):
+       def __init__(self):
+               ChainingIterator.__init__(self, 0, 1,None,1)
+               self._isExternalContour = ExternalContourUP1D()
+               
+       def getExactTypeName(self):
+               return "pyExternalContourIterator"
+       
+       def init(self):
+               self._nEdges = 0
+               self._isInSelection = 1
+
+       def checkViewEdge(self, ve, orientation):
+               if(orientation != 0):
+                       vertex = ve.B()
+               else:
+                       vertex = ve.A()
+               it = AdjacencyIterator(vertex,1,1)
+               while(it.isEnd() == 0):
+                       ave = it.getObject()
+                       if(self._isExternalContour(ave)):
+                               return 1
+                       it.increment()
+               print("pyExternlContourChainingIterator : didn't find next edge")
+               return 0
+       def traverse(self, iter):
+               winner = None
+               it = AdjacencyIterator(iter)
+               while(it.isEnd() == 0):
+                       ve = it.getObject()
+                       if(self._isExternalContour(ve)):
+                               if (ve.getTimeStamp() == GetTimeStampCF()):
+                                       winner = ve
+                       it.increment()
+               
+               self._nEdges = self._nEdges+1
+               if(winner == None):
+                       orient = 1
+                       it = AdjacencyIterator(iter)
+                       while(it.isEnd() == 0):
+                               ve = it.getObject()
+                               if(it.isIncoming() != 0):
+                                       orient = 0
+                               good = self.checkViewEdge(ve,orient)
+                               if(good != 0):
+                                       winner = ve
+                               it.increment()
+               return winner
+
+## the natural chaining iterator
+## with a sketchy multiple touch
+class pySketchyChainSilhouetteIterator(ChainingIterator):
+       def __init__(self, nRounds=3,stayInSelection=1):
+               ChainingIterator.__init__(self, stayInSelection, 0,None,1)
+               self._timeStamp = GetTimeStampCF()+nRounds
+               self._nRounds = nRounds
+       def getExactTypeName(self):
+               return "pySketchyChainSilhouetteIterator"
+       def init(self):
+               self._timeStamp = GetTimeStampCF()+self._nRounds
+       def traverse(self, iter):
+               winner = None
+               it = AdjacencyIterator(iter)
+               tvertex = self.getVertex()
+               if type(tvertex) is TVertex:
+                       mateVE = tvertex.mate(self.getCurrentEdge())
+                       while(it.isEnd() == 0):
+                               ve = it.getObject()
+                               if(ve.getId() == mateVE.getId() ):
+                                       winner = ve
+                                       break
+                               it.increment()
+               else:
+                       ## case of NonTVertex
+                       natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE]
+                       for i in range(len(natures)):
+                               currentNature = self.getCurrentEdge().getNature()
+                               if(natures[i] & currentNature):
+                                       count=0
+                                       while(it.isEnd() == 0):
+                                               visitNext = 0
+                                               oNature = it.getObject().getNature()
+                                               ve = it.getObject()
+                                               if(ve.getId() == self.getCurrentEdge().getId()):
+                                                       it.increment()
+                                                       continue
+                                               if(oNature & natures[i] != 0):
+                                                       if(natures[i] != oNature):
+                                                               for j in range(i):
+                                                                       if(natures[j] & oNature != 0):
+                                                                               visitNext = 1
+                                                                               break
+                                                               if(visitNext != 0):
+                                                                       break    
+                                                       count = count+1
+                                                       winner = ve
+                                               it.increment()
+                                       if(count != 1):
+                                               winner = None
+                                       break
+               if(winner == None):
+                       winner = self.getCurrentEdge()
+               if(winner.getChainingTimeStamp() == self._timeStamp):
+                       winner = None
+               return winner
+
+
+# Chaining iterator designed for sketchy style.
+# can chain several times the same ViewEdge
+# in order to produce multiple strokes per ViewEdge.
+class pySketchyChainingIterator(ChainingIterator):
+       def __init__(self, nRounds=3, stayInSelection=1):
+               ChainingIterator.__init__(self, stayInSelection, 0,None,1)
+               self._timeStamp = GetTimeStampCF()+nRounds
+               self._nRounds = nRounds
+       def getExactTypeName(self):
+               return "pySketchyChainingIterator"
+
+       def init(self):
+               self._timeStamp = GetTimeStampCF()+self._nRounds
+
+       def traverse(self, iter):
+               winner = None
+               it = AdjacencyIterator(iter)
+               while(it.isEnd() == 0):
+                       ve = it.getObject()
+                       if(ve.getId() == self.getCurrentEdge().getId()):
+                               it.increment()
+                               continue
+                       winner = ve
+                       it.increment()
+               if(winner == None):
+                       winner = self.getCurrentEdge()
+               if(winner.getChainingTimeStamp() == self._timeStamp):
+                       return None
+               return winner
+
+
+## Chaining iterator that fills small occlusions
+##     percent
+##             The max length of the occluded part 
+##             expressed in % of the total chain length
+class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
+       def __init__(self, percent):
+               ChainingIterator.__init__(self, 0, 1,None,1)
+               self._length = 0
+               self._percent = float(percent)
+       def getExactTypeName(self):
+               return "pyFillOcclusionsChainingIterator"
+       def init(self):
+               # each time we're evaluating a chain length 
+               # we try to do it once. Thus we reinit 
+               # the chain length here:
+               self._length = 0
+       def traverse(self, iter):
+               winner = None
+               winnerOrientation = 0
+               print(self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond())
+               it = AdjacencyIterator(iter)
+               tvertex = self.getVertex()
+               if type(tvertex) is TVertex:
+                       mateVE = tvertex.mate(self.getCurrentEdge())
+                       while(it.isEnd() == 0):
+                               ve = it.getObject()
+                               if(ve.getId() == mateVE.getId() ):
+                                       winner = ve
+                                       if(it.isIncoming() == 0):
+                                               winnerOrientation = 1
+                                       else:
+                                               winnerOrientation = 0
+                                       break
+                               it.increment()
+               else:
+                       ## case of NonTVertex
+                       natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE]
+                       for nat in natures:
+                               if(self.getCurrentEdge().getNature() & nat != 0):
+                                       count=0
+                                       while(it.isEnd() == 0):
+                                               ve = it.getObject()
+                                               if(ve.getNature() & nat != 0):
+                                                       count = count+1
+                                                       winner = ve
+                                                       if(it.isIncoming() == 0):
+                                                               winnerOrientation = 1
+                                                       else:
+                                                               winnerOrientation = 0
+                                               it.increment()
+                                       if(count != 1):
+                                               winner = None
+                                       break
+               if(winner != None):
+                       # check whether this edge was part of the selection
+                       if(winner.getTimeStamp() != GetTimeStampCF()):
+                               #print("---", winner.getId().getFirst(), winner.getId().getSecond())
+                               # if not, let's check whether it's short enough with
+                               # respect to the chain made without staying in the selection
+                               #------------------------------------------------------------
+                               # Did we compute the prospective chain length already ?
+                               if(self._length == 0):
+                                       #if not, let's do it
+                                       _it = pyChainSilhouetteGenericIterator(0,0)
+                                       _it.setBegin(winner)
+                                       _it.setCurrentEdge(winner)
+                                       _it.setOrientation(winnerOrientation)
+                                       _it.init()
+                                       while(_it.isEnd() == 0):
+                                               ve = _it.getObject()
+                                               #print("--------", ve.getId().getFirst(), ve.getId().getSecond())
+                                               self._length = self._length + ve.getLength2D()
+                                               _it.increment()
+                                               if(_it.isBegin() != 0):
+                                                       break;
+                                       _it.setBegin(winner)
+                                       _it.setCurrentEdge(winner)
+                                       _it.setOrientation(winnerOrientation)
+                                       if(_it.isBegin() == 0):
+                                               _it.decrement()
+                                               while ((_it.isEnd() == 0) and (_it.isBegin() == 0)):
+                                                       ve = _it.getObject()
+                                                       #print("--------", ve.getId().getFirst(), ve.getId().getSecond())
+                                                       self._length = self._length + ve.getLength2D()
+                                                       _it.decrement()
+
+                               # let's do the comparison:
+                               # nw let's compute the length of this connex non selected part:
+                               connexl = 0
+                               _cit = pyChainSilhouetteGenericIterator(0,0)
+                               _cit.setBegin(winner)
+                               _cit.setCurrentEdge(winner)
+                               _cit.setOrientation(winnerOrientation)
+                               _cit.init()
+                               while((_cit.isEnd() == 0) and (_cit.getObject().getTimeStamp() != GetTimeStampCF())):
+                                       ve = _cit.getObject()
+                                       #print("-------- --------", ve.getId().getFirst(), ve.getId().getSecond())
+                                       connexl = connexl + ve.getLength2D()
+                                       _cit.increment()
+                               if(connexl > self._percent * self._length):
+                                       winner = None
+               return winner
+
+## Chaining iterator that fills small occlusions
+##     size
+##             The max length of the occluded part 
+##             expressed in pixels
+class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
+       def __init__(self, length):
+               ChainingIterator.__init__(self, 0, 1,None,1)
+               self._length = float(length)
+       def getExactTypeName(self):
+               return "pySmallFillOcclusionsChainingIterator"
+       def init(self):
+               pass
+       def traverse(self, iter):
+               winner = None
+               winnerOrientation = 0
+               #print(self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond())
+               it = AdjacencyIterator(iter)
+               tvertex = self.getVertex()
+               if type(tvertex) is TVertex:
+                       mateVE = tvertex.mate(self.getCurrentEdge())
+                       while(it.isEnd() == 0):
+                               ve = it.getObject()
+                               if(ve.getId() == mateVE.getId() ):
+                                       winner = ve
+                                       if(it.isIncoming() == 0):
+                                               winnerOrientation = 1
+                                       else:
+                                               winnerOrientation = 0
+                                       break
+                               it.increment()
+               else:
+                       ## case of NonTVertex
+                       natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE]
+                       for nat in natures:
+                               if(self.getCurrentEdge().getNature() & nat != 0):
+                                       count=0
+                                       while(it.isEnd() == 0):
+                                               ve = it.getObject()
+                                               if(ve.getNature() & nat != 0):
+                                                       count = count+1
+                                                       winner = ve
+                                                       if(it.isIncoming() == 0):
+                                                               winnerOrientation = 1
+                                                       else:
+                                                               winnerOrientation = 0
+                                               it.increment()
+                                       if(count != 1):
+                                               winner = None
+                                       break
+               if(winner != None):
+                       # check whether this edge was part of the selection
+                       if(winner.getTimeStamp() != GetTimeStampCF()):
+                               #print("---", winner.getId().getFirst(), winner.getId().getSecond())
+                               # nw let's compute the length of this connex non selected part:
+                               connexl = 0
+                               _cit = pyChainSilhouetteGenericIterator(0,0)
+                               _cit.setBegin(winner)
+                               _cit.setCurrentEdge(winner)
+                               _cit.setOrientation(winnerOrientation)
+                               _cit.init()
+                               while((_cit.isEnd() == 0) and (_cit.getObject().getTimeStamp() != GetTimeStampCF())):
+                                       ve = _cit.getObject()
+                                       #print("-------- --------", ve.getId().getFirst(), ve.getId().getSecond())
+                                       connexl = connexl + ve.getLength2D()
+                                       _cit.increment()
+                               if(connexl > self._length):
+                                       winner = None
+               return winner
+
+
+## Chaining iterator that fills small occlusions
+##     percent
+##             The max length of the occluded part 
+##             expressed in % of the total chain length
+class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
+       def __init__(self, percent, l):
+               ChainingIterator.__init__(self, 0, 1,None,1)
+               self._length = 0
+               self._absLength = l
+               self._percent = float(percent)
+       def getExactTypeName(self):
+               return "pyFillOcclusionsChainingIterator"
+       def init(self):
+               # each time we're evaluating a chain length 
+               # we try to do it once. Thus we reinit 
+               # the chain length here:
+               self._length = 0
+       def traverse(self, iter):
+               winner = None
+               winnerOrientation = 0
+               print(self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond())
+               it = AdjacencyIterator(iter)
+               tvertex = self.getVertex()
+               if type(tvertex) is TVertex:
+                       mateVE = tvertex.mate(self.getCurrentEdge())
+                       while(it.isEnd() == 0):
+                               ve = it.getObject()
+                               if(ve.getId() == mateVE.getId() ):
+                                       winner = ve
+                                       if(it.isIncoming() == 0):
+                                               winnerOrientation = 1
+                                       else:
+                                               winnerOrientation = 0
+                                       break
+                               it.increment()
+               else:
+                       ## case of NonTVertex
+                       natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE]
+                       for nat in natures:
+                               if(self.getCurrentEdge().getNature() & nat != 0):
+                                       count=0
+                                       while(it.isEnd() == 0):
+                                               ve = it.getObject()
+                                               if(ve.getNature() & nat != 0):
+                                                       count = count+1
+                                                       winner = ve
+                                                       if(it.isIncoming() == 0):
+                                                               winnerOrientation = 1
+                                                       else:
+                                                               winnerOrientation = 0
+                                               it.increment()
+                                       if(count != 1):
+                                               winner = None
+                                       break
+               if(winner != None):
+                       # check whether this edge was part of the selection
+                       if(winner.getTimeStamp() != GetTimeStampCF()):
+                               #print("---", winner.getId().getFirst(), winner.getId().getSecond())
+                               # if not, let's check whether it's short enough with
+                               # respect to the chain made without staying in the selection
+                               #------------------------------------------------------------
+                               # Did we compute the prospective chain length already ?
+                               if(self._length == 0):
+                                       #if not, let's do it
+                                       _it = pyChainSilhouetteGenericIterator(0,0)
+                                       _it.setBegin(winner)
+                                       _it.setCurrentEdge(winner)
+                                       _it.setOrientation(winnerOrientation)
+                                       _it.init()
+                                       while(_it.isEnd() == 0):
+                                               ve = _it.getObject()
+                                               #print("--------", ve.getId().getFirst(), ve.getId().getSecond())
+                                               self._length = self._length + ve.getLength2D()
+                                               _it.increment()
+                                               if(_it.isBegin() != 0):
+                                                       break;
+                                       _it.setBegin(winner)
+                                       _it.setCurrentEdge(winner)
+                                       _it.setOrientation(winnerOrientation)
+                                       if(_it.isBegin() == 0):
+                                               _it.decrement()
+                                               while ((_it.isEnd() == 0) and (_it.isBegin() == 0)):
+                                                       ve = _it.getObject()
+                                                       #print("--------", ve.getId().getFirst(), ve.getId().getSecond())
+                                                       self._length = self._length + ve.getLength2D()
+                                                       _it.decrement()
+
+                               # let's do the comparison:
+                               # nw let's compute the length of this connex non selected part:
+                               connexl = 0
+                               _cit = pyChainSilhouetteGenericIterator(0,0)
+                               _cit.setBegin(winner)
+                               _cit.setCurrentEdge(winner)
+                               _cit.setOrientation(winnerOrientation)
+                               _cit.init()
+                               while((_cit.isEnd() == 0) and (_cit.getObject().getTimeStamp() != GetTimeStampCF())):
+                                       ve = _cit.getObject()
+                                       #print("-------- --------", ve.getId().getFirst(), ve.getId().getSecond())
+                                       connexl = connexl + ve.getLength2D()
+                                       _cit.increment()
+                               if((connexl > self._percent * self._length) or (connexl > self._absLength)):
+                                       winner = None
+               return winner
+
+## Chaining iterator that fills small occlusions without caring about the 
+## actual selection
+##     percent
+##             The max length of the occluded part 
+##             expressed in % of the total chain length
+class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
+       def __init__(self, percent, l):
+               ChainingIterator.__init__(self, 0, 1,None,1)
+               self._length = 0
+               self._absLength = l
+               self._percent = float(percent)
+       def getExactTypeName(self):
+               return "pyFillOcclusionsChainingIterator"
+       def init(self):
+               # each time we're evaluating a chain length 
+               # we try to do it once. Thus we reinit 
+               # the chain length here:
+               self._length = 0
+       def traverse(self, iter):
+               winner = None
+               winnerOrientation = 0
+               print(self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond())
+               it = AdjacencyIterator(iter)
+               tvertex = self.getVertex()
+               if type(tvertex) is TVertex:
+                       mateVE = tvertex.mate(self.getCurrentEdge())
+                       while(it.isEnd() == 0):
+                               ve = it.getObject()
+                               if(ve.getId() == mateVE.getId() ):
+                                       winner = ve
+                                       if(it.isIncoming() == 0):
+                                               winnerOrientation = 1
+                                       else:
+                                               winnerOrientation = 0
+                                       break
+                               it.increment()
+               else:
+                       ## case of NonTVertex
+                       natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE]
+                       for nat in natures:
+                               if(self.getCurrentEdge().getNature() & nat != 0):
+                                       count=0
+                                       while(it.isEnd() == 0):
+                                               ve = it.getObject()
+                                               if(ve.getNature() & nat != 0):
+                                                       count = count+1
+                                                       winner = ve
+                                                       if(it.isIncoming() == 0):
+                                                               winnerOrientation = 1
+                                                       else:
+                                                               winnerOrientation = 0
+                                               it.increment()
+                                       if(count != 1):
+                                               winner = None
+                                       break
+               if(winner != None):
+                       # check whether this edge was part of the selection
+                       if(winner.qi() != 0):
+                               #print("---", winner.getId().getFirst(), winner.getId().getSecond())
+                               # if not, let's check whether it's short enough with
+                               # respect to the chain made without staying in the selection
+                               #------------------------------------------------------------
+                               # Did we compute the prospective chain length already ?
+                               if(self._length == 0):
+                                       #if not, let's do it
+                                       _it = pyChainSilhouetteGenericIterator(0,0)
+                                       _it.setBegin(winner)
+                                       _it.setCurrentEdge(winner)
+                                       _it.setOrientation(winnerOrientation)
+                                       _it.init()
+                                       while(_it.isEnd() == 0):
+                                               ve = _it.getObject()
+                                               #print("--------", ve.getId().getFirst(), ve.getId().getSecond())
+                                               self._length = self._length + ve.getLength2D()
+                                               _it.increment()
+                                               if(_it.isBegin() != 0):
+                                                       break;
+                                       _it.setBegin(winner)
+                                       _it.setCurrentEdge(winner)
+                                       _it.setOrientation(winnerOrientation)
+                                       if(_it.isBegin() == 0):
+                                               _it.decrement()
+                                               while ((_it.isEnd() == 0) and (_it.isBegin() == 0)):
+                                                       ve = _it.getObject()
+                                                       #print("--------", ve.getId().getFirst(), ve.getId().getSecond())
+                                                       self._length = self._length + ve.getLength2D()
+                                                       _it.decrement()
+
+                               # let's do the comparison:
+                               # nw let's compute the length of this connex non selected part:
+                               connexl = 0
+                               _cit = pyChainSilhouetteGenericIterator(0,0)
+                               _cit.setBegin(winner)
+                               _cit.setCurrentEdge(winner)
+                               _cit.setOrientation(winnerOrientation)
+                               _cit.init()
+                               while((_cit.isEnd() == 0) and (_cit.getObject().qi() != 0)):
+                                       ve = _cit.getObject()
+                                       #print("-------- --------", ve.getId().getFirst(), ve.getId().getSecond())
+                                       connexl = connexl + ve.getLength2D()
+                                       _cit.increment()
+                               if((connexl > self._percent * self._length) or (connexl > self._absLength)):
+                                       winner = None
+               return winner
+
+
+## the natural chaining iterator
+## It follows the edges of same nature on the same
+## objects with  preseance on silhouettes, then borders, 
+## then suggestive contours, then everything else. It doesn't chain the same ViewEdge twice
+## You can specify whether to stay in the selection or not.
+class pyNoIdChainSilhouetteIterator(ChainingIterator):
+       def __init__(self, stayInSelection=1):
+               ChainingIterator.__init__(self, stayInSelection, 1,None,1)
+       def getExactTypeName(self):
+               return "pyChainSilhouetteIterator"
+       def init(self):
+               pass
+       def traverse(self, iter):
+               winner = None
+               it = AdjacencyIterator(iter)
+               tvertex = self.getVertex()
+               if type(tvertex) is TVertex:
+                       mateVE = tvertex.mate(self.getCurrentEdge())
+                       while(it.isEnd() == 0):
+                               ve = it.getObject()
+                               feB = self.getCurrentEdge().fedgeB()
+                               feA = ve.fedgeA()
+                               vB = feB.vertexB()
+                               vA = feA.vertexA()
+                               if vA.getId().getFirst() == vB.getId().getFirst():
+                                       winner = ve
+                                       break
+                               feA = self.getCurrentEdge().fedgeA()
+                               feB = ve.fedgeB()
+                               vB = feB.vertexB()
+                               vA = feA.vertexA()
+                               if vA.getId().getFirst() == vB.getId().getFirst():
+                                       winner = ve
+                                       break
+                               feA = self.getCurrentEdge().fedgeB()
+                               feB = ve.fedgeB()
+                               vB = feB.vertexB()
+                               vA = feA.vertexB()
+                               if vA.getId().getFirst() == vB.getId().getFirst():
+                                       winner = ve
+                                       break
+                               feA = self.getCurrentEdge().fedgeA()
+                               feB = ve.fedgeA()
+                               vB = feB.vertexA()
+                               vA = feA.vertexA()
+                               if vA.getId().getFirst() == vB.getId().getFirst():
+                                       winner = ve
+                                       break
+                               it.increment()
+               else:
+                       ## case of NonTVertex
+                       natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE]
+                       for i in range(len(natures)):
+                               currentNature = self.getCurrentEdge().getNature()
+                               if(natures[i] & currentNature):
+                                       count=0
+                                       while(it.isEnd() == 0):
+                                               visitNext = 0
+                                               oNature = it.getObject().getNature()
+                                               if(oNature & natures[i] != 0):
+                                                       if(natures[i] != oNature):
+                                                               for j in range(i):
+                                                                       if(natures[j] & oNature != 0):
+                                                                               visitNext = 1
+                                                                               break
+                                                               if(visitNext != 0):
+                                                                       break    
+                                                       count = count+1
+                                                       winner = it.getObject()
+                                               it.increment()
+                                       if(count != 1):
+                                               winner = None
+                                       break
+               return winner
+
diff --git a/release/scripts/freestyle/style_modules/Functions0D.py b/release/scripts/freestyle/style_modules/Functions0D.py
new file mode 100755 (executable)
index 0000000..2881a80
--- /dev/null
@@ -0,0 +1,81 @@
+from freestyle_init import *
+
+
+class pyInverseCurvature2DAngleF0D(UnaryFunction0DDouble):
+       def getName(self):
+               return "InverseCurvature2DAngleF0D"
+
+       def __call__(self, inter):
+               func = Curvature2DAngleF0D()
+               c = func(inter)
+               return (3.1415 - c)
+
+class pyCurvilinearLengthF0D(UnaryFunction0DDouble):
+       def getName(self):
+               return "CurvilinearLengthF0D"
+
+       def __call__(self, inter):
+               i0d = inter.getObject()
+               s = i0d.getExactTypeName()
+               if (string.find(s, "CurvePoint") == -1):
+                       print("CurvilinearLengthF0D: not implemented yet for", s)
+                       return -1
+               cp = castToCurvePoint(i0d)
+               return cp.t2d()
+
+## estimate anisotropy of density
+class pyDensityAnisotropyF0D(UnaryFunction0DDouble):
+       def __init__(self,level):
+               UnaryFunction0DDouble.__init__(self)
+               self.IsoDensity = ReadCompleteViewMapPixelF0D(level)
+               self.d0Density = ReadSteerableViewMapPixelF0D(0, level)
+               self.d1Density = ReadSteerableViewMapPixelF0D(1, level)
+               self.d2Density = ReadSteerableViewMapPixelF0D(2, level)
+               self.d3Density = ReadSteerableViewMapPixelF0D(3, level)
+       def getName(self):
+               return "pyDensityAnisotropyF0D"
+       def __call__(self, inter):
+               c_iso = self.IsoDensity(inter) 
+               c_0 = self.d0Density(inter) 
+               c_1 = self.d1Density(inter) 
+               c_2 = self.d2Density(inter) 
+               c_3 = self.d3Density(inter) 
+               cMax = max( max(c_0,c_1), max(c_2,c_3))
+               cMin = min( min(c_0,c_1), min(c_2,c_3))
+               if ( c_iso == 0 ):
+                       v = 0
+               else:
+                       v = (cMax-cMin)/c_iso
+               return (v)
+
+## Returns the gradient vector for a pixel 
+##     l
+##       the level at which one wants to compute the gradient
+class pyViewMapGradientVectorF0D(UnaryFunction0DVec2f):
+       def __init__(self, l):
+               UnaryFunction0DVec2f.__init__(self)
+               self._l = l
+               self._step = pow(2,self._l)
+       def getName(self):
+               return "pyViewMapGradientVectorF0D"
+       def __call__(self, iter):
+               p = iter.getObject().getPoint2D()
+               gx = ReadCompleteViewMapPixelCF(self._l, int(p.x()+self._step), int(p.y()))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()))
+               gy = ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()+self._step))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()))
+               return Vector([gx, gy])
+
+class pyViewMapGradientNormF0D(UnaryFunction0DDouble):
+       def __init__(self, l):
+               UnaryFunction0DDouble.__init__(self)
+               self._l = l
+               self._step = pow(2,self._l)
+       def getName(self):
+               return "pyViewMapGradientNormF0D"
+       def __call__(self, iter):
+               p = iter.getObject().getPoint2D()
+               gx = ReadCompleteViewMapPixelCF(self._l, int(p.x()+self._step), int(p.y()))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()))
+               gy = ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()+self._step))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()))
+               grad = Vector([gx, gy])
+               return grad.length
+
+
diff --git a/release/scripts/freestyle/style_modules/Functions1D.py b/release/scripts/freestyle/style_modules/Functions1D.py
new file mode 100755 (executable)
index 0000000..aaf1153
--- /dev/null
@@ -0,0 +1,45 @@
+from freestyle_init import *
+from Functions0D import *
+import string 
+
+class pyGetInverseProjectedZF1D(UnaryFunction1DDouble):
+       def getName(self):
+               return "pyGetInverseProjectedZF1D"
+
+       def __call__(self, inter):
+               func = GetProjectedZF1D()
+               z = func(inter)
+               return (1.0 - z)
+
+class pyGetSquareInverseProjectedZF1D(UnaryFunction1DDouble):
+       def getName(self):
+               return "pyGetInverseProjectedZF1D"
+
+       def __call__(self, inter):
+               func = GetProjectedZF1D()
+               z = func(inter)
+               return (1.0 - z*z)
+
+class pyDensityAnisotropyF1D(UnaryFunction1DDouble):
+       def __init__(self,level,  integrationType=IntegrationType.MEAN, sampling=2.0):
+               UnaryFunction1DDouble.__init__(self, integrationType)
+               self._func = pyDensityAnisotropyF0D(level)
+               self._integration = integrationType
+               self._sampling = sampling
+       def getName(self):
+               return "pyDensityAnisotropyF1D"
+       def __call__(self, inter):
+               v = integrate(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration)
+               return v
+
+class pyViewMapGradientNormF1D(UnaryFunction1DDouble):
+       def __init__(self,l, integrationType, sampling=2.0):
+               UnaryFunction1DDouble.__init__(self, integrationType)
+               self._func = pyViewMapGradientNormF0D(l)
+               self._integration = integrationType
+               self._sampling = sampling
+       def getName(self):
+               return "pyViewMapGradientNormF1D"
+       def __call__(self, inter):
+               v = integrate(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration)
+               return v
diff --git a/release/scripts/freestyle/style_modules/PredicatesB1D.py b/release/scripts/freestyle/style_modules/PredicatesB1D.py
new file mode 100755 (executable)
index 0000000..3b7d210
--- /dev/null
@@ -0,0 +1,70 @@
+from freestyle_init import *
+from Functions1D import *
+from random import *
+
+class pyZBP1D(BinaryPredicate1D):
+       def getName(self):
+               return "pyZBP1D"
+
+       def __call__(self, i1, i2):
+               func = GetZF1D()
+               return (func(i1) > func(i2))
+
+class pyZDiscontinuityBP1D(BinaryPredicate1D):
+       def __init__(self, iType = IntegrationType.MEAN):
+               BinaryPredicate1D.__init__(self)
+               self._GetZDiscontinuity = ZDiscontinuityF1D(iType)
+
+       def getName(self):
+               return "pyZDiscontinuityBP1D"
+
+       def __call__(self, i1, i2):
+               return (self._GetZDiscontinuity(i1) > self._GetZDiscontinuity(i2))
+
+class pyLengthBP1D(BinaryPredicate1D):
+       def getName(self):
+               return "LengthBP1D"
+
+       def __call__(self, i1, i2):
+               return (i1.getLength2D() > i2.getLength2D())
+
+class pySilhouetteFirstBP1D(BinaryPredicate1D):
+       def getName(self):
+               return "SilhouetteFirstBP1D"
+
+       def __call__(self, inter1, inter2):
+               bpred = SameShapeIdBP1D()
+               if (bpred(inter1, inter2) != 1):
+                       return 0
+               if (inter1.getNature() & Nature.SILHOUETTE):
+                       return (inter2.getNature() & Nature.SILHOUETTE)
+               return (inter1.getNature() == inter2.getNature())
+
+class pyNatureBP1D(BinaryPredicate1D):
+       def getName(self):
+               return "NatureBP1D"
+
+       def __call__(self, inter1, inter2):
+               return (inter1.getNature() & inter2.getNature())
+
+class pyViewMapGradientNormBP1D(BinaryPredicate1D):
+       def __init__(self,l, sampling=2.0):
+               BinaryPredicate1D.__init__(self)
+               self._GetGradient = pyViewMapGradientNormF1D(l, IntegrationType.MEAN)
+       def getName(self):
+               return "pyViewMapGradientNormBP1D"
+       def __call__(self, i1,i2):
+               print("compare gradient")
+               return (self._GetGradient(i1) > self._GetGradient(i2))
+
+class pyShuffleBP1D(BinaryPredicate1D):
+       def __init__(self):
+               BinaryPredicate1D.__init__(self)
+               seed(1)
+       def getName(self):
+               return "pyNearAndContourFirstBP1D"
+
+       def __call__(self, inter1, inter2):
+               r1 = uniform(0,1)
+               r2 = uniform(0,1)
+               return (r1<r2)
diff --git a/release/scripts/freestyle/style_modules/PredicatesU0D.py b/release/scripts/freestyle/style_modules/PredicatesU0D.py
new file mode 100755 (executable)
index 0000000..162254f
--- /dev/null
@@ -0,0 +1,103 @@
+from freestyle_init import *
+from Functions0D import *
+
+class pyHigherCurvature2DAngleUP0D(UnaryPredicate0D):
+       def __init__(self,a):
+               UnaryPredicate0D.__init__(self)
+               self._a = a
+                       
+       def getName(self):
+               return "HigherCurvature2DAngleUP0D"
+
+       def __call__(self, inter):
+               func = Curvature2DAngleF0D()
+               a = func(inter)
+               return ( a > self._a)
+
+class pyUEqualsUP0D(UnaryPredicate0D):
+       def __init__(self,u, w):
+               UnaryPredicate0D.__init__(self)
+               self._u = u
+               self._w = w
+                       
+       def getName(self):
+               return "UEqualsUP0D"
+
+       def __call__(self, inter):
+               func = pyCurvilinearLengthF0D()
+               u = func(inter)
+               return ( ( u > (self._u-self._w) ) and ( u < (self._u+self._w) ) )
+
+class pyVertexNatureUP0D(UnaryPredicate0D):
+       def __init__(self,nature):
+               UnaryPredicate0D.__init__(self)
+               self._nature = nature
+                       
+       def getName(self):
+               return "pyVertexNatureUP0D"
+
+       def __call__(self, inter):
+               v = inter.getObject()
+               nat = v.getNature()
+               if(nat & self._nature):
+                       return 1;
+               return 0
+
+## check whether an Interface0DIterator
+## is a TVertex and is the one that is 
+## hidden (inferred from the context)
+class pyBackTVertexUP0D(UnaryPredicate0D):
+       def __init__(self):
+               UnaryPredicate0D.__init__(self)
+               self._getQI = QuantitativeInvisibilityF0D()
+       def getName(self):
+               return "pyBackTVertexUP0D"
+       def __call__(self, iter):
+               v = iter.getObject()
+               nat = v.getNature()
+               if(nat & Nature.T_VERTEX == 0):
+                       return 0
+               next = iter
+               if(next.isEnd()):
+                       return 0
+               if(self._getQI(next) != 0):
+                       return 1
+               return 0
+
+class pyParameterUP0DGoodOne(UnaryPredicate0D):
+       def __init__(self,pmin,pmax):
+               UnaryPredicate0D.__init__(self)
+               self._m = pmin
+               self._M = pmax
+               #self.getCurvilinearAbscissa = GetCurvilinearAbscissaF0D()
+
+       def getName(self):
+               return "pyCurvilinearAbscissaHigherThanUP0D"
+
+       def __call__(self, inter):
+               #s = self.getCurvilinearAbscissa(inter)
+               u = inter.u()
+               #print(u)
+               return ((u>=self._m) and (u<=self._M))
+
+class pyParameterUP0D(UnaryPredicate0D):
+       def __init__(self,pmin,pmax):
+               UnaryPredicate0D.__init__(self)
+               self._m = pmin
+               self._M = pmax
+               #self.getCurvilinearAbscissa = GetCurvilinearAbscissaF0D()
+
+       def getName(self):
+               return "pyCurvilinearAbscissaHigherThanUP0D"
+
+       def __call__(self, inter):
+               func = Curvature2DAngleF0D()
+               c = func(inter)
+               b1 = (c>0.1)
+               #s = self.getCurvilinearAbscissa(inter)
+               u = inter.u()
+               #print(u)
+               b = ((u>=self._m) and (u<=self._M))
+               return b and b1
+
+
diff --git a/release/scripts/freestyle/style_modules/PredicatesU1D.py b/release/scripts/freestyle/style_modules/PredicatesU1D.py
new file mode 100755 (executable)
index 0000000..3529ca8
--- /dev/null
@@ -0,0 +1,381 @@
+from freestyle_init import *
+from Functions1D import *
+
+count = 0
+class pyNFirstUP1D(UnaryPredicate1D):
+       def __init__(self, n):
+               UnaryPredicate1D.__init__(self)
+               self.__n = n
+       def __call__(self, inter):
+               global count
+               count = count + 1
+               if count <= self.__n:
+                       return 1
+               return 0
+
+class pyHigherLengthUP1D(UnaryPredicate1D):
+       def __init__(self,l):
+               UnaryPredicate1D.__init__(self)
+               self._l = l
+                       
+       def getName(self):
+               return "HigherLengthUP1D"
+
+       def __call__(self, inter):
+               return (inter.getLength2D() > self._l)
+
+class pyNatureUP1D(UnaryPredicate1D):
+       def __init__(self,nature):
+               UnaryPredicate1D.__init__(self)
+               self._nature = nature
+               self._getNature = CurveNatureF1D()
+                       
+       def getName(self):
+               return "pyNatureUP1D"
+
+       def __call__(self, inter):
+               if(self._getNature(inter) & self._nature):
+                       return 1
+               return 0
+
+class pyHigherNumberOfTurnsUP1D(UnaryPredicate1D):
+       def __init__(self,n,a):
+               UnaryPredicate1D.__init__(self)
+               self._n = n
+               self._a = a
+
+       def getName(self):
+               return "HigherNumberOfTurnsUP1D"
+
+       def __call__(self, inter):
+               count = 0
+               func = Curvature2DAngleF0D()
+               it = inter.verticesBegin()
+               while(it.isEnd() == 0):
+                       if(func(it) > self._a):
+                               count = count+1
+                       if(count > self._n):
+                               return 1
+                       it.increment()
+               return 0
+
+class pyDensityUP1D(UnaryPredicate1D):
+       def __init__(self,wsize,threshold, integration = IntegrationType.MEAN, sampling=2.0):
+               UnaryPredicate1D.__init__(self)
+               self._wsize = wsize
+               self._threshold = threshold
+               self._integration = integration
+               self._func = DensityF1D(self._wsize, self._integration, sampling)
+                       
+       def getName(self):
+               return "pyDensityUP1D"
+
+       def __call__(self, inter):
+               if(self._func(inter) < self._threshold):
+                       return 1
+               return 0
+
+class pyLowSteerableViewMapDensityUP1D(UnaryPredicate1D):
+       def __init__(self,threshold, level,integration = IntegrationType.MEAN):
+               UnaryPredicate1D.__init__(self)
+               self._threshold = threshold
+               self._level = level
+               self._integration = integration
+                       
+       def getName(self):
+               return "pyLowSteerableViewMapDensityUP1D"
+
+       def __call__(self, inter):
+               func = GetSteerableViewMapDensityF1D(self._level, self._integration)
+               v = func(inter)
+               print(v)
+               if(v < self._threshold):
+                       return 1
+               return 0
+
+class pyLowDirectionalViewMapDensityUP1D(UnaryPredicate1D):
+       def __init__(self,threshold, orientation, level,integration = IntegrationType.MEAN):
+               UnaryPredicate1D.__init__(self)
+               self._threshold = threshold
+               self._orientation = orientation
+               self._level = level
+               self._integration = integration
+                       
+       def getName(self):
+               return "pyLowDirectionalViewMapDensityUP1D"
+
+       def __call__(self, inter):
+               func = GetDirectionalViewMapDensityF1D(self._orientation, self._level, self._integration)
+               v = func(inter)
+               #print(v)
+               if(v < self._threshold):
+                       return 1
+               return 0
+
+class pyHighSteerableViewMapDensityUP1D(UnaryPredicate1D):
+       def __init__(self,threshold, level,integration = IntegrationType.MEAN):
+               UnaryPredicate1D.__init__(self)
+               self._threshold = threshold
+               self._level = level
+               self._integration = integration
+               self._func = GetSteerableViewMapDensityF1D(self._level, self._integration)      
+       def getName(self):
+               return "pyHighSteerableViewMapDensityUP1D"
+
+       def __call__(self, inter):
+               
+               v = self._func(inter)
+               if(v > self._threshold):
+                       return 1
+               return 0
+
+class pyHighDirectionalViewMapDensityUP1D(UnaryPredicate1D):
+       def __init__(self,threshold, orientation, level,integration = IntegrationType.MEAN, sampling=2.0):
+               UnaryPredicate1D.__init__(self)
+               self._threshold = threshold
+               self._orientation = orientation
+               self._level = level
+               self._integration = integration
+               self._sampling = sampling               
+       def getName(self):
+               return "pyLowDirectionalViewMapDensityUP1D"
+
+       def __call__(self, inter):
+               func = GetDirectionalViewMapDensityF1D(self._orientation, self._level, self._integration, self._sampling)
+               v = func(inter)
+               if(v > self._threshold):
+                       return 1
+               return 0
+
+class pyHighViewMapDensityUP1D(UnaryPredicate1D):
+       def __init__(self,threshold, level,integration = IntegrationType.MEAN, sampling=2.0):
+               UnaryPredicate1D.__init__(self)
+               self._threshold = threshold
+               self._level = level
+               self._integration = integration
+               self._sampling = sampling
+               self._func = GetCompleteViewMapDensityF1D(self._level, self._integration, self._sampling) # 2.0 is the smpling
+                       
+       def getName(self):
+               return "pyHighViewMapDensityUP1D"
+
+       def __call__(self, inter):
+               #print("toto")
+               #print(func.getName())
+               #print(inter.getExactTypeName())
+               v= self._func(inter)
+               if(v > self._threshold):
+                       return 1
+               return 0
+
+class pyDensityFunctorUP1D(UnaryPredicate1D):
+       def __init__(self,wsize,threshold, functor, funcmin=0.0, funcmax=1.0, integration = IntegrationType.MEAN):
+               UnaryPredicate1D.__init__(self)
+               self._wsize = wsize
+               self._threshold = float(threshold)
+               self._functor = functor
+               self._funcmin = float(funcmin)
+               self._funcmax = float(funcmax)
+               self._integration = integration
+                       
+       def getName(self):
+               return "pyDensityFunctorUP1D"
+
+       def __call__(self, inter):
+               func = DensityF1D(self._wsize, self._integration)
+               res = self._functor(inter)
+               k = (res-self._funcmin)/(self._funcmax-self._funcmin)
+               if(func(inter) < self._threshold*k):
+                       return 1
+               return 0
+
+class pyZSmallerUP1D(UnaryPredicate1D):
+       def __init__(self,z, integration=IntegrationType.MEAN):
+               UnaryPredicate1D.__init__(self)
+               self._z = z
+               self._integration = integration
+       def getName(self):
+               return "pyZSmallerUP1D"
+
+       def __call__(self, inter):
+               func = GetProjectedZF1D(self._integration)
+               if(func(inter) < self._z):
+                       return 1
+               return 0
+
+class pyIsOccludedByUP1D(UnaryPredicate1D):
+       def __init__(self,id):
+               UnaryPredicate1D.__init__(self)
+               self._id = id
+       def getName(self):
+               return "pyIsOccludedByUP1D"
+       def __call__(self, inter):
+               func = GetShapeF1D()
+               shapes = func(inter)
+               for s in shapes:
+                       if(s.getId() == self._id):
+                               return 0
+               it = inter.verticesBegin()
+               itlast = inter.verticesEnd()
+               itlast.decrement()
+               v =  it.getObject()
+               vlast = itlast.getObject()
+               tvertex = v.viewvertex()
+               if type(tvertex) is TVertex:
+                       print("TVertex: [ ", tvertex.getId().getFirst(), ",",  tvertex.getId().getSecond()," ]")
+                       eit = tvertex.edgesBegin()
+                       while(eit.isEnd() == 0):
+                               ve, incoming = eit.getObject()
+                               if(ve.getId() == self._id):
+                                       return 1
+                               print("-------", ve.getId().getFirst(), "-", ve.getId().getSecond())
+                               eit.increment()
+               tvertex = vlast.viewvertex()
+               if type(tvertex) is TVertex:
+                       print("TVertex: [ ", tvertex.getId().getFirst(), ",",  tvertex.getId().getSecond()," ]")
+                       eit = tvertex.edgesBegin()
+                       while(eit.isEnd() == 0):
+                               ve, incoming = eit.getObject()
+                               if(ve.getId() == self._id):
+                                       return 1
+                               print("-------", ve.getId().getFirst(), "-", ve.getId().getSecond())
+                               eit.increment()
+               return 0
+
+class pyIsInOccludersListUP1D(UnaryPredicate1D):
+       def __init__(self,id):
+               UnaryPredicate1D.__init__(self)
+               self._id = id
+       def getName(self):
+               return "pyIsInOccludersListUP1D"
+       def __call__(self, inter):
+               func = GetOccludersF1D()
+               occluders = func(inter)
+               for a in occluders:
+                       if(a.getId() == self._id):
+                               return 1
+               return 0
+
+class pyIsOccludedByItselfUP1D(UnaryPredicate1D):
+       def __init__(self):
+               UnaryPredicate1D.__init__(self)
+               self.__func1 = GetOccludersF1D()
+               self.__func2 = GetShapeF1D()
+       def getName(self):
+               return "pyIsOccludedByItselfUP1D"
+       def __call__(self, inter):
+               lst1 = self.__func1(inter)
+               lst2 = self.__func2(inter)
+               for vs1 in lst1:
+                       for vs2 in lst2:
+                               if vs1.getId() == vs2.getId():
+                                       return 1
+               return 0
+
+class pyIsOccludedByIdListUP1D(UnaryPredicate1D):
+       def __init__(self, idlist):
+               UnaryPredicate1D.__init__(self)
+               self._idlist = idlist
+               self.__func1 = GetOccludersF1D()
+       def getName(self):
+               return "pyIsOccludedByIdListUP1D"
+       def __call__(self, inter):
+               lst1 = self.__func1(inter)
+               for vs1 in lst1:
+                       for id in self._idlist:
+                               if vs1.getId() == id:
+                                       return 1
+               return 0
+
+class pyShapeIdListUP1D(UnaryPredicate1D):
+       def __init__(self,idlist):
+               UnaryPredicate1D.__init__(self)
+               self._idlist = idlist
+               self._funcs = []
+               for id in idlist :
+                       self._funcs.append(ShapeUP1D(id.getFirst(), id.getSecond()))
+               
+       def getName(self):
+               return "pyShapeIdUP1D"
+       def __call__(self, inter):
+               for func in self._funcs :
+                       if(func(inter) == 1) :
+                               return 1
+               return 0
+
+## deprecated
+class pyShapeIdUP1D(UnaryPredicate1D):
+       def __init__(self,id):
+               UnaryPredicate1D.__init__(self)
+               self._id = id
+       def getName(self):
+               return "pyShapeIdUP1D"
+       def __call__(self, inter):
+               func = GetShapeF1D()
+               shapes = func(inter)
+               for a in shapes:
+                       if(a.getId() == self._id):
+                               return 1
+               return 0
+
+class pyHighDensityAnisotropyUP1D(UnaryPredicate1D):
+       def __init__(self,threshold, level, sampling=2.0):
+               UnaryPredicate1D.__init__(self)
+               self._l = threshold
+               self.func = pyDensityAnisotropyF1D(level, IntegrationType.MEAN, sampling)
+       def getName(self):
+               return "pyHighDensityAnisotropyUP1D"
+       def __call__(self, inter):
+               return (self.func(inter) > self._l)
+
+class pyHighViewMapGradientNormUP1D(UnaryPredicate1D):
+       def __init__(self,threshold, l, sampling=2.0):
+               UnaryPredicate1D.__init__(self)
+               self._threshold = threshold
+               self._GetGradient = pyViewMapGradientNormF1D(l, IntegrationType.MEAN)
+       def getName(self):
+               return "pyHighViewMapGradientNormUP1D"
+       def __call__(self, inter):
+               gn = self._GetGradient(inter)
+               #print(gn)
+               return (gn > self._threshold)
+
+class pyDensityVariableSigmaUP1D(UnaryPredicate1D):
+       def __init__(self,functor, sigmaMin,sigmaMax, lmin, lmax, tmin, tmax, integration = IntegrationType.MEAN, sampling=2.0):
+               UnaryPredicate1D.__init__(self)
+               self._functor = functor
+               self._sigmaMin = float(sigmaMin)
+               self._sigmaMax = float(sigmaMax)
+               self._lmin = float(lmin)
+               self._lmax = float(lmax)
+               self._tmin = tmin
+               self._tmax = tmax
+               self._integration = integration
+               self._sampling = sampling
+                       
+       def getName(self):
+               return "pyDensityUP1D"
+
+       def __call__(self, inter):
+               sigma = (self._sigmaMax-self._sigmaMin)/(self._lmax-self._lmin)*(self._functor(inter)-self._lmin) + self._sigmaMin
+               t = (self._tmax-self._tmin)/(self._lmax-self._lmin)*(self._functor(inter)-self._lmin) + self._tmin
+               if(sigma<self._sigmaMin):
+                       sigma = self._sigmaMin
+               self._func = DensityF1D(sigma, self._integration, self._sampling)
+               d = self._func(inter)
+               if(d<t):
+                       return 1
+               return 0
+
+class pyClosedCurveUP1D(UnaryPredicate1D):
+       def __call__(self, inter):
+               it = inter.verticesBegin()
+               itlast = inter.verticesEnd()
+               itlast.decrement()      
+               vlast = itlast.getObject()
+               v = it.getObject()
+               print(v.getId().getFirst(), v.getId().getSecond())
+               print(vlast.getId().getFirst(), vlast.getId().getSecond())
+               if(v.getId() == vlast.getId()):
+                       return 1
+               return 0
diff --git a/release/scripts/freestyle/style_modules/anisotropic_diffusion.py b/release/scripts/freestyle/style_modules/anisotropic_diffusion.py
new file mode 100755 (executable)
index 0000000..7e7ebf6
--- /dev/null
@@ -0,0 +1,74 @@
+#
+#  Filename : anisotropic_diffusion.py
+#  Author   : Fredo Durand
+#  Date     : 12/08/2004
+#  Purpose  : Smoothes lines using an anisotropic diffusion scheme
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from shaders import *
+from PredicatesU0D import *
+from math import *
+
+## thickness modifiers
+
+normalInfo=Normal2DF0D()
+curvatureInfo=Curvature2DAngleF0D()
+
+def edgestopping(x, sigma): 
+       return exp(- x*x/(2*sigma*sigma))
+
+class pyDiffusion2Shader(StrokeShader):
+       def __init__(self, lambda1, nbIter):
+               StrokeShader.__init__(self)
+               self._lambda = lambda1
+               self._nbIter = nbIter
+       def getName(self):
+               return "pyDiffusionShader"
+       def shade(self, stroke):
+               for i in range (1, self._nbIter):
+                       it = stroke.strokeVerticesBegin()
+                       while it.isEnd() == 0:
+                               v=it.getObject()
+                               p1 = v.getPoint()
+                               p2 = normalInfo(it.castToInterface0DIterator())*self._lambda*curvatureInfo(it.castToInterface0DIterator())
+                               v.setPoint(p1+p2)
+                               it.increment()
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
+Operators.select( upred )
+bpred = TrueBP1D();
+Operators.bidirectionalChain(ChainPredicateIterator(upred, bpred), NotUP1D(upred) )
+shaders_list =         [
+               ConstantThicknessShader(4),
+               StrokeTextureShader("smoothAlpha.bmp", Stroke.OPAQUE_MEDIUM, 0),
+               SamplingShader(2),
+               pyDiffusion2Shader(-0.03, 30), 
+               IncreasingColorShader(1.0,0.0,0.0,1, 0, 1, 0, 1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
+
+
+
diff --git a/release/scripts/freestyle/style_modules/apriori_and_causal_density.py b/release/scripts/freestyle/style_modules/apriori_and_causal_density.py
new file mode 100755 (executable)
index 0000000..7cdd4b2
--- /dev/null
@@ -0,0 +1,45 @@
+#
+#  Filename : apriori_and_causal_density.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Selects the lines with high a priori density and 
+#             subjects them to the causal density so as to avoid 
+#             cluttering
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from shaders import *
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.3, IntegrationType.LAST))
+Operators.select(upred)
+bpred = TrueBP1D()
+Operators.bidirectionalChain(ChainPredicateIterator(upred, bpred), NotUP1D(QuantitativeInvisibilityUP1D(0)))
+shaders_list =         [
+               ConstantThicknessShader(2), 
+               ConstantColorShader(0.0, 0.0, 0.0,1)
+               ]
+Operators.create(pyDensityUP1D(1,0.1, IntegrationType.MEAN), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/apriori_density.py b/release/scripts/freestyle/style_modules/apriori_density.py
new file mode 100755 (executable)
index 0000000..5ff6c58
--- /dev/null
@@ -0,0 +1,43 @@
+#
+#  Filename : apriori_density.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws lines having a high a priori density
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from shaders import *
+
+Operators.select(AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.1,5)))
+bpred = TrueBP1D()
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.0007,5))
+Operators.bidirectionalChain(ChainPredicateIterator(upred, bpred), NotUP1D(QuantitativeInvisibilityUP1D(0)))
+shaders_list =         [
+               ConstantThicknessShader(2), 
+               ConstantColorShader(0.0, 0.0, 0.0,1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/backbone_stretcher.py b/release/scripts/freestyle/style_modules/backbone_stretcher.py
new file mode 100755 (executable)
index 0000000..8a6b9d7
--- /dev/null
@@ -0,0 +1,36 @@
+#
+#  Filename : backbone_stretcher.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Stretches the geometry of visible lines
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from shaders import *
+
+Operators.select(QuantitativeInvisibilityUP1D(0))
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
+shaders_list = [TextureAssignerShader(4), ConstantColorShader(0.5, 0.5, 0.5), BackboneStretcherShader(20)]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/blueprint_circles.py b/release/scripts/freestyle/style_modules/blueprint_circles.py
new file mode 100755 (executable)
index 0000000..7f3a756
--- /dev/null
@@ -0,0 +1,46 @@
+#
+#  Filename : blueprint_circles.py
+#  Author   : Emmanuel Turquin
+#  Date     : 04/08/2005
+#  Purpose  : Produces a blueprint using circular contour strokes
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from shaders import *
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
+bpred = SameShapeIdBP1D()
+Operators.select(upred)
+Operators.bidirectionalChain(ChainPredicateIterator(upred,bpred), NotUP1D(upred))
+Operators.select(pyHigherLengthUP1D(200))
+shaders_list = [
+               ConstantThicknessShader(5),
+                pyBluePrintCirclesShader(3),
+               pyPerlinNoise1DShader(0.1, 15, 8),
+               TextureAssignerShader(4),
+               IncreasingColorShader(0.8, 0.8, 0.3, 0.4, 0.3, 0.3, 0.3, 0.1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/blueprint_ellipses.py b/release/scripts/freestyle/style_modules/blueprint_ellipses.py
new file mode 100755 (executable)
index 0000000..a5cfe4e
--- /dev/null
@@ -0,0 +1,46 @@
+#
+#  Filename : blueprint_ellipses.py
+#  Author   : Emmanuel Turquin
+#  Date     : 04/08/2005
+#  Purpose  : Produces a blueprint using elliptic contour strokes
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from shaders import *
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
+bpred = SameShapeIdBP1D()
+Operators.select(upred)
+Operators.bidirectionalChain(ChainPredicateIterator(upred,bpred), NotUP1D(upred))
+Operators.select(pyHigherLengthUP1D(200))
+shaders_list = [
+               ConstantThicknessShader(5),
+                pyBluePrintEllipsesShader(3),
+               pyPerlinNoise1DShader(0.1, 10, 8),
+               TextureAssignerShader(4),
+               IncreasingColorShader(0.6, 0.3, 0.3, 0.7, 0.3, 0.3, 0.3, 0.1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/blueprint_squares.py b/release/scripts/freestyle/style_modules/blueprint_squares.py
new file mode 100755 (executable)
index 0000000..7798acc
--- /dev/null
@@ -0,0 +1,45 @@
+#  Filename : blueprint_squares.py
+#  Author   : Emmanuel Turquin
+#  Date     : 04/08/2005
+#  Purpose  : Produces a blueprint using square contour strokes
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from shaders import *
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
+bpred = SameShapeIdBP1D()
+Operators.select(upred)
+Operators.bidirectionalChain(ChainPredicateIterator(upred,bpred), NotUP1D(upred))
+Operators.select(pyHigherLengthUP1D(200))
+shaders_list = [
+               ConstantThicknessShader(8),
+                pyBluePrintSquaresShader(2, 20),
+               pyPerlinNoise1DShader(0.07, 10, 8),
+               TextureAssignerShader(4),
+               IncreasingColorShader(0.6, 0.3, 0.3, 0.7, 0.6, 0.3, 0.3, 0.3),
+               ConstantThicknessShader(4)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/cartoon.py b/release/scripts/freestyle/style_modules/cartoon.py
new file mode 100755 (executable)
index 0000000..6ace7e0
--- /dev/null
@@ -0,0 +1,42 @@
+#
+#  Filename : cartoon.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws colored lines. The color is automatically 
+#             infered from each object's material in a cartoon-like
+#             fashion.
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from shaders import *
+
+Operators.select(QuantitativeInvisibilityUP1D(0))
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
+shaders_list =         [
+               BezierCurveShader(3),
+               ConstantThicknessShader(4), 
+               pyMaterialColorShader(0.8)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/contour.py b/release/scripts/freestyle/style_modules/contour.py
new file mode 100755 (executable)
index 0000000..c4b3a0f
--- /dev/null
@@ -0,0 +1,42 @@
+#
+#  Filename : contour.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws each object's visible contour
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from shaders import *
+
+Operators.select(AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D() ) )
+bpred = SameShapeIdBP1D();
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
+Operators.bidirectionalChain(ChainPredicateIterator(upred, bpred), NotUP1D(QuantitativeInvisibilityUP1D(0)))
+shaders_list =  [
+               ConstantThicknessShader(5.0),
+               IncreasingColorShader(0.8,0,0,1,0.1,0,0,1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/curvature2d.py b/release/scripts/freestyle/style_modules/curvature2d.py
new file mode 100755 (executable)
index 0000000..fc2bcab
--- /dev/null
@@ -0,0 +1,60 @@
+#
+#  Filename : curvature2d.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : The stroke points are colored in gray levels and depending
+#             on the 2d curvature value
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from shaders import *
+
+class py2DCurvatureColorShader(StrokeShader):
+       def getName(self):
+               return "py2DCurvatureColorShader"
+
+       def shade(self, stroke):
+               it = stroke.strokeVerticesBegin()
+               it_end = stroke.strokeVerticesEnd()
+               func = Curvature2DAngleF0D()
+               while it.isEnd() == 0:
+                       it0D = it.castToInterface0DIterator()
+                       sv = it.getObject()
+                       att = sv.attribute()
+                       c = func(it0D)
+                       if (c<0):
+                               print("negative 2D curvature")
+                       color = 10.0 * c/3.1415
+                       att.setColor(color,color,color);
+                       it.increment()
+
+Operators.select(QuantitativeInvisibilityUP1D(0))
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
+shaders_list =         [
+               StrokeTextureShader("smoothAlpha.bmp", Stroke.OPAQUE_MEDIUM, 0),
+               ConstantThicknessShader(5),
+               py2DCurvatureColorShader()
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/external_contour.py b/release/scripts/freestyle/style_modules/external_contour.py
new file mode 100755 (executable)
index 0000000..2a39b79
--- /dev/null
@@ -0,0 +1,43 @@
+#
+#  Filename : external_contour.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws the external contour of the scene
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from ChainingIterators import *
+from shaders import *
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
+Operators.select(upred )
+bpred = TrueBP1D();
+Operators.bidirectionalChain(ChainPredicateIterator(upred, bpred), NotUP1D(upred))
+shaders_list =         [
+               ConstantThicknessShader(3),
+               ConstantColorShader(0.0, 0.0, 0.0,1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
\ No newline at end of file
diff --git a/release/scripts/freestyle/style_modules/external_contour_sketchy.py b/release/scripts/freestyle/style_modules/external_contour_sketchy.py
new file mode 100755 (executable)
index 0000000..8a4c570
--- /dev/null
@@ -0,0 +1,48 @@
+#
+#  Filename : external_contour_sketchy.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws the external contour of the scene using a sketchy 
+#             chaining iterator (in particular each ViewEdge can be drawn 
+#             several times
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+
+from freestyle_init import *
+from logical_operators import *
+from ChainingIterators import *
+from shaders import *
+
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D()) 
+Operators.select(upred)
+Operators.bidirectionalChain(pySketchyChainingIterator(), NotUP1D(upred))
+shaders_list =         [
+               SamplingShader(4),
+               SpatialNoiseShader(10, 150, 2, 1, 1), 
+               IncreasingThicknessShader(4, 10), 
+               SmoothingShader(400, 0.1, 0, 0.2, 0, 0, 0, 1),
+               IncreasingColorShader(1,0,0,1,0,1,0,1),
+               TextureAssignerShader(4)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/external_contour_smooth.py b/release/scripts/freestyle/style_modules/external_contour_smooth.py
new file mode 100755 (executable)
index 0000000..201dc27
--- /dev/null
@@ -0,0 +1,44 @@
+#
+#  Filename : external_contour_smooth.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws a smooth external contour
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from shaders import *
+from ChainingIterators import *
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
+Operators.select(upred)
+bpred = TrueBP1D();
+Operators.bidirectionalChain(ChainPredicateIterator(upred, bpred), NotUP1D(upred))
+shaders_list =         [
+               SamplingShader(2),
+               IncreasingThicknessShader(4,20), 
+               IncreasingColorShader(1.0, 0.0, 0.5,1, 0.5,1, 0.3, 1),
+               SmoothingShader(100, 0.05, 0, 0.2, 0, 0, 0, 1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/extra-lines.sml b/release/scripts/freestyle/style_modules/extra-lines.sml
new file mode 100755 (executable)
index 0000000..c63cd40
--- /dev/null
@@ -0,0 +1,3 @@
+1suggestive.py
+1ridges.py
+1nor_suggestive_or_ridges.py
diff --git a/release/scripts/freestyle/style_modules/freestyle_init.py b/release/scripts/freestyle/style_modules/freestyle_init.py
new file mode 100644 (file)
index 0000000..9eb8b2d
--- /dev/null
@@ -0,0 +1,2 @@
+from Freestyle import *
+from mathutils import Vector
diff --git a/release/scripts/freestyle/style_modules/haloing.py b/release/scripts/freestyle/style_modules/haloing.py
new file mode 100755 (executable)
index 0000000..afa4617
--- /dev/null
@@ -0,0 +1,50 @@
+#
+#  Filename : haloing.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : This style module selects the lines that 
+#             are connected (in the image) to a specific 
+#             object and trims them in order to produce
+#             a haloing effect around the target shape
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesU1D import *
+from PredicatesB1D import *
+from shaders import *
+
+# id corresponds to the id of the target object 
+# (accessed by SHIFT+click)
+id = Id(3,0)
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0) , pyIsOccludedByUP1D(id))
+Operators.select(upred)
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred))
+shaders_list =         [
+               IncreasingThicknessShader(3, 5), 
+               IncreasingColorShader(1,0,0, 1,0,1,0,1),
+               SamplingShader(1.0),
+               pyTVertexRemoverShader(),
+               TipRemoverShader(3.0)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/ignore_small_occlusions.py b/release/scripts/freestyle/style_modules/ignore_small_occlusions.py
new file mode 100755 (executable)
index 0000000..ff6efa8
--- /dev/null
@@ -0,0 +1,41 @@
+#
+#  Filename : ignore_small_oclusions.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : The strokes are drawn through small occlusions
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from ChainingIterators import *
+from shaders import *
+
+Operators.select(QuantitativeInvisibilityUP1D(0))
+#Operators.bidirectionalChain(pyFillOcclusionsChainingIterator(0.1))
+Operators.bidirectionalChain(pyFillOcclusionsAbsoluteChainingIterator(12))
+shaders_list =         [
+               SamplingShader(5.0),
+               ConstantThicknessShader(3), 
+               ConstantColorShader(0.0,0.0,0.0),
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/invisible_lines.py b/release/scripts/freestyle/style_modules/invisible_lines.py
new file mode 100755 (executable)
index 0000000..ea50946
--- /dev/null
@@ -0,0 +1,42 @@
+#
+#  Filename : invisible_lines.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws all lines whose Quantitative Invisibility 
+#             is different from 0
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from ChainingIterators import *
+from shaders import *
+
+upred = NotUP1D(QuantitativeInvisibilityUP1D(0))
+Operators.select(upred)
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred))
+shaders_list =         [
+               SamplingShader(5.0),
+               ConstantThicknessShader(3.0), 
+               ConstantColorShader(0.7,0.7,0.7)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/japanese_bigbrush.py b/release/scripts/freestyle/style_modules/japanese_bigbrush.py
new file mode 100755 (executable)
index 0000000..7f10959
--- /dev/null
@@ -0,0 +1,60 @@
+#
+#  Filename : japanese_bigbrush.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Simulates a big brush fr oriental painting
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesU1D import *
+from PredicatesB1D import *
+from Functions0D import *
+from shaders import *
+
+Operators.select(QuantitativeInvisibilityUP1D(0))
+Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D(QuantitativeInvisibilityUP1D(0)))
+## Splits strokes at points of highest 2D curavture 
+## when there are too many abrupt turns in it
+func = pyInverseCurvature2DAngleF0D()
+Operators.recursiveSplit(func,  pyParameterUP0D(0.2,0.8), NotUP1D(pyHigherNumberOfTurnsUP1D(3, 0.5)), 2)
+## Keeps only long enough strokes
+Operators.select(pyHigherLengthUP1D(100))
+## Sorts so as to draw the longest strokes first
+## (this will be done using the causal density)
+Operators.sort(pyLengthBP1D())
+shaders_list =         [
+               pySamplingShader(10),
+               BezierCurveShader(30),
+               SamplingShader(50),
+               ConstantThicknessShader(10),
+               pyNonLinearVaryingThicknessShader(4,25, 0.6),
+               TextureAssignerShader(6),
+               ConstantColorShader(0.2, 0.2, 0.2,1.0),
+               TipRemoverShader(10)
+               ]
+               
+## Use the causal density to avoid cluttering
+Operators.create(pyDensityUP1D(8,0.4, IntegrationType.MEAN), shaders_list)
+
+
diff --git a/release/scripts/freestyle/style_modules/logical_operators.py b/release/scripts/freestyle/style_modules/logical_operators.py
new file mode 100755 (executable)
index 0000000..0ecf662
--- /dev/null
@@ -0,0 +1,36 @@
+from freestyle_init import *
+
+class AndUP1D(UnaryPredicate1D):
+    def __init__(self, pred1, pred2):
+        UnaryPredicate1D.__init__(self)
+        self.__pred1 = pred1
+        self.__pred2 = pred2
+
+    def getName(self):
+        return "AndUP1D"
+
+    def __call__(self, inter):
+        return self.__pred1(inter) and self.__pred2(inter)
+    
+class OrUP1D(UnaryPredicate1D):
+    def __init__(self, pred1, pred2):
+        UnaryPredicate1D.__init__(self)
+        self.__pred1 = pred1
+        self.__pred2 = pred2
+
+    def getName(self):
+        return "OrUP1D"
+
+    def __call__(self, inter):
+        return self.__pred1(inter) or self.__pred2(inter)
+
+class NotUP1D(UnaryPredicate1D):
+       def __init__(self, pred):
+               UnaryPredicate1D.__init__(self)
+               self.__pred = pred
+
+       def getName(self):
+               return "NotUP1D"
+
+       def __call__(self, inter):
+               return self.__pred(inter) == 0
diff --git a/release/scripts/freestyle/style_modules/long_anisotropically_dense.py b/release/scripts/freestyle/style_modules/long_anisotropically_dense.py
new file mode 100755 (executable)
index 0000000..155ee48
--- /dev/null
@@ -0,0 +1,81 @@
+#
+#  Filename : long_anisotropically_dense.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Selects the lines that are long and have a high anisotropic 
+#             a priori density and uses causal density 
+#             to draw without cluttering. Ideally, half of the
+#             selected lines are culled using the causal density.
+#
+#             ********************* WARNING *************************************
+#             ******** The Directional a priori density maps must          ****** 
+#             ******** have been computed prior to using this style module ******
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesU1D import *
+from PredicatesU0D import *
+from PredicatesB1D import *
+from Functions0D import *
+from Functions1D import *
+from shaders import *
+
+## custom density predicate
+class pyDensityUP1D(UnaryPredicate1D):
+       def __init__(self,wsize,threshold, integration = IntegrationType.MEAN, sampling=2.0):
+               UnaryPredicate1D.__init__(self)
+               self._wsize = wsize
+               self._threshold = threshold
+               self._integration = integration
+               self._func = DensityF1D(self._wsize, self._integration, sampling)
+               self._func2 = DensityF1D(self._wsize, IntegrationType.MAX, sampling)
+   
+       def getName(self):
+               return "pyDensityUP1D"
+
+       def __call__(self, inter):
+               c = self._func(inter)
+               m = self._func2(inter)
+               if(c < self._threshold):
+                       return 1
+               if( m > 4* c ):
+                       if ( c < 1.5*self._threshold ):
+                               return 1
+               return 0
+
+Operators.select(QuantitativeInvisibilityUP1D(0))
+Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D(QuantitativeInvisibilityUP1D(0)))
+Operators.select(pyHigherLengthUP1D(40))
+## selects lines having a high anisotropic a priori density
+Operators.select(pyHighDensityAnisotropyUP1D(0.3,4))
+Operators.sort(pyLengthBP1D())
+shaders_list =  [
+       SamplingShader(2.0),
+       ConstantThicknessShader(2),
+       ConstantColorShader(0.2,0.2,0.25,1), 
+                       ]
+## uniform culling
+Operators.create(pyDensityUP1D(3.0,2.0e-2, IntegrationType.MEAN, 0.1), shaders_list)
+
diff --git a/release/scripts/freestyle/style_modules/multiple_parameterization.py b/release/scripts/freestyle/style_modules/multiple_parameterization.py
new file mode 100755 (executable)
index 0000000..3f0409d
--- /dev/null
@@ -0,0 +1,51 @@
+#
+#  Filename : multiple_parameterization.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : The thickness and the color of the strokes vary continuously 
+#             independently from occlusions although only
+#             visible lines are actually drawn. This is equivalent
+#             to assigning the thickness using a parameterization covering
+#             the complete silhouette (visible+invisible) and drawing
+#             the strokes using a second parameterization that only
+#             covers the visible portions.
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from ChainingIterators import *
+from shaders import *
+
+Operators.select(QuantitativeInvisibilityUP1D(0))
+## Chain following the same nature, but without the restriction
+## of staying inside the selection (0).
+Operators.bidirectionalChain(ChainSilhouetteIterator(0))
+shaders_list =         [
+               SamplingShader(20),
+               IncreasingThicknessShader(1.5, 30), 
+               ConstantColorShader(0.0,0.0,0.0),
+               IncreasingColorShader(1,0,0,1,0,1,0,1),
+               TextureAssignerShader(-1),
+               pyHLRShader() ## this shader draws only visible portions
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/nature.py b/release/scripts/freestyle/style_modules/nature.py
new file mode 100755 (executable)
index 0000000..b5481a8
--- /dev/null
@@ -0,0 +1,43 @@
+#
+#  Filename : nature.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Uses the NatureUP1D predicate to select the lines
+#             of a given type (among Nature.SILHOUETTE, Nature.CREASE, Nature.SUGGESTIVE_CONTOURS,
+#             Nature.BORDERS).
+#             The suggestive contours must have been enabled in the 
+#             options dialog to appear in the View Map.
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from shaders import *
+
+Operators.select(pyNatureUP1D(Nature.SILHOUETTE))
+Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D( pyNatureUP1D( Nature.SILHOUETTE) ) )
+shaders_list =         [
+               IncreasingThicknessShader(3, 10), 
+               IncreasingColorShader(0.0,0.0,0.0, 1, 0.8,0,0,1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/near_lines.py b/release/scripts/freestyle/style_modules/near_lines.py
new file mode 100755 (executable)
index 0000000..565bca1
--- /dev/null
@@ -0,0 +1,44 @@
+#
+#  Filename : near_lines.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws the lines that are "closer" than a threshold 
+#             (between 0 and 1)
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from shaders import *
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyZSmallerUP1D(0.5, IntegrationType.MEAN)) 
+Operators.select(upred)
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred))
+shaders_list =         [
+               TextureAssignerShader(-1),
+               ConstantThicknessShader(5), 
+               ConstantColorShader(0.0, 0.0, 0.0)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/occluded_by_specific_object.py b/release/scripts/freestyle/style_modules/occluded_by_specific_object.py
new file mode 100755 (executable)
index 0000000..09ce39d
--- /dev/null
@@ -0,0 +1,45 @@
+#
+#  Filename : occluded_by_specific_object.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws only the lines that are occluded by a given object
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesU1D import *
+from shaders import *
+
+## the id of the occluder (use SHIFT+click on the ViewMap to
+## retrieve ids)
+id = Id(3,0)
+upred = AndUP1D(NotUP1D(QuantitativeInvisibilityUP1D(0)),
+pyIsInOccludersListUP1D(id))
+Operators.select(upred)
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred))
+shaders_list =         [
+               SamplingShader(5),
+               ConstantThicknessShader(3), 
+               ConstantColorShader(0.3,0.3,0.3,1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py
new file mode 100644 (file)
index 0000000..8b43fd0
--- /dev/null
@@ -0,0 +1,426 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+import Freestyle
+
+from freestyle_init import *
+from logical_operators import *
+from ChainingIterators import *
+from shaders import *
+
+class ColorRampModifier(StrokeShader):
+    def __init__(self, blend, influence, ramp):
+        StrokeShader.__init__(self)
+        self.__blend = blend
+        self.__influence = influence
+        self.__ramp = ramp
+    def evaluate(self, t):
+        col = Freestyle.evaluateColorRamp(self.__ramp, t)
+        col = col.xyz # omit alpha
+        return col
+    def blend_ramp(self, a, b):
+        return Freestyle.blendRamp(self.__blend, a, self.__influence, b)
+
+class CurveMappingModifier(StrokeShader):
+    def __init__(self, blend, influence, mapping, invert, curve):
+        StrokeShader.__init__(self)
+        self.__blend = blend
+        self.__influence = influence
+        assert mapping in ("LINEAR", "CURVE")
+        self.__mapping = getattr(self, mapping)
+        self.__invert = invert
+        self.__curve = curve
+    def LINEAR(self, t):
+        if self.__invert:
+            return 1.0 - t
+        return t
+    def CURVE(self, t):
+        return Freestyle.evaluateCurveMappingF(self.__curve, 0, t)
+    def evaluate(self, t):
+        return self.__mapping(t)
+    def blend_curve(self, v1, v2):
+        fac = self.__influence
+        facm = 1.0 - fac
+        if self.__blend == "MIX":
+            v1 = facm * v1 + fac * v2
+        elif self.__blend == "ADD":
+            v1 += fac * v2
+        elif self.__blend == "MULTIPLY":
+            v1 *= facm + fac * v2;
+        elif self.__blend == "SUBTRACT":
+            v1 -= fac * v2
+        elif self.__blend == "DIVIDE":
+            if v2 != 0.0:
+                v1 = facm * v1 + fac * v1 / v2
+        elif self.__blend == "DIFFERENCE":
+            v1 = facm * v1 + fac * abs(v1 - v2)
+        elif self.__blend == "MININUM":
+            tmp = fac * v1
+            if v1 > tmp:
+                v1 = tmp
+        elif self.__blend == "MAXIMUM":
+            tmp = fac * v1
+            if v1 < tmp:
+                v1 = tmp
+        else:
+            raise ValueError("unknown curve blend type: " + self.__blend)
+        return v1
+
+# Along Stroke modifiers
+
+def iter_t2d_along_stroke(stroke):
+    total = stroke.getLength2D()
+    distance = 0.0
+    it = stroke.strokeVerticesBegin()
+    while not it.isEnd():
+        p = it.getObject().getPoint()
+        if not it.isBegin():
+            distance += (prev - p).length
+        prev = p
+        t = min(distance / total, 1.0)
+        yield it, t
+        it.increment()
+
+class ColorAlongStrokeShader(ColorRampModifier):
+    def getName(self):
+        return "ColorAlongStrokeShader"
+    def shade(self, stroke):
+        for it, t in iter_t2d_along_stroke(stroke):
+            attr = it.getObject().attribute()
+            a = attr.getColorRGB()
+            b = self.evaluate(t)
+            c = self.blend_ramp(a, b)
+            attr.setColor(c)
+
+class AlphaAlongStrokeShader(CurveMappingModifier):
+    def getName(self):
+        return "AlphaAlongStrokeShader"
+    def shade(self, stroke):
+        for it, t in iter_t2d_along_stroke(stroke):
+            attr = it.getObject().attribute()
+            a = attr.getAlpha()
+            b = self.evaluate(t)
+            c = self.blend_curve(a, b)
+            attr.setAlpha(c)
+
+class ThicknessAlongStrokeShader(CurveMappingModifier):
+    def __init__(self, blend, influence, mapping, invert, curve, value_min, value_max):
+        CurveMappingModifier.__init__(self, blend, influence, mapping, invert, curve)
+        self.__value_min = value_min
+        self.__value_max = value_max
+    def getName(self):
+        return "ThicknessAlongStrokeShader"
+    def shade(self, stroke):
+        for it, t in iter_t2d_along_stroke(stroke):
+            attr = it.getObject().attribute()
+            a = attr.getThicknessRL()
+            a = a[0] + a[1]
+            b = self.__value_min + self.evaluate(t) * (self.__value_max - self.__value_min)
+            c = self.blend_curve(a, b)
+            attr.setThickness(c/2, c/2)
+
+# Distance from Camera modifiers
+
+def iter_distance_from_camera(stroke, range_min, range_max):
+    normfac = range_max - range_min # normalization factor
+    it = stroke.strokeVerticesBegin()
+    while not it.isEnd():
+        p = it.getObject().getPoint3D() # in the camera coordinate
+        distance = p.length
+        if distance < range_min:
+            t = 0.0
+        elif distance > range_max:
+            t = 1.0
+        else:
+            t = (distance - range_min) / normfac
+        yield it, t
+        it.increment()
+
+class ColorDistanceFromCameraShader(ColorRampModifier):
+    def __init__(self, blend, influence, ramp, range_min, range_max):
+        ColorRampModifier.__init__(self, blend, influence, ramp)
+        self.__range_min = range_min
+        self.__range_max = range_max
+    def getName(self):
+        return "ColorDistanceFromCameraShader"
+    def shade(self, stroke):
+        for it, t in iter_distance_from_camera(stroke, self.__range_min, self.__range_max):
+            attr = it.getObject().attribute()
+            a = attr.getColorRGB()
+            b = self.evaluate(t)
+            c = self.blend_ramp(a, b)
+            attr.setColor(c)
+
+class AlphaDistanceFromCameraShader(CurveMappingModifier):
+    def __init__(self, blend, influence, mapping, invert, curve, range_min, range_max):
+        CurveMappingModifier.__init__(self, blend, influence, mapping, invert, curve)
+        self.__range_min = range_min
+        self.__range_max = range_max
+    def getName(self):
+        return "AlphaDistanceFromCameraShader"
+    def shade(self, stroke):
+        for it, t in iter_distance_from_camera(stroke, self.__range_min, self.__range_max):
+            attr = it.getObject().attribute()
+            a = attr.getAlpha()
+            b = self.evaluate(t)
+            c = self.blend_curve(a, b)
+            attr.setAlpha(c)
+
+class ThicknessDistanceFromCameraShader(CurveMappingModifier):
+    def __init__(self, blend, influence, mapping, invert, curve, range_min, range_max, value_min, value_max):
+        CurveMappingModifier.__init__(self, blend, influence, mapping, invert, curve)
+        self.__range_min = range_min
+        self.__range_max = range_max
+        self.__value_min = value_min
+        self.__value_max = value_max
+    def getName(self):
+        return "ThicknessDistanceFromCameraShader"
+    def shade(self, stroke):
+        for it, t in iter_distance_from_camera(stroke, self.__range_min, self.__range_max):
+            attr = it.getObject().attribute()
+            a = attr.getThicknessRL()
+            a = a[0] + a[1]
+            b = self.__value_min + self.evaluate(t) * (self.__value_max - self.__value_min)
+            c = self.blend_curve(a, b)
+            attr.setThickness(c/2, c/2)
+
+# Distance from Object modifiers
+
+def iter_distance_from_object(stroke, object, range_min, range_max):
+    scene = Freestyle.getCurrentScene()
+    mv = scene.camera.matrix_world.copy().invert() # model-view matrix
+    loc = mv * object.location # loc in the camera coordinate
+    normfac = range_max - range_min # normalization factor
+    it = stroke.strokeVerticesBegin()
+    while not it.isEnd():
+        p = it.getObject().getPoint3D() # in the camera coordinate
+        distance = (p - loc).length
+        if distance < range_min:
+            t = 0.0
+        elif distance > range_max:
+            t = 1.0
+        else:
+            t = (distance - range_min) / normfac
+        yield it, t
+        it.increment()
+
+class ColorDistanceFromObjectShader(ColorRampModifier):
+    def __init__(self, blend, influence, ramp, target, range_min, range_max):
+        ColorRampModifier.__init__(self, blend, influence, ramp)
+        self.__target = target
+        self.__range_min = range_min
+        self.__range_max = range_max
+    def getName(self):
+        return "ColorDistanceFromObjectShader"
+    def shade(self, stroke):
+        if self.__target is None:
+            return
+        for it, t in iter_distance_from_object(stroke, self.__target, self.__range_min, self.__range_max):
+            attr = it.getObject().attribute()
+            a = attr.getColorRGB()
+            b = self.evaluate(t)
+            c = self.blend_ramp(a, b)
+            attr.setColor(c)
+
+class AlphaDistanceFromObjectShader(CurveMappingModifier):
+    def __init__(self, blend, influence, mapping, invert, curve, target, range_min, range_max):
+        CurveMappingModifier.__init__(self, blend, influence, mapping, invert, curve)
+        self.__target = target
+        self.__range_min = range_min
+        self.__range_max = range_max
+    def getName(self):
+        return "AlphaDistanceFromObjectShader"
+    def shade(self, stroke):
+        if self.__target is None:
+            return
+        for it, t in iter_distance_from_object(stroke, self.__target, self.__range_min, self.__range_max):
+            attr = it.getObject().attribute()
+            a = attr.getAlpha()
+            b = self.evaluate(t)
+            c = self.blend_curve(a, b)
+            attr.setAlpha(c)
+
+class ThicknessDistanceFromObjectShader(CurveMappingModifier):
+    def __init__(self, blend, influence, mapping, invert, curve, target, range_min, range_max, value_min, value_max):
+        CurveMappingModifier.__init__(self, blend, influence, mapping, invert, curve)
+        self.__target = target
+        self.__range_min = range_min
+        self.__range_max = range_max
+        self.__value_min = value_min
+        self.__value_max = value_max
+    def getName(self):
+        return "ThicknessDistanceFromObjectShader"
+    def shade(self, stroke):
+        if self.__target is None:
+            return
+        for it, t in iter_distance_from_object(stroke, self.__target, self.__range_min, self.__range_max):
+            attr = it.getObject().attribute()
+            a = attr.getThicknessRL()
+            a = a[0] + a[1]
+            b = self.__value_min + self.evaluate(t) * (self.__value_max - self.__value_min)
+            c = self.blend_curve(a, b)
+            attr.setThickness(c/2, c/2)
+
+# Predicates and helper functions
+
+class QuantitativeInvisibilityRangeUP1D(UnaryPredicate1D):
+    def __init__(self, qi_start, qi_end):
+        UnaryPredicate1D.__init__(self)
+        self.__getQI = QuantitativeInvisibilityF1D()
+        self.__qi_start = qi_start
+        self.__qi_end = qi_end
+    def getName(self):
+        return "QuantitativeInvisibilityRangeUP1D"
+    def __call__(self, inter):
+        qi = self.__getQI(inter)
+        return self.__qi_start <= qi <= self.__qi_end
+
+def join_unary_predicates(upred_list, bpred):
+    if not upred_list:
+        return TrueUP1D()
+    upred = upred_list[0]
+    for p in upred_list[1:]:
+        upred = bpred(upred, p)
+    return upred
+
+# main function for parameter processing
+
+def process(layer_name, lineset_name):
+    scene = Freestyle.getCurrentScene()
+    layer = scene.render.layers[layer_name]
+    lineset = layer.freestyle_settings.linesets[lineset_name]
+    linestyle = lineset.linestyle
+
+    selection_criteria = []
+    # prepare selection criteria by visibility
+    if lineset.select_by_visibility:
+        if lineset.visibility == "VISIBLE":
+            selection_criteria.append(
+                QuantitativeInvisibilityUP1D(0))
+        elif lineset.visibility == "HIDDEN":
+            selection_criteria.append(
+                NotUP1D(QuantitativeInvisibilityUP1D(0)))
+        elif lineset.visibility == "RANGE":
+            selection_criteria.append(
+                QuantitativeInvisibilityRangeUP1D(lineset.qi_start, lineset.qi_end))
+    # prepare selection criteria by edge types
+    if lineset.select_by_edge_types:
+        edge_type_criteria = []
+        if lineset.edge_type_combination == "OR":
+            flags = Nature.NO_FEATURE
+            if lineset.select_silhouette:
+                flags |= Nature.SILHOUETTE
+            if lineset.select_border:
+                flags |= Nature.BORDER
+            if lineset.select_crease:
+                flags |= Nature.CREASE
+            if lineset.select_ridge:
+                flags |= Nature.RIDGE
+            if lineset.select_valley:
+                flags |= Nature.VALLEY
+            if lineset.select_suggestive_contour:
+                flags |= Nature.SUGGESTIVE_CONTOUR
+            if lineset.select_material_boundary:
+                flags |= Nature.MATERIAL_BOUNDARY
+            if flags != Nature.NO_FEATURE:
+                edge_type_criteria.append(pyNatureUP1D(flags))
+        else:
+            if lineset.select_silhouette:
+                edge_type_criteria.append(pyNatureUP1D(Nature.SILHOUETTE))
+            if lineset.select_border:
+                edge_type_criteria.append(pyNatureUP1D(Nature.BORDER))
+            if lineset.select_crease:
+                edge_type_criteria.append(pyNatureUP1D(Nature.CREASE))
+            if lineset.select_ridge:
+                edge_type_criteria.append(pyNatureUP1D(Nature.RIDGE))
+            if lineset.select_valley:
+                edge_type_criteria.append(pyNatureUP1D(Nature.VALLEY))
+            if lineset.select_suggestive_contour:
+                edge_type_criteria.append(pyNatureUP1D(Nature.SUGGESTIVE_CONTOUR))
+            if lineset.select_material_boundary:
+                edge_type_criteria.append(pyNatureUP1D(Nature.MATERIAL_BOUNDARY))
+        if lineset.select_contour:
+            edge_type_criteria.append(ContourUP1D())
+        if lineset.select_external_contour:
+            edge_type_criteria.append(ExternalContourUP1D())
+        if lineset.edge_type_combination == "OR":
+            upred = join_unary_predicates(edge_type_criteria, OrUP1D)
+        else:
+            upred = join_unary_predicates(edge_type_criteria, AndUP1D)
+        if upred is not None:
+            if lineset.edge_type_negation == "EXCLUSIVE":
+                upred = NotUP1D(upred)
+            selection_criteria.append(upred)
+    # do feature edge selection
+    upred = join_unary_predicates(selection_criteria, AndUP1D)
+    if upred is None:
+        upred = TrueUP1D()
+    Operators.select(upred)
+    # join feature edges
+    Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) # FIXME
+    # prepare a list of stroke shaders
+    color = linestyle.color
+    shaders_list = [
+        SamplingShader(5.0),
+        ConstantThicknessShader(linestyle.thickness),
+        ConstantColorShader(color.r, color.g, color.b, linestyle.alpha)]
+    for m in linestyle.color_modifiers:
+        if not m.enabled:
+            continue
+        if m.type == "ALONG_STROKE":
+            shaders_list.append(ColorAlongStrokeShader(
+                m.blend, m.influence, m.color_ramp))
+        elif m.type == "DISTANCE_FROM_CAMERA":
+            shaders_list.append(ColorDistanceFromCameraShader(
+                m.blend, m.influence, m.color_ramp,
+                m.range_min, m.range_max))
+        elif m.type == "DISTANCE_FROM_OBJECT":
+            shaders_list.append(ColorDistanceFromObjectShader(
+                m.blend, m.influence, m.color_ramp, m.target,
+                m.range_min, m.range_max))
+    for m in linestyle.alpha_modifiers:
+        if not m.enabled:
+            continue
+        if m.type == "ALONG_STROKE":
+            shaders_list.append(AlphaAlongStrokeShader(
+                m.blend, m.influence, m.mapping, m.invert, m.curve))
+        elif m.type == "DISTANCE_FROM_CAMERA":
+            shaders_list.append(AlphaDistanceFromCameraShader(
+                m.blend, m.influence, m.mapping, m.invert, m.curve,
+                m.range_min, m.range_max))
+        elif m.type == "DISTANCE_FROM_OBJECT":
+            shaders_list.append(AlphaDistanceFromObjectShader(
+                m.blend, m.influence, m.mapping, m.invert, m.curve, m.target,
+                m.range_min, m.range_max))
+    for m in linestyle.thickness_modifiers:
+        if not m.enabled:
+            continue
+        if m.type == "ALONG_STROKE":
+            shaders_list.append(ThicknessAlongStrokeShader(
+                m.blend, m.influence, m.mapping, m.invert, m.curve,
+                m.value_min, m.value_max))
+        elif m.type == "DISTANCE_FROM_CAMERA":
+            shaders_list.append(ThicknessDistanceFromCameraShader(
+                m.blend, m.influence, m.mapping, m.invert, m.curve,
+                m.range_min, m.range_max, m.value_min, m.value_max))
+        elif m.type == "DISTANCE_FROM_OBJECT":
+            shaders_list.append(ThicknessDistanceFromObjectShader(
+                m.blend, m.influence, m.mapping, m.invert, m.curve, m.target,
+                m.range_min, m.range_max, m.value_min, m.value_max))
+    # create strokes using the shaders list
+    Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/polygonalize.py b/release/scripts/freestyle/style_modules/polygonalize.py
new file mode 100755 (executable)
index 0000000..4446c4c
--- /dev/null
@@ -0,0 +1,40 @@
+#
+#  Filename : polygonalize.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Make the strokes more "polygonal"
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+from freestyle_init import *
+from logical_operators import *
+from ChainingIterators import *
+from shaders import *
+
+Operators.select(QuantitativeInvisibilityUP1D(0))
+Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D(QuantitativeInvisibilityUP1D(0)))
+shaders_list =         [
+               SamplingShader(2.0),
+               ConstantThicknessShader(3), 
+               ConstantColorShader(0.0,0.0,0.0),
+               PolygonalizationShader(8)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
\ No newline at end of file
diff --git a/release/scripts/freestyle/style_modules/qi0.py b/release/scripts/freestyle/style_modules/qi0.py
new file mode 100755 (executable)
index 0000000..d35d23c
--- /dev/null
@@ -0,0 +1,41 @@
+#
+#  Filename : qi0.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws the visible lines (chaining follows same nature lines)
+#             (most basic style module)
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from ChainingIterators import *
+from shaders import *
+
+Operators.select(QuantitativeInvisibilityUP1D(0))
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
+shaders_list =         [
+               SamplingShader(5.0),
+               ConstantThicknessShader(4.0), 
+               ConstantColorShader(0.0,0.0,0.0)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
\ No newline at end of file
diff --git a/release/scripts/freestyle/style_modules/qi0_not_external_contour.py b/release/scripts/freestyle/style_modules/qi0_not_external_contour.py
new file mode 100755 (executable)
index 0000000..eed41af
--- /dev/null
@@ -0,0 +1,43 @@
+#
+#  Filename : qi0_not_external_contour.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws the visible lines (chaining follows same nature lines)
+#             that do not belong to the external contour of the scene
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
+Operators.select(upred)
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred))
+shaders_list =         [
+               SamplingShader(4),
+               SpatialNoiseShader(4, 150, 2, True, True), 
+               IncreasingThicknessShader(2, 5), 
+               BackboneStretcherShader(20),
+               IncreasingColorShader(1,0,0,1,0,1,0,1),
+               TextureAssignerShader(4)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/qi1.py b/release/scripts/freestyle/style_modules/qi1.py
new file mode 100755 (executable)
index 0000000..8d24837
--- /dev/null
@@ -0,0 +1,42 @@
+#
+#  Filename : qi1.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws lines hidden by one surface.
+#             *** Quantitative Invisibility must have been 
+#             enabled in the options dialog to use this style module ****
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from shaders import *
+
+Operators.select(QuantitativeInvisibilityUP1D(1))
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(1)))
+shaders_list =         [
+               SamplingShader(5.0),
+               ConstantThicknessShader(3), 
+               ConstantColorShader(0.5,0.5,0.5, 1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/style_modules/qi2.py b/release/scripts/freestyle/style_modules/qi2.py
new file mode 100755 (executable)
index 0000000..ba5e97b
--- /dev/null
@@ -0,0 +1,42 @@
+#
+#  Filename : qi2.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Draws lines hidden by two surfaces.
+#             *** Quantitative Invisibility must have been 
+#             enabled in the options dialog to use this style module ****
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesB1D import *
+from shaders import *
+
+Operators.select(QuantitativeInvisibilityUP1D(2))
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(2)))
+shaders_list =         [
+               SamplingShader(10),
+               ConstantThicknessShader(1.5), 
+               ConstantColorShader(0.7,0.7,0.7, 1)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
\ No newline at end of file
diff --git a/release/scripts/freestyle/style_modules/sequentialsplit_sketchy.py b/release/scripts/freestyle/style_modules/sequentialsplit_sketchy.py
new file mode 100755 (executable)
index 0000000..53fa031
--- /dev/null
@@ -0,0 +1,68 @@
+#
+#  Filename : sequentialsplit_sketchy.py
+#  Author   : Stephane Grabli
+#  Date     : 04/08/2005
+#  Purpose  : Use the sequential split with two different
+#             predicates to specify respectively the starting and
+#             the stopping extremities for strokes 
+#
+#############################################################################  
+#
+#  Copyright (C) : Please refer to the COPYRIGHT file distributed 
+#  with this source distribution. 
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+#############################################################################
+
+from freestyle_init import *
+from logical_operators import *
+from PredicatesU1D import *
+from PredicatesU0D import *
+from Functions0D import *
+
+## Predicate to tell whether a TVertex
+## corresponds to a change from 0 to 1 or not.
+class pyBackTVertexUP0D(UnaryPredicate0D):
+       def __init__(self):
+               UnaryPredicate0D.__init__(self)
+               self._getQI = QuantitativeInvisibilityF0D()
+       def getName(self):
+               return "pyBackTVertexUP0D"
+       def __call__(self, iter):
+               v = iter.getObject()
+               nat = v.getNature()
+               if(nat & Nature.T_VERTEX == 0):
+                       return 0
+               if(self._getQI(iter) != 0):
+                       return 1
+               return 0
+
+
+upred = QuantitativeInvisibilityUP1D(0)
+Operators.select(upred)
+Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred))
+## starting and stopping predicates:
+start = pyVertexNatureUP0D(Nature.NON_T_VERTEX)
+stop = pyBackTVertexUP0D()
+Operators.sequentialSplit(start, stop, 10)
+shaders_list = [
+               SpatialNoiseShader(7, 120, 2, True, True), 
+               IncreasingThicknessShader(5, 8), 
+               ConstantColorShader(0.2, 0.2, 0.2, 1), 
+               TextureAssignerShader(4)
+               ]
+Operators.create(TrueUP1D(), shaders_list)
+
diff --git a/release/scripts/freestyle/style_modules/shaders.py b/release/scripts/freestyle/style_modules/shaders.py
new file mode 100755 (executable)
index 0000000..4d8ddeb
--- /dev/null
@@ -0,0 +1,1291 @@
+from freestyle_init import *
+from PredicatesU0D import *
+from PredicatesB1D import *
+from PredicatesU1D import *
+from logical_operators import *
+from ChainingIterators import *
+from random import *
+from math import *
+
+## thickness modifiers
+######################
+
+class pyDepthDiscontinuityThicknessShader(StrokeShader):
+       def __init__(self, min, max):
+               StrokeShader.__init__(self)
+               self.__min = float(min)
+               self.__max = float(max)
+               self.__func = ZDiscontinuityF0D()
+       def getName(self):
+               return "pyDepthDiscontinuityThicknessShader"
+       def shade(self, stroke):
+               it = stroke.strokeVerticesBegin()
+               z_min=0.0
+               z_max=1.0
+               a = (self.__max - self.__min)/(z_max-z_min)
+               b = (self.__min*z_max-self.__max*z_min)/(z_max-z_min)
+               it = stroke.strokeVerticesBegin()
+               while it.isEnd() == 0:
+                       z = self.__func(it.castToInterface0DIterator())
+                       thickness = a*z+b
+                       it.getObject().attribute().setThickness(thickness, thickness)
+                       it.increment()
+
+class pyConstantThicknessShader(StrokeShader):
+       def __init__(self, thickness):
+               StrokeShader.__init__(self)
+               self._thickness = thickness
+
+       def getName(self):
+               return "pyConstantThicknessShader"
+       def shade(self, stroke):
+               it = stroke.strokeVerticesBegin()
+               it_end = stroke.strokeVerticesEnd()
+               while it.isEnd() == 0:
+                       att = it.getObject().attribute()
+                       t = self._thickness/2.0
+                       att.setThickness(t, t)
+                       it.increment()
+
+class pyFXSThicknessShader(StrokeShader):
+       def __init__(self, thickness):
+               StrokeShader.__init__(self)
+               self._thickness = thickness
+
+       def getName(self):
+               return "pyFXSThicknessShader"
+       def shade(self, stroke):
+               it = stroke.strokeVerticesBegin()
+               it_end = stroke.strokeVerticesEnd()
+               while it.isEnd() == 0:
+                       att = it.getObject().attribute()
+                       t = self._thickness/2.0
+                       att.setThickness(t, t)
+                       it.increment()
+
+class pyFXSVaryingThicknessWithDensityShader(StrokeShader):
+       def __init__(self, wsize, threshold_min, threshold_max, thicknessMin, thicknessMax):
+               StrokeShader.__init__(self)
+               self.wsize= wsize
+               self.threshold_min= threshold_min
+               self.threshold_max= threshold_max
+               self._thicknessMin = thicknessMin
+               self._thicknessMax = thicknessMax
+
+       def getName(self):
+               return "pyVaryingThicknessWithDensityShader"
+       def shade(self, stroke):
+               n = stroke.strokeVerticesSize()
+               i = 0
+               it = stroke.strokeVerticesBegin()
+               it_end = stroke.strokeVerticesEnd()
+               func = DensityF0D(self.wsize)
+               while it.isEnd() == 0:
+                       att = it.getObject().attribute()
+                       toto = it.castToInterface0DIterator()
+                       c= func(toto)
+                       if (c < self.threshold_min ):
+                               c = self.threshold_min
+                       if (c > self.threshold_max ):
+                               c = self.threshold_max
+##                     t = (c - self.threshold_min)/(self.threshold_max - self.threshold_min)*(self._thicknessMax-self._thicknessMin) + self._thicknessMin
+                       t = (self.threshold_max - c  )/(self.threshold_max - self.threshold_min)*(self._thicknessMax-self._thicknessMin) + self._thicknessMin
+                       att.setThickness(t/2.0, t/2.0)
+                       i = i+1
+                       it.increment()
+class pyIncreasingThicknessShader(StrokeShader):
+       def __init__(self, thicknessMin, thicknessMax):
+               StrokeShader.__init__(self)
+               self._thicknessMin = thicknessMin
+               self._thicknessMax = thicknessMax
+
+       def getName(self):
+               return "pyIncreasingThicknessShader"
+       def shade(self, stroke):
+               n = stroke.strokeVerticesSize()
+               i = 0
+               it = stroke.strokeVerticesBegin()
+               it_end = stroke.strokeVerticesEnd()
+               while it.isEnd() == 0:
+                       att = it.getObject().attribute()
+                       c = float(i)/float(n)
+                       if(i < float(n)/2.0):
+                               t = (1.0 - c)*self._thicknessMin + c * self._thicknessMax
+                       else:
+                               t = (1.0 - c)*self._thicknessMax + c * self._thicknessMin
+                       att.setThickness(t/2.0, t/2.0)
+                       i = i+1
+                       it.increment()
+
+class pyConstrainedIncreasingThicknessShader(StrokeShader):
+       def __init__(self, thicknessMin, thicknessMax, ratio):
+               StrokeShader.__init__(self)
+               self._thicknessMin = thicknessMin
+               self._thicknessMax = thicknessMax
+               self._ratio = ratio
+
+       def getName(self):
+               return "pyConstrainedIncreasingThicknessShader"
+       def shade(self, stroke):
+               slength = stroke.getLength2D()
+               tmp = self._ratio*slength
+               maxT = 0.0
+               if(tmp < self._thicknessMax):
+                       maxT = tmp
+               else:
+                       maxT = self._thicknessMax
+               n = stroke.strokeVerticesSize()
+               i = 0
+               it = stroke.strokeVerticesBegin()
+               it_end = stroke.strokeVerticesEnd()
+               while it.isEnd() == 0:
+                       att = it.getObject().attribute()
+                       c = float(i)/float(n)
+                       if(i < float(n)/2.0):
+                               t = (1.0 - c)*self._thicknessMin + c * maxT
+                       else:
+                               t = (1.0 - c)*maxT + c * self._thicknessMin
+                       att.setThickness(t/2.0, t/2.0)
+                       if(i == n-1):
+                               att.setThickness(self._thicknessMin/2.0, self._thicknessMin/2.0)
+                       i = i+1
+                       it.increment()
+
+class pyDecreasingThicknessShader(StrokeShader):
+       def __init__(self, thicknessMax, thicknessMin):
+               StrokeShader.__init__(self)
+               self._thicknessMin = thicknessMin
+               self._thicknessMax = thicknessMax
+
+       def getName(self):
+               return "pyDecreasingThicknessShader"
+       def shade(self, stroke):
+               l = stroke.getLength2D()
+               tMax = self._thicknessMax
+               if(self._thicknessMax > 0.33*l):
+                       tMax = 0.33*l
+               tMin = self._thicknessMin
+               if(self._thicknessMin > 0.1*l):
+                       tMin = 0.1*l
+               n = stroke.strokeVerticesSize()
+               i = 0
+               it = stroke.strokeVerticesBegin()
+               it_end = stroke.strokeVerticesEnd()
+               while it.isEnd() == 0:
+                       att = it.getObject().attribute()
+                       c = float(i)/float(n)
+                       t = (1.0 - c)*tMax +c*tMin
+                       att.setThickness(t/2.0, t/2.0)
+                       i = i+1
+                       it.increment()
+
+def smoothC( a, exp ):
+       c = pow(float(a),exp)*pow(2.0,exp)
+       return c
+
+class pyNonLinearVaryingThicknessShader(StrokeShader):
+       def __init__(self, thicknessExtremity, thicknessMiddle, exponent):
+               StrokeShader.__init__(self)
+               self._thicknessMin = thicknessMiddle
+               self._thicknessMax = thicknessExtremity
+               self._exponent = exponent
+
+       def getName(self):
+               return "pyNonLinearVaryingThicknessShader"
+       def shade(self, stroke):
+               n = stroke.strokeVerticesSize()
+               i = 0
+               it = stroke.strokeVerticesBegin()
+               it_end = stroke.strokeVerticesEnd()
+               while it.isEnd() == 0:
+                       att = it.getObject().attribute()
+                       if(i < float(n)/2.0):
+                               c = float(i)/float(n)
+                       else:
+                               c = float(n-i)/float(n)
+                       c = smoothC(c, self._exponent)
+                       t = (1.0 - c)*self._thicknessMax + c * self._thicknessMin
+                       att.setThickness(t/2.0, t/2.0)
+                       i = i+1
+                       it.increment()
+
+## Spherical linear interpolation (cos)
+class pySLERPThicknessShader(StrokeShader):
+       def __init__(self, thicknessMin, thicknessMax, omega=1.2):
+               StrokeShader.__init__(self)
+               self._thicknessMin = thicknessMin
+               self._thicknessMax = thicknessMax
+               self._omega = omega
+
+       def getName(self):
+               return "pySLERPThicknessShader"
+       def shade(self, stroke):
+               slength = stroke.getLength2D()
+               tmp = 0.33*slength
+               maxT = self._thicknessMax
+               if(tmp < self._thicknessMax):
+                       maxT = tmp
+               
+               n = stroke.strokeVerticesSize()
+               i = 0
+               it = stroke.strokeVerticesBegin()
+               it_end = stroke.strokeVerticesEnd()
+               while it.isEnd() == 0:
+                       att = it.getObject().attribute()
+                       c = float(i)/float(n)
+                       if(i < float(n)/2.0):
+                               t = sin((1-c)*self._omega)/sinh(self._omega)*self._thicknessMin + sin(c*self._omega)/sinh(self._omega) * maxT
+                       else:
+                               t = sin((1-c)*self._omega)/sinh(self._omega)*maxT + sin(c*self._omega)/sinh(self._omega) * self._thicknessMin
+                       att.setThickness(t/2.0, t/2.0)
+                       i = i+1
+                       it.increment()
+
+class pyTVertexThickenerShader(StrokeShader): ## FIXME
+       def __init__(self, a=1.5, n=3):
+               StrokeShader.__init__(self)
+               self._a = a
+               self._n = n
+
+       def getName(self):
+               return "pyTVertexThickenerShader"
+
+       def shade(self, stroke):
+               it = stroke.strokeVerticesBegin()
+               predTVertex = pyVertexNatureUP0D(Nature.T_VERTEX)
+               while it.isEnd() == 0:
+                       if(predTVertex(it) == 1):
+                               it2 = StrokeVertexIterator(it)
+                               it2.increment()
+                               if not(it.isBegin() or it2.isEnd()):
+                                       it.increment()
+                                       continue
+                               n = self._n
+                               a = self._a
+                               if(it.isBegin()):
+                                       it3 = StrokeVertexIterator(it)
+                                       count = 0
+                                       while (it3.isEnd() == 0 and count < n):
+                                               att = it3.getObject().attribute()
+                                               tr = att.getThicknessR();
+                                               tl = att.getThicknessL();
+                                               r = (a-1.0)/float(n-1)*(float(n)/float(count+1) - 1) + 1
+                                               #r = (1.0-a)/float(n-1)*count + a
+                                               att.setThickness(r*tr, r*tl)    
+                                               it3.increment()
+                                               count = count + 1
+                               if(it2.isEnd()):
+                                       it4 = StrokeVertexIterator(it)
+                                       count = 0
+                                       while (it4.isBegin() == 0 and count < n):
+                                               att = it4.getObject().attribute()