Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-06-17Cleanup: trailing space for freestyleCampbell Barton
2016-07-02Cleanup: comment blocksCampbell Barton
2015-10-26Fix T46604: Crash in ChainPredicateIterator instantiated without predicates.Tamito Kajiyama
Also fixed a potential crash in the copy constructor case.
2015-02-06cleanup: styleCampbell Barton
2014-10-10Freestyle: Fix for memory leaks in StrokeVertexIterator.Tamito Kajiyama
The issues identified here are regression from 2.71, so the present code revision is appropriate for backporting if 2.72a is planned.
2014-10-10Freestyle: Fix for StrokeVertexIterator.__next__() ignoring the first and ↵Tamito Kajiyama
only element. A StrokeVertexIterator ignores the first element when it is the only element. Such an iterator can be created by the .incremented() method from an iterator over two stroke vertices. This problem is a regression from 2.71. The present fix is appropriate to backport if Blender 2.72a is planned. Problem report by Kazuhiro Murakawa through personal communications, thanks!
2014-09-19Freestyle: Python API documentation updates.Tamito Kajiyama
Fixed dead references of API identifiers (e.g., freestyle.types.Interface0D) due to relocations of the identifiers into submodules. Also made various minor revisions of mark-ups and typos.
2014-09-18Fix for missing Freestyle sections in the Blender Python API documentation.Tamito Kajiyama
Freestyle sections of the API docs were empty due to Freestyle module reorganization in commit rB6498b96ce7081db039354228213d72e8c70bd3aa. Module __all__ property was added to submodules so as to properly exclude irrelevant documentation elements such as mathutils.Vector.
2014-09-02Better fix for T41464: Material Boundary bug in Freestyle.Tamito Kajiyama
The problem addressed here is that there was no mean to check if an iterator points the last of the elements being iterated over. Such checking is necessary to reliably dereference the iterator (i.e., calling the operator*() method of the underlying C++ iterator object). Now Interface0DIterator and StrokeVertexIterator have an .at_last property to check if an iterator points the last element. Using this new API feature, the present commit partly reverts the previous commit rBeb8964fb7f19 to better address T41464. Differential revision: https://developer.blender.org/D752 Author: flokkievids (Folkert de Vries) Reviewed by: kjym3 (Tamito Kajiyama)
2014-07-13Freestyle: minor docstring fixes.Tamito Kajiyama
2014-07-09Freestyle: fix for crash in the constructor of ↵Tamito Kajiyama
freestyle.types.StrokeVertexIterator.
2014-06-16Freestyle: Python API docstring updates.Tamito Kajiyama
2014-06-16D545: Freestyle Python API: new methods for Stroke and StrokeVertexIterator.Tamito Kajiyama
This revision extends the Freestyle Python API to make for style module writing easier. - freestyle.types.Stroke: A proper support for reversed() is implemented. It works the same with other Python sequence objects (returns an iterator starting from the end). This is in effect equivalent to Stroke.stroke_vertices_end(). - freestyle.types.StrokeVertexIterator: An incremented, decremented and reversed method are added. The first two methods return a new StrokeVertexIterator object that has been incremented and decremented, respectively. The reversed method returns a new StrokeVertexIterator object that will traverse stroke vertices in the opposite direction. - freestyle.types.Interface0DIterator: Its constructor now accepts a Stroke object to create an Interface0DIterator that traverses stroke vertices. This is in effect equivalent to Stroke.vertices_begin(). The new API makes stroke shaders involving function calls much simpler as illustrated below: # in the old API it = stroke.stroke_vertices_begin() for vert in it: result = somefunc(Interface0DIterator(it)) # in the new API it = Interface0DIterator(stroke) for vert in it: result = somefunc(it) Differential Revision: https://developer.blender.org/D545 Reviewers: kjym3
2014-06-05Freestyle: Fix for Interface0DIterator.object docstring with additional notes.Tamito Kajiyama
2014-04-17Freestyle: removed unnecessary #include files and made minor code cleanup.Tamito Kajiyama
2014-04-17Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 2).Tamito Kajiyama
(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of the problem). Fixed for #include <Python.h> not properly put in the extern "C" { ... } construct. Also removed redundant inclusion of the header file in the Freestyle Python API code.
2014-02-03Code cleanup: white space and cmake was broken on all platformsCampbell Barton
2014-02-02Freestyle: Fix for iterations over 0D elements in the reversed order.Tamito Kajiyama
The revision is concerned with Interface0DIterator and StrokeVertexIterator. These iterators can be generated by Interface1D::vertices_end() and Stroke::stroke_vertices_end(), respectively. These methods return an iterator poinitng the next index of the last 0D element (i.e., iterator's is_end property is true). When the iterators created in this way are used with Python's iterator protocol (e.g., in a for-loop), iterations over 0D elements are automatically performed in the reversed order. This functionality was broken after recent revisions concerning Freestyle iterators. Also made minor code cleanup (white space).
2014-02-02Docstring updates and code cleanup by flokkievids (Folkert de Vries).Tamito Kajiyama
2014-02-02Code cleanup (mostly indentation and white space).Tamito Kajiyama
2014-02-02Imported D222 Diff 2 (ID 781) by flokkievids (Folkert de Vries).Tamito Kajiyama
2013-11-22Code Cleanup: int pointer comparisonCampbell Barton
2013-11-17Freestyle: a follow-up fix of trunk revision 61233. When an iterator has ↵Tamito Kajiyama
reached the end, any reference of the object pointed by it will now lead to a RuntimeError instead of returning None, with the aim of forcing Python API users to check the end of iteration rather than implicitly indicating the error condition. Acknowledgement to flokkievids for API discussions in the BlenderArtists.org Freestyle for Blender thread.
2013-11-12Fix #37092 and #37381: crashes in the .object() method of Freestyle iterators.Tamito Kajiyama
Now the method checks if the iterator is at the end, and returns None if that is the case.
2013-03-31remove blender foundation copyright from freestyle files.Campbell Barton
this can be added back on case-by-case basis, but better not assume ownership of another projects work by default.
2013-03-08A big code clean-up patch from Bastien Montagne, many thanks!Tamito Kajiyama
2013-02-24Freestyle Python API improvements - part 8.Tamito Kajiyama
* 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-24Code clean-up and fix for typos in docstrings.Tamito Kajiyama
2013-02-23Code style clean-up.Tamito Kajiyama
2013-02-23Added GNU GPL header blocks.Tamito Kajiyama
2013-02-21Freestyle Python API improvements - part 5.Tamito Kajiyama
Handling of keyword arguments in Python wrapper class constructors was revised. This revision is mainly focused on Interface0D, Interface1D, Iterator, and their subclasses, as well as a few additional view map component classes. Implementation notes: Because of the extensive use of constructor overloading in the underlying C++ classes, the corresponding Python wrappers try to parse arguments through multiple calls of PyArg_ParseTupleAndKeywords() if needed. The downside of this implementation is that most argument errors result in the same error message ("invalid argument(s)") without indicating what is wrong. For now this issue is left for future work. * Now the instantiation of ViewVertex is prohibited since the underlying C++ class is an abstract class. * Removed the .cast_to_interface0diterator() method from CurvePointIterator and StrokeVertexIterator. Instead the constructor of Interface0DIterator now accepts the instances of these two iterator classes to construct a nested Interface0DIterator instance that can be passed to Function0D functor objects. Specifically, an iterator 'it' is passed to a functor 'func' as follows: func(Interface0DIterator(it)) instead of: func(it.cast_to_interface0diterator()) * Boolean arguments of class constructors only accept values of boolean type. Input values of other types are considered as error. * Additional code clean-up was made.
2013-02-16Made code style clean-up and fixed a typo in a docstring.Tamito Kajiyama
2013-02-16Freestyle Python API improvements - part 4.Tamito Kajiyama
Major API updates were made as in part 3 to address code review comments. This revision focuses on Python wrappers of C++ iterators. * Most getter/setter methods were reimplemented as attributes using PyGetSetDef. * The naming of methods and attributes was fixed to follow the naming conventions of the Blender Python API (i.e., lower case + underscores for methods and attributes, and CamelCase for classes). The only irregular naming change is the following, to better indicate the functionality: - ChainingIterator: getVertex --> next_vertex * In addition, some code clean-up was done in both C++ and Python. Also duplicated definitions of predicate classes were removed.
2012-12-09Fix for a number of compiler warnings as well as a bug hidden by the warnings.Tamito Kajiyama
Patch contribution by Bastien Montagne, thanks!
2010-08-12Python API documentation updates: a description of class hierarchyTamito Kajiyama
was added to the docstrings of most Python extension types.
2010-05-22* Fix for a crash in StrokeVertexIterator::getObject().Tamito Kajiyama
* Minor docstring fixes.
2010-05-15Minor docstring fixes.Tamito Kajiyama
2010-04-18Major documentation updates. The original Freestyle API referenceTamito Kajiyama
(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-08Replaced PyObject_HEAD_INIT(NULL) with PyVarObject_HEAD_INIT(NULL, 0)Tamito Kajiyama
in the definitions of Python wrappers.
2009-09-27Made the Freestyle Python API compatible with Python 3.Tamito Kajiyama
2009-08-02SWIG/directors dependency removal (cont'd)Tamito Kajiyama
* Added to python/BPy_Convert.{cpp,h} 4 utility converters below for better introspection-based automatic type conversion. PyObject * Any_BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * Any_BPy_Interface1D_from_Interface1D( Interface1D& if1D ); PyObject * Any_BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * Any_BPy_ViewVertex_from_ViewVertex( ViewVertex& vv ); There are 4 corresponding converters without the "Any_" prefix. All calls of them in the code base were replaced with these new converters so that the introspection-based automatic conversion would take place universally. * python/BPy_Convert.{cpp,h}: Those C++ to Python converters having had a "_ptr" suffix were renamed to a name without the suffix, and their arguments were changed so as to take a reference (e.g., ViewVertex&) instead of a pointer (e.g., ViewVertex *). The changed converters and their new function prototypes are listed below. These converters now return a Python wrapper object that retains the passed reference, instead of retaining a newly created C++ object by the converters. // Interface0D converters PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ); PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ); PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); PyObject * BPy_ViewVertex_from_ViewVertex( ViewVertex& vv ); PyObject * BPy_TVertex_from_TVertex( TVertex& tv ); PyObject * BPy_NonTVertex_from_NonTVertex( NonTVertex& ntv ); // Interface1D converters PyObject * BPy_Interface1D_from_Interface1D( Interface1D& if1D ); PyObject * BPy_Chain_from_Chain( Chain& c ); PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * BPy_FEdgeSharp_from_FEdgeSharp( FEdgeSharp& fes ); PyObject * BPy_FEdgeSmooth_from_FEdgeSmooth( FEdgeSmooth& fes ); PyObject * BPy_Stroke_from_Stroke( Stroke& s ); PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ); PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve ); // some other converters PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ); PyObject * BPy_SShape_from_SShape( SShape& ss ); PyObject * BPy_FrsMaterial_from_FrsMaterial( FrsMaterial& m ); PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ); * Added a "borrowed" flag to the definitions of Python types being used to wrap C++ components of Freestyle's internal data structures. The flag indicates whether or not a Python wrapper object has a reference to a C++ object that comprises the internal data structures. The deallocation routines of the Python types check this flag and release a wrapped C++ object only when it is not part of the internal data structures. The following files were modified: python/BPy_FrsMaterial.{cpp,h} python/BPy_Interface0D.{cpp,h} python/BPy_Interface1D.{cpp,h} python/BPy_SShape.{cpp,h} python/BPy_StrokeAttribute.{cpp,h} python/BPy_ViewShape.{cpp,h} python/Interface0D/BPy_CurvePoint.cpp python/Interface0D/BPy_SVertex.cpp python/Interface0D/BPy_ViewVertex.cpp python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp python/Interface0D/ViewVertex/BPy_NonTVertex.cpp python/Interface0D/ViewVertex/BPy_TVertex.cpp python/Interface1D/BPy_FEdge.cpp python/Interface1D/BPy_FrsCurve.cpp python/Interface1D/BPy_Stroke.cpp python/Interface1D/BPy_ViewEdge.cpp python/Interface1D/Curve/BPy_Chain.cpp python/Interface1D/FEdge/BPy_FEdgeSharp.cpp python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp * view_map/Interface[01]D.h, python/BPy_Interface[01]D.cpp: Removed from the Interface0D and Interface1D C++ classes a back pointer to a Python wrapper object and all "director" calls. These classes (and their subclasses) are used to build Freestyle's main data structures (such as a view map and strokes) and their class hierarchy is static. Python wrappers of these C++ classes are only used to access the data structures from the Python layer, and not intended to extend the data structures by subclassing the Python wrappers. Without the necessity of subclassing in the Python layer, the back pointer to a wrapping Python object and "director" calls would be useless (actually they were not used at all), so they were all removed. * python/Director.{cpp,h}: Removed the definitions of directors that were no longer used. * stroke/Stroke.{cpp,h}: Removed an (unused) back pointer to a Python wrapper object. * python/BPy_ViewMap.cpp: Fixed a possible null pointer reference. * python/Interface1D/BPy_FEdge.cpp: Fixed parameter checking in FEdge___init__().
2009-08-01* Implemented Python's iterator protocol in Interface0DIterator andTamito Kajiyama
orientedViewEdgeIterator. * Simplified Python-related error handling in C++ class definitions. The definitions of the following C++ methods were simplified and most code segments using the C/Python API were moved to Director.cpp. ChainingIterator::init() ChainingIterator::traverse() UnaryPredicate0D::operator()() UnaryPredicate1D::operator()() BinaryPredicate0D::operator()() BinaryPredicate1D::operator()() UnaryFunction0D::operator()() UnaryFunction1D::operator()() StrokeShader.shade() * Moved part of the introspection-based automatic type conversion code from BPy_Interface0DIterator.cpp and Director.cpp to BPy_Convert.cpp for the sake of better code organization. * Fixed an uninitialized member in StrokeVertexIterator___init__().
2009-08-01Fixed typoes in error messages.Tamito Kajiyama
2009-07-29Added minor changes.Tamito Kajiyama
2009-07-29Added changes to the AdjacencyIterator type to support Python'sTamito Kajiyama
iterator protocol. Now the following code in the conventional SWIG-based syntax: it = AdjacencyIterator(iter) while not it.isEnd(): ve = it.getObject() ... it.increment() can be written using the iterator protocol as follows: for ve in AdjacencyIterator(iter): ...
2009-07-29Implemented a measure to avoid an infinite loop triggered whenTamito Kajiyama
ChainingIterator::init() and ChainingIterator::traverse() were not properly overloaded in a subclass.