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-03-17Fix for a crash due to a bug in the handling of singularity in stroke creation,Tamito Kajiyama
where additions of a small offset (to prevent vertices from being at the same point) were not properly done when vertices were shifted in the reverse order. A problem report by Vicente Carro through personal communications, thanks a lot!
2013-03-11Another big code clean-up patch from Bastien Montagne, thanks again!Tamito Kajiyama
2013-03-03Moved operations on blend file data from C++ class destructor to a specific ↵Tamito Kajiyama
method for releasing resources. Based on review comment from Campbell.
2013-02-23Fix for texture images left unreleased.Tamito Kajiyama
2013-02-13Fix for a crash when the Polygonization geometry modifier is used with a ↵Tamito Kajiyama
small "error" parameter value. The problem was caused by a null pointer reference in CurvePiece::error() resulting from incorrect lengths of subdivided curves calculated in CurvePiece::subdivide(). Problem report by IRIE Shinsuke with a GDB backtrace log, many thanks!
2013-01-22Fix for Stroke.Resample(float iSampling) and Stroke.UpdateLength() usingTamito Kajiyama
StrokeVertex.point2d() instead of .getPoint(). It is noted that .point2d() returns a 3-dimensional vector representing a 2D-projected point, with the z component indicating a normalized depth of the original 3D point, whereas .getPoint() returns a plain 2-dimensional vector. This fix should have been done in revision 48510... Also made fix for callers of Stroke.Resample() not calling stroke.UpdateLength().
2013-01-18A patch set from Bastien Montagne (thanks!) for silencing build warnings ↵Tamito Kajiyama
(from gcc 4.7), mostly by commenting out unused variables, or using the BLI's SET_UINT_IN_POINTER macro.
2013-01-04New command-line option --debug-freestyle to enable verbose debug messagesTamito Kajiyama
on the console during Freestyle rendering. The debug prints are turned off by default now. Errors are still printed on the console. A patch set implementing this functionality was provided by Bastien Montagne. Many thanks! :)
2012-12-29Another mega (literally :p) code clean-up patch by Bastien Montagne, thanks ↵Tamito Kajiyama
again!
2012-12-26Fix encoding (from ISO 8859-15 to utf8).Bastien Montagne
2012-12-12Fix for svn:executable.Tamito Kajiyama
Reported by Bastien Montagne, thanks!
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-23Merged changes in the trunk up to revision 50829.Tamito Kajiyama
Conflicts resolved: source/blender/blenloader/intern/readfile.c source/blender/render/intern/source/convertblender.c source/blender/render/intern/source/pipeline.c Also addressed code inconsistency due to changes in the trunk revision 50628 (color management with OCIO) and 50806 (UV project material). OCIO-related changes are marked OCIO_TODO as in some other files modified in revision 50628.
2012-07-03Fix for Stroke::Resample() in combination with the previous commit.Tamito Kajiyama
2012-07-03Fix for an inappropriate removal of singular points in stroke creation.Tamito Kajiyama
The previous stroke creation procedure was trying to clean stroke topology by removing overlapping stroke vertices in the same 2D location. The idea was to avoid having to address this kind of singularity during subsequent stroke shading. In-depth analyses revealed, however, that this was a wrong way to ensure clean stroke topology, since just deleting overlapping vertices may break the continuity of the underlying series of FEdges on top of which the stroke has been built. Such a break of linked FEdges was a major cause of frequent failure in CurvePoint::getFEdge(). The present commit aims to address the singularity issue by adding small offsets to the 2D location of overlapping vertices and making them non-overlapping to each other. Since the offsets only result in sub-pixel differences, the impact on visual outcomes is expected to be negligible.
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!
2012-04-22Suppressed a compiler warning about an empty controlled statement.Tamito Kajiyama
Reported by flokkievids, thanks!
2012-04-11New options for specifying unit line thickness.Tamito Kajiyama
The Post Processing tab in the Render buttons has new Line Thickness options for defining unit line thickness in two different modes as follows: 1. Absolute mode: The unit line thickness is given by a user-specified number in units of pixels. The default value is 1. 2. Relative mode: The unit line thickness is scaled by the proportion of the present vertical image resolution to 480 pixels. For instance, the unit line thickness is 1 with the image height set to 480, 1.5 with 720, and 2 with 960.
2012-01-20Removed a hard-coded limit that the backbone stretching effect was applied toTamito Kajiyama
stokes with 2D length longer than 50. Problem report by Forrest Gimp, thanks!
2011-12-11Fix for Operators.recursiveSplit() not able to split a chain within the last ↵Tamito Kajiyama
segment.
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-17Another attempt to fix the failure of SVertex::getFEdge due to a discontinuityTamito Kajiyama
of underlying FEdges introduced by chaining operations. The material of a smooth FEdge is identified by the material index of the FEdge and the array of materials in the SShape to which the first SVertex (i.e., vertexA) of the FEdge belong. The present fix makes sure that the material index refers to the intended array of materials, to avoid inconsistent reference and out-of-index errors that lead to a crash.
2011-10-16Fix for a failure of SVertex::getFEdge due to a discontinuity of underlying ↵Tamito Kajiyama
FEdges introduced by chaining operations. When two ViewEdges are concatenated by a chaining operator, the last vertex of one ViewEdge and the first vertex of the other reside in the same 3D position, so that the latter vertex is omitted. This caused a pair of SVertices unconnected by an FEdge. The present commit intends to fix this issue. The bug was reported by mato_sus304 with a .blend file reproducing the issue. Thanks!
2011-09-12Fix for a minor inconsistency in the use of stroke thickness values inTamito Kajiyama
Strip::createStrip().
2011-09-11Fix for the handling of stroke vertex orientation in Strip::createStrip().Tamito Kajiyama
2011-09-11Made an attempt to fix the long-standing issue of occasional infinite lines.Tamito Kajiyama
This is still not the best solution, but seems to yield much better results.
2011-08-31Fix for an error condition in CurvePoint::getFEdge() within the C++ layer.Tamito Kajiyama
The error was identified thanks to a problem report that MaterialF0D() failed when the Face Smoothness option was enabled.
2011-03-14Optimized view map calculation by Alexander Beels.Tamito Kajiyama
* View map calculation has been intensively optimized for speed by means of: 1) new spatial grid data structures (SphericalGrid for perspective cameras and BoxGrid for orthographic cameras; automatically switched based on the camera type); 2) a heuristic grid density calculation algorithm; and 3) new line visibility computation algorithms: A "traditional" algorithm for emulating old visibility algorithms, and a "cumulative" algorithm for improved, more consistent line visibility, both exploiting the new spatial grid data structures for fast ray casting. A new option "Raycasting Algorithm" was added to allow users to choose a ray casting (line visibility) algorithm. Available choices are: - Normal Ray Casting - Fast Ray Casting - Very Fast Ray Casting - Culled Traditional Visibility Detection - Unculled Traditional Visibility Detection - Culled Cumulative Visibility Detection - Unculled Cumulative Visibility Detection The first three algorithms are those available in the original Freestyle (the "normal" ray casting was used unconditionally, though). The "fast" and "very fast" ray casting algorithms achieve a faster calculation at the cost of less visibility accuracy. The last four are newly introduced optimized options. The culled versions of the new algorithms will exclude from visibility calculation those faces that lay outside the camera, which leads to a faster view map construction. The unculled counterparts will take all faces into account. The unculled visibility algorithms are useful when culling affects stroke chaining. The recommended options for users are the culled/unculled cumulative visibility algorithms. These options are meant to replace the old algorithms in the future. Performance improvements over the old algorithms depend on the scenes to be rendered. * Silhouette detection has also been considerably optimized for speed. Performance gains by this optimization do not depend on scenes. * Improper handling of error conditions in the view map construction was fixed.
2011-02-27Fixed possible memory leaks due to errors in user-defined style modules.Tamito Kajiyama
Error handling in Operators::Chain(), Operators::bidirectionalChain(), and Operators::create() was improved to release allocated data structures when errors raised in user-defined predicates, chaining iterators, and shaders.
2011-02-22Consolidation of stroke drawing.Tamito Kajiyama
Fixed a complicated bug that caused a failure of CurvePoint::getFEdge() which had affected a number of C/Python API functions such as MaterialF0D. The current view map building procedure may generate ViewEdges whose two-dimensional (2D) length is almost or exactly zero. Such a zero-length ViewEdge is possibly chained with other ViewEdges to form a stroke. When the stroke is finally generated by Operators::create(), an attempt to remove redundant vertices at the same 2D point is made. This possibly breaks the links of ViewEdges on top of which the stroke has been built, and eventually result in a fatal error of CurvePoint::getFEdge() when API functions that rely on this method are called from within a style module. The present fix addresses this issue by automatically removing zero-length ViewEdges (and Chains of them) before stroke drawing is started and after splitting is performed (e.g., using Operators::sequentialSplit()).
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-07* Fix for a freeze issue in stroke rendering when using round/square caps.Tamito Kajiyama
The problem was caused by a stroke with only one vertex. Such a stroke was generated when for some unknown reason a chained curve consisted of only two vertices such that their 3D positions were exactly or almost the same. * Fix for the Parameter Editor mode that failed when scene render layers and/or linesets contain a single quote in their names.
2010-10-30Yet another attempt to fix a fatal error in the constructor of theTamito Kajiyama
CurvePoint class (cf. revision 32688). Also added a few printf calls for debugging, with the aim of making bug reports more informative. Problem reported by edna in the BA Freestyle thread together with a .blend file for reproducing the fatal error, thanks!
2010-10-24* Another attempt to fix the bug partly addressed in revision 31419.Tamito Kajiyama
* Fix for the missing function declaration of strcpy. This caused a linker error in the Debug build with x64 VC 2008 and CMake.
2010-10-19Merged changes in the trunk up to revision 32565.Tamito Kajiyama
2010-08-17Fix for a bug in a CurvePoint constructor that caused a crash.Tamito Kajiyama
This bug was related to an instability issue of SamplingShader.
2010-07-26* Implemented the basic stroke rendering functionality for the newTamito Kajiyama
Parameter Editor mode. This is a WIP commit. Only the base line color, base alpha transparency, and base line thickness are respected. More additions are anticipated to account for other parameters. * Added FRS_finish_stroke_rendering() to clean Freestyle-related temporary resources after stroke rendering. * Some functions in FRS_freestyle.cpp are now declared as static functions, so as not to mess up the program-wide name space. * Made the StyleModule class inheritable, and defined new subclass BlenderStyleModule that takes a Text object instead of a file name.
2010-07-05Bug fixes from Stéphane Grabli, one of the coauthors of theTamito Kajiyama
original Freestyle: * Fix for making the stroke construction more robust to nearly overlapping vertices. * Fix for a bug in the computation of the occluded surfaces. These changes make the visibility computation more robust and the line quality generally higher.
2010-05-09Fixed the flags argument of IMB_saveiff calls.Tamito Kajiyama
2010-05-09Merged changes in the trunk up to revision 28685.Tamito Kajiyama
2010-04-08Got rid of a number of compiler warnings with regard to redefinitionsTamito Kajiyama
of _POSIX_C_SOURCE and _XOPEN_SOURCE. There are no functional changes. Tested with GCC 4.4.1 on Ubuntu 9.10 (karmic).
2009-10-15* Fixed compiler warnings concerning the lack of a newline at theTamito Kajiyama
end of a file. * Fixed compiler warnings due to an invalid argument to PyList_New(). NULL was used instead of 0 to create an empty list.
2009-10-05moved all Blender-Freestyle interface-related files to ↵Maxime Curioni
source/freestyle/intern/blender_interface folder
2009-09-28Migration of Freestyle to Blender 2.5 codebase (continued):Maxime Curioni
- proper Freestyle initialization, with support for undo/redo - re-added FreestyleStyleConfig data structure - Freestyle Python interpreter updated This commit should compile without errors. More work is necessary to complete the migration: - add Freestyle in the UI - set up RNA support
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-07-25Fixed a problem related to AdjacencyIterator. In the Python layer,Tamito Kajiyama
AdjacencyIterator::isBegin() and AdjacencyIterator::isEnd() always returned a False value and printed a "not implemented" warning message. This caused an infinite loop in a few chaining iterators, resulting in a crash of the program. The origin of the issue seemed to be a fact that in the C++ layer, the AdjacencyIterator class had not properly overloaded the definitions of the methods in the Iterator superclass. The fix here looks okay, although I'm not sure why this inconsistency was not addressed for a long time.
2009-07-23Second attempt for properly releasing temporary objects and their dataTamito Kajiyama
blocks in BlenderStrokeRenderer::~BlenderStrokeRenderer().
2009-07-22Made changes for releasing temporary objects and their data blocksTamito Kajiyama
in BlenderStrokeRenderer::~BlenderStrokeRenderer().
2009-04-09Corrected memory deallocation error on exitMaxime Curioni