Commit Graph

15 Commits

Author SHA1 Message Date
f1a989f9c3 Fix crash in freestyle vector parsing (hard to believe nobody noticed)
Vectors were being assigned as an array of classes in Vec2f_ptr_from_PyObject and similar functions,
rather then assigning a number to each axis.
2013-12-17 18:01:15 +11:00
8c5597eb49 Additional code improvements: avoid unnecessary Python object allocations in Freestyle. 2013-11-05 00:51:59 +00:00
829a2cc1b0 remove blender foundation copyright from freestyle files.
this can be added back on case-by-case basis, but better not assume ownership of another projects work by default.
2013-03-31 01:11:07 +00:00
4a92d82626 A big code clean-up patch from Bastien Montagne, many thanks! 2013-03-07 23:17:23 +00:00
3df023ae82 Freestyle Python API improvements - part 8.
* Proper handling of keyword arguments was implemented in Operators and ContextFunctions,
as well as in methods of Interface0D, Interface1D, Iterator, their subclasses, Noise and
IntegrationType.

* Operators' methods and functions in the ContextFunctions module were renamed from
CamelCase to lower cases + underscores.  Style modules were updated accordingly.

* Additional code clean-up was also made.
2013-02-24 02:39:38 +00:00
ad7c43744c Added GNU GPL header blocks. 2013-02-23 18:32:28 +00:00
4ec69d5a2b Added an optional argument 'seed' to the Freestyle.Noise class constructor.
The value is used as a seed for random number generation if it is equal to
or greater than zero; otherwise, time is used as a seed.
2011-08-18 23:07:17 +00:00
2385c51360 Renamed FrsCurve, FrsNoise and FrsMaterial Python extension types
to those names without the "Frs" prefix.  These types are part of
the Freestyle module, so that there is no need to make their names
globally unique.
2010-05-09 18:05:33 +00:00
dfe2f8dc03 Merged changes in the trunk up to revision 28247. 2010-04-18 02:03:19 +00:00
d7e08f2d33 Major documentation updates. The original Freestyle API reference
(http://freestyle.sourceforge.net/doc/html/index.html) has been
incorporated into the Blender/Freestyle Python API implementation
in the form of Sphinx-based embedded docstrings.  Some C++-specific
descriptions of classes and functions were revised so that they are
suitable for Python programmers.  Missing docstrings were filled,
and sparse descriptions were extended.  By means of the new
documentation system for Blender, an up-to-date Freestyle Python
API reference will be part of the Blender 2.5 documentation.
2010-04-17 23:47:47 +00:00
069d21dddf Made the Freestyle Python API compatible with Python 3. 2009-09-27 00:32:20 +00:00
fec3ddabb1 * Better support for vector-like objects in method arguments.
Now the following methods in the Freestyle Python API accept
not only Blender.Mathutils.Vector instances but also lists and
tuples having an appropriate number of elements.

  FrsNoise::turbulence2()
  FrsNoise::turbulence3()
  FrsNoise::smoothNoise2()
  FrsNoise::smoothNoise3()
  SVertex::__init__()
  SVertex::setPoint3D()
  SVertex::setPoint2D()
  SVertex::AddNormal()
  FEdgeSharp::setNormalA()
  FEdgeSharp::setNormalB()
  FEdgeSmooth::setNormal()
  CalligraphicShader::__init__()
  StrokeAttribute::setAttributeVec2f()
  StrokeAttribute::setAttributeVec3f()
  StrokeAttribute::setColor()
  StrokeVertex::setPoint()

* Added the following converters for the sake of the improvements
mentioned above.

  Vec2f_ptr_from_PyObject()
  Vec3f_ptr_from_PyObject()
  Vec3r_ptr_from_PyObject()
  Vec2f_ptr_from_PyList()
  Vec3f_ptr_from_PyList()
  Vec3r_ptr_from_PyList()
  Vec2f_ptr_from_PyTuple()
  Vec3f_ptr_from_PyTuple()
  Vec3r_ptr_from_PyTuple()

Those converters with the suffixes _PyList and _PyTuple accept
only lists and tuples having an appropriate number of elements,
respectively, while those with the suffix _PyObject accept lists,
tuples, or Blender.Mathutils.Vector instances.

* Fixed a null pointer reference in Interface0D___dealloc__().

* Corrected the names of 3 methods in the FEdgeSmooth class.
2009-07-25 11:27:18 +00:00
3c60dd404e * fixed uninitialized variables.
* fixed a bug that was introduced in the last commit.
2009-03-30 19:25:27 +00:00
a377b74638 Improvements on error handling in the Python API. 2009-03-29 21:50:10 +00:00
Maxime Curioni
149f3688a4 soc-2008-mxcurioni: moved Curve to FrsCurve, fixed bugs with some style modules having with strokes without a representation and iterators not being correctly routed. For example, the cartoon style module should work now. 2008-08-01 02:15:25 +00:00