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
2013-02-23Fix for __repr__() depending on .getName() and .getExactTypeName().Tamito Kajiyama
API users no longer need to define them in user-defined Functions, Predicates and StrokeShaders. Also removed all .getName() and .getExactTypeName() definitions in pre-defined Functions, Predicates and StrokeShaders subclasses.
2013-02-23Minor docstring fixes.Tamito Kajiyama
2013-02-23Freestyle Python API improvements - part 7.Tamito Kajiyama
Fix for PyGetSetDef and proper handling of keyword arguments were done in UnaryPredicate0D, UnaryPredicate1D, BinaryPredicate1D, and StrokeShader classes. Style modules were updated accordingly. Additional code clean-up was also made.
2013-02-23Fixed typoes in docstrings.Tamito Kajiyama
2013-02-22Code clean-up: removed empty PyMethodDef.Tamito Kajiyama
2013-02-22Missing code updates in the previous commit.Tamito Kajiyama
Also improved __repr__() so that the .getName() is no longer necessary in user-defined Function0D and Function1D subclasses.
2013-02-22Freestyle Python API improvements - part 6.Tamito Kajiyama
Fix for PyGetSetDef and proper handling of keyword arguments were done in Function0D and Function1D classes. Additional code clean-up was also made.
2013-02-22Code clean-up: Py_TYPE(self)->tp_name instead of ((PyObject ↵Tamito Kajiyama
*)self)->ob_type->tp_name.
2013-02-22Attribute renaming: .exact_type_name --> .name. Also did a more generic ↵Tamito Kajiyama
implementation of the attribute (meant to be a shortcut of .__class__.__name__).
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-16Fix for pointers to auto variables returned from Python wrapper class methods.Tamito Kajiyama
The previous implementation was a quick workaround of C++ const references. Also removed the unused 'borrowed' flag from the Python wrapper of FrsMaterial.
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.
2013-02-16Fix for copy-and-paste bugs in Id rich comparison. Also made code style ↵Tamito Kajiyama
clean-up.
2013-02-15Fix compilation on linux (with gcc4.7).Bastien Montagne
Without const, I had the following error: /home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp: In function ‘PyObject* ViewMap_scene_bbox_get(BPy_ViewMap*, void*)’: /home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp:120:54: error: invalid initialization of non-const reference of type ‘BBox<VecMat::Vec3<double> >&’ from an rvalue of type ‘BBox<VecMat::Vec3<double> >’ In file included from /home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp:3:0: /home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_Convert.h:81:12: error: in passing argument 1 of ‘PyObject* BPy_BBox_from_BBox(BBox<VecMat::Vec3<double> >&)’ /home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp:121:1: warning: control reaches end of non-void function [-Wreturn-type] make[2]: *** [source/blender/freestyle/CMakeFiles/bf_freestyle.dir/intern/python/BPy_ViewMap.cpp.o] Erreur 1
2013-02-15Minor coding style clean-up.Tamito Kajiyama
2013-02-15Freestyle Python API improvements - part 3.Tamito Kajiyama
Major API updates were made to address code review comments. This revision mostly focuses on Python wrappers of C++ 0D and 1D elements (i.e., Interface0D and Interface1D, as well as their subclasses). * Most getter/setter methods were reimplemented as attributes using PyGetSetDef. Vector attributes are now implemented based on mathutils callbacks. Boolean attributes now only accept boolean values. * The __getitem__ method was removed and the Sequence protocol was used instead. * 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). Some naming inconsistency within the Freestyle Python API was also addressed. * The Freestyle API had a number of method names including prefix/suffix "A" and "B", and their meanings were inconsistent (i.e., referring to different things depending on the classes). The names with these two letters were replaced with more straightforward names. Also some attribute names were changed so as to indicate the type of the value (e.g., FEdge.next_fedge instead of FEdge.next_edge) in line with other names explicitly indicating what the value is (e.g., SVertex.viewvertex). * In addition, some code clean-up was done in both C++ and Python. Notes: In summary, the following irregular naming changes were made through this revision (those resulting from regular changes of naming conventions are not listed): - CurvePoint: {A,B} --> {first,second}_svertex - FEdge: vertex{A,B} --> {first,second}_svertex - FEdge: {next,previous}Edge --> {next,previous}_fedge - FEdgeSharp: normal{A,B} --> normal_{right,left} - FEdgeSharp: {a,b}FaceMark --> face_mark_{right,left} - FEdgeSharp: {a,b}Material --> material_{right,left} - FEdgeSharp: {a,b}MaterialIndex --> material_index_{right,left} - FrsCurve: empty --> is_empty - FrsCurve: nSegments --> segments_size - TVertex: mate() --> get_mate() - ViewEdge: fedge{A,B} --> {first,last}_fedge - ViewEdge: setaShape, aShape --> occlude - ViewEdge: {A,B} --> {first,last}_viewvertex - ViewMap: getScene3dBBox --> scene_bbox
2013-02-04* Added a generic helper function for parsing PyObject arguments as ↵Tamito Kajiyama
N-dimensional float array. * Local helpers were replaced with the generic one. This also fixed a memory leak in the setter function StrokeVertex_point_set. * Made minor code style changes.
2013-02-04* Fix for broken StrokeAttribute.visible setter function.Tamito Kajiyama
* Fix for a wrong vector element index in StrokeAttribute_mathutils_set in the case of MATHUTILS_SUBTYPE_COLOR. * Made minor code style changes.
2013-02-04Replaced PyTuple_SetItem by PyTuple_SET_ITEM when creating new tuples.Tamito Kajiyama
2013-02-03Freestyle Python API improvements - part 2.Tamito Kajiyama
The API syntax of FrsMaterial was updated by means of getter/setter properties. Python style modules (including the Parameter Editor) were updated accordingly.
2013-01-28Freestyle Python API improvements.Tamito Kajiyama
StrokeAttribute class methods were renamed from camel case to lower case plus underscore. Also made changes to shaders.pyTVertexOrientationShader that uses the affected methods.
2013-01-28Freestyle Python API improvements - part 1.Tamito Kajiyama
* The API syntax of StrokeVertex and StrokeAttribute was updated by means of getter/setter properties instead of class methods. Python style modules (including the Parameter Editor implementation) were updated accordingly. * Code clean-up was done for a few Python style modules, mostly by removing duplicated definitions of stroke shaders and fixing indentation.
2013-01-25Fix for no copy constructor in the Python wrapper of StrokeAttribute.Tamito Kajiyama
2013-01-09Fix for BPy_FrsMaterial docstring.Tamito Kajiyama
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!
2012-09-23Fix for a crash due to the changes in the trunk revision 50087 for thread ↵Tamito Kajiyama
safety in curve evaluation. Problem report from Vicente Carro with an example .blend file for reproducing the issue. Thanks!
2012-05-29Fix for the WithinImageBorderUP1D predicate not working with a ViewEdge such ↵Tamito Kajiyama
that none of the SVertices are within the image boundary but an FEdge intersects with the image boundary. The problem was reported by edna through the BA Freestyle thread, with a .blend file for reproducing the bug. Thanks!
2011-12-17Added SVertex::curvatures() in the Python API to retrieve curvatureTamito Kajiyama
information at a given SVertex.
2011-11-26Merged changes in the trunk up to revision 42116.Tamito Kajiyama
2011-10-30Fix for stroke rendering instability with stroke geometry shaders.Tamito Kajiyama
* Stroke::Resample(int nPoints) was not properly working when a wrong value was returned from Stroke::getLength2D(), resulting in repeated warning messages "Warning: incorrect points number" during stroke rendering. The main cause was that stroke geometry shaders did not update the two-dimensional (2D) length (also referred to as curvilinear abscissa) after they modified the 2D points of stroke vertices. Now all stroke geometry shaders make explicit calls for Stroke::UpdateLength() that has been introduced for recomputing the 2D length. Many thanks to Josef who reported the problem together with sample .blend files for reproducing the issue. * Missing Python wrapper of Stroke::getLength2D() was added.
2011-10-06Fine control of feature edge selection with mesh face and edge marks.Tamito Kajiyama
New "face marks" and "edge marks" have been introduced in mesh data blocks. In the edit mode of a mesh object, face marks can be put to selected faces by choosing Mesh >> Faces >> Mark Freestyle Face from the menu of a 3D View window or Ctrl-F >> Mark Freestyle Face from the context menu. Similarly, edge marks can be put to selected edges by Mesh >> Edges >> Mark Freestyle Edge or Ctrl-E >> Mark Freestyle Edge. These marks should work fine with the Subdivision surface modifier. Moreover, two new conditions for feature edge selection have been added to the Parameter Editor mode as described below: 1. The Selection by Edge Types option has now the new Edge Mark type, which can be used to (de)select feature edges having edge marks. This option can be used to add to (or remove from) the view map arbitrary edges of mesh objects. 2. Selection by Face Marks option has been newly introduced, in which face marks are used for feature edge selection in two ways. One option is called "One Face" which is to (de)select feature edges if one of faces on the left and right of each feature edge has a face mark. The other option is "Both Faces" to (de)select feature edges if both faces on the left and right have a face mark.
2011-09-11Implemented a calligraphic thickness modifier in the Parameter Editor mode.Tamito Kajiyama
Also fixed a typo in the docstring of the CalligraphicShader.
2011-08-19Added an optional argument 'seed' to the Freestyle.Noise class constructor.Tamito Kajiyama
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-07-21Merged changes in the trunk up to revision 38543.Tamito Kajiyama
Conflicts resolved: doc/python_api/sphinx_doc_gen.py source/blender/blenkernel/CMakeLists.txt source/blender/makesdna/DNA_material_types.h source/blender/render/intern/source/pipeline.c source/creator/CMakeLists.txt
2011-03-06Merged changes in the trunk up to revision 35367.Tamito Kajiyama
To branch builders: From this revision Python 3.2 will be used. Don't forget svn update in the "lib" directory as well.
2011-02-22Two minor fixes:Tamito Kajiyama
* Fixed a bug in MaterialF0D::operator() that an error condition was ignored due to a wrong return value. * Fixed a typo in the docstring of StrokeVertex::setPoint().
2011-01-31Made stroke rendering stability fixes, with the aim of addressingTamito Kajiyama
occasional unexpected long lines. 1. The Parameter Editor mode was extended to prevent strokes from doing quick U-turns that "enable" a known bug in strip creation that generates unexpected long lines in question. 2. A verbose warning message was added to make the existence of the strip creation bug visible to users. When the bug affects the stroke rendering, the following warning shows up in the console: > Warning: problem in strip creation (the strip is most likely doing a U-turn). 3. The extrapolation option of CurveMapping (used in alpha and thickness modifiers in the Parameter Editor mode) was identified as another source of unexpected long lines. Now the extrapolation option is unconditionally disabled (even when users enable it through the GUI).
2010-12-23Added Python wrappers for the following Operators static methods:Tamito Kajiyama
- getViewEdgeFromIndex() - getChainFromIndex() - getStrokeFromIndex()
2010-08-28Documentation updates: Added a class hierarchy that showsTamito Kajiyama
inheritance relationships among the classes defined in the Freestyle module.
2010-08-12Python API documentation updates: a description of class hierarchyTamito Kajiyama
was added to the docstrings of most Python extension types.
2010-07-28* Made the Parameter Editor mode much more functional. Edge selectionTamito Kajiyama
criteria, as well as the color/alpha/thickness Along Stroke modifiers now work. * Added more curve blend types. The default is set to "MIX".
2010-07-27Added helper functions to the Freestyle module:Tamito Kajiyama
* evaluateColorRamp() to evaluate a color ramp at a given point in the interval 0 to 1. * evaluateCurveMappingF() to evaluate a curve mapping at a given point in the interval 0 to 1.
2010-05-28Documentation updates: Replaced "string" with "str".Tamito Kajiyama
2010-05-28Fixed the __call__ method of UnaryFunction0DVectorViewShape andTamito Kajiyama
UnaryFunction1DVectorViewShape. The __call__ method now returns a list whose elements are either a ViewShape or None.
2010-05-23Made object names accessible from within style modules.Tamito Kajiyama
ViewShape objects in the view map, as well as SShape objects that can be retrieved with ViewShape::sshape(), now have a getName() method that returns the name of the object from which each shape is created. For instance, visible feature edges of specific mesh objects (e.g., Cube.001 and Cube.002) can be selected using custom predicate ObjectNamesUP1D as follows: class ObjectNamesUP1D(UnaryPredicate1D): def __init__(self, names): UnaryPredicate1D.__init__(self) self._names = names def getName(self): return "ObjectNamesUP1D" def __call__(self, viewEdge): return viewEdge.viewShape().getName() in self._names upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ObjectNamesUP1D(["Cube.001", "Cube.002"])) Operators.select(upred)
2010-05-23Fixed invalid use of PyUnicode_FromFormat() where PyUnicode_FromString()Tamito Kajiyama
should have been used.
2010-05-23Docstring update for Nature::MATERIAL_BOUNDARY (cf. revision 28919).Tamito Kajiyama
2010-05-23New option for detecting feature edges at material boundaries.Tamito Kajiyama
A checkbox "Material Boundaries" has been added to the Freestyle options in the Layers tab of the Render buttons. By enabling the option, any edge between two faces with different materials is detected as a feature edge. In style modules, edges at material boundaries can be tested with pyNatureUP1D(Nature.MATERIAL_BOUNDARY).
2010-05-22* Fix for a crash in StrokeVertexIterator::getObject().Tamito Kajiyama
* Minor docstring fixes.