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
2009-04-04Improvements on error handling in the Python API.Tamito Kajiyama
2009-04-04Relaxed type checking concerning boolean arguments so that not onlyTamito Kajiyama
True and False but also various other boolean expressions (e.g., 0, 1, and None) are accepted.
2009-04-04Relaxed type checking concerning boolean arguments in class constructorsTamito Kajiyama
and __call__ methods so that not only True and False but also various other boolean expressions (e.g., 0, 1, and None) are accepted.
2009-04-02Fixed an error checking in Curvature2DAngleF0D::operator().Tamito Kajiyama
Now the function results in 0 (radian) if the given Interface0DIterator object has only 2 vertices, which is not considered an error.
2009-04-01Added getExactTypeName() method.Tamito Kajiyama
2009-04-01Improvements on error handling in the Python API.Tamito Kajiyama
2009-03-30* fixed uninitialized variables.Tamito Kajiyama
* fixed a bug that was introduced in the last commit.
2009-03-30Improvements on error handling in the Python API.Tamito Kajiyama
2009-03-30* improved error handling in CurvePointIterator constructor.Tamito Kajiyama
* changed CurvePointIterator::getObject() according to the changes in revision 19456.
2009-03-30* Added BPy_Chain_from_Chain_ptr().Tamito Kajiyama
* Changed BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ) to BPy_CurvePoint_from_CurvePoint_ptr( CurvePoint *cp ) so that it retains a CurvePoint pointer instead of a CurvePoint instance.
2009-03-29Fixed a typo in the last commit.Tamito Kajiyama
2009-03-29Improvements on error handling in the Python API.Tamito Kajiyama
2009-03-22Freestyle was changed from a tile-based process to a post-processing effect. ↵Maxime Curioni
This will allow style modules to process the underlying color buffer ( AppCanvas::readColorPixels ) and depth buffer ( AppCanvas::readDepthPixels ), as was supported in the original program. Corrected crash when Freestyle is rendered in "Single" render layer mode (for example, in the compositor)
2009-03-21Removed the declaration of an undefined static function, to suppress a ↵Tamito Kajiyama
compiler warning. Also made minor changes to make IntegrationType a subclass of the built-in int type.
2009-03-21Corrected stroke/Operators.cpp to compile without warningsMaxime Curioni
Cleaned up comments
2009-03-21Fixed editing errors in the last commit...Tamito Kajiyama
2009-03-21Made changes to the C++ API in order to allow for proper errorTamito Kajiyama
propagation up to the toplevel error handler in BPY_txt_do_python_Text(). Before these changes were made, the operator() methods of predicates and functions, for example, returned a value of various types such as bool, double and Vec2f. These returned values were not capable to represent an error state in many cases. Now the operator() methods always return 0 on normal exit and -1 on error. The original returned values are stored in the "result" member variables of the predicate/function classes. This means that if we have a code fragment like below: UnaryPredicate1D& pred; Interface1D& inter; if (pred(inter)) { /* do something */ } then we have to rewrite it as follows: UnaryPredicate1D& pred; Interface1D& inter; if (pred(inter) < 0) return -1; /* an error in pred() is propagated */ if (pred.result) { /* do something */ } Suppose that pred is a user-defined predicate in Python, i.e. the predicate is likely error-prone (especially when debugging the predicate). The first code fragment shown above prevents the proper error propagation because the boolean return value of UnaryPredicate1D::operator() cannot inform the occurrence of an error to the caller; the second code fragment can. In addition to the operator() methods of predicates and functions, similar improvements have been made to all other C++ API functions and methods that are involved in the execution of user-defined Python code snippets. Changes in the signatures of functions and methods are summarized as follows (note that all subclasses of listed classes are also subject to the changes). Old signatures: virtual void Iterator::increment(); virtual void Iterator::decrement(); virtual void ChainingIterator::init(); virtual ViewEdge * ChainingIterator::traverse(const AdjacencyIterator &it); static void Operators::select(UnaryPredicate1D& pred); static void Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred, UnaryFunction1D_void& modifier); static void Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred); static void Operators::bidirectionalChain(ChainingIterator& it, UnaryPredicate1D& pred); static void Operators::bidirectionalChain(ChainingIterator& it); static void Operators::sequentialSplit(UnaryPredicate0D& startingPred, UnaryPredicate0D& stoppingPred, float sampling = 0); static void Operators::sequentialSplit(UnaryPredicate0D& pred, float sampling = 0); static void Operators::recursiveSplit(UnaryFunction0D<double>& func, UnaryPredicate1D& pred, float sampling = 0); static void Operators::recursiveSplit(UnaryFunction0D<double>& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling = 0); static void Operators::sort(BinaryPredicate1D& pred); static void Operators::create(UnaryPredicate1D& pred, vector<StrokeShader*> shaders); virtual bool UnaryPredicate0D::operator()(Interface0DIterator& it); virtual bool BinaryPredicate0D::operator()(Interface0D& inter1, Interface0D& inter2); virtual bool UnaryPredicate1D::operator()(Interface1D& inter); virtual bool BinaryPredicate1D::operator()(Interface1D& inter1, Interface1D& inter2); virtual void StrokeShader::shade(Stroke& ioStroke) const; virtual T UnaryFunction0D::operator()(Interface0DIterator& iter); virtual T UnaryFunction1D::operator()(Interface1D& inter); New signatures: virtual int Iterator::increment(); virtual int Iterator::decrement(); virtual int ChainingIterator::init(); virtual int ChainingIterator::traverse(const AdjacencyIterator &it); static int Operators::select(UnaryPredicate1D& pred); static int Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred, UnaryFunction1D_void& modifier); static int Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred); static int Operators::bidirectionalChain(ChainingIterator& it, UnaryPredicate1D& pred); static int Operators::bidirectionalChain(ChainingIterator& it); static int Operators::sequentialSplit(UnaryPredicate0D& startingPred, UnaryPredicate0D& stoppingPred, float sampling = 0); static int Operators::sequentialSplit(UnaryPredicate0D& pred, float sampling = 0); static int Operators::recursiveSplit(UnaryFunction0D<double>& func, UnaryPredicate1D& pred, float sampling = 0); static int Operators::recursiveSplit(UnaryFunction0D<double>& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling = 0); static int Operators::sort(BinaryPredicate1D& pred); static int Operators::create(UnaryPredicate1D& pred, vector<StrokeShader*> shaders); virtual int UnaryPredicate0D::operator()(Interface0DIterator& it); virtual int BinaryPredicate0D::operator()(Interface0D& inter1, Interface0D& inter2); virtual int UnaryPredicate1D::operator()(Interface1D& inter); virtual int BinaryPredicate1D::operator()(Interface1D& inter1, Interface1D& inter2); virtual int StrokeShader::shade(Stroke& ioStroke) const; virtual int UnaryFunction0D::operator()(Interface0DIterator& iter); virtual int UnaryFunction1D::operator()(Interface1D& inter);
2009-03-21Added getExactTypeName() method.Tamito Kajiyama
2009-03-21Fixed an uninitialized variable.Tamito Kajiyama
2009-03-21Improvements in error handling at Python-C++ boundaries.Tamito Kajiyama
Also exported the Operators.chain() function.
2009-03-21Improvements in error handling at Python-C++ boundaries.Tamito Kajiyama
2009-03-14Fixed incorrect argument checking.Tamito Kajiyama
2009-03-14Fixed the subclassing of int to define the IntegrationType type.Tamito Kajiyama
Also changed the type of integration type constants from int to IntegrationType.
2009-03-14Fixed StrokeVertex::setPoint() to accept a Blender Vector object as the ↵Tamito Kajiyama
argument. Now this method accepts 2D coordinates in the following three forms: a) Python list of 2 real numbers: setPoint([x, y]) b) Blender Vector of 2 elements: setPoint(Vector(x, y)) c) 2 real numbers: setPoint(x, y) [The log of Revision 19283 had a wrong message...]
2009-03-14Fixed StrokeVertex::setPoint() to accept a Blender Vector object as the ↵Tamito Kajiyama
argument. Now this method accepts 2D coordinates in the following three forms: a) Python list of 2 real numbers: setPoint([x, y]) b) Blender Vector of 2 elements: setPoint(Vector(x, y)) c) 2 real numbers: setPoint(x, y)
2009-03-13Fixed memory leaks in passing vectors from Python to C++.Tamito Kajiyama
2009-03-13Better error handling in the Python API.Tamito Kajiyama
Added error handling to prevent crashes even when errors have occurred in user-defined predicates, stroke shaders, and chaining iterators.
2009-03-08Fixed an immediate crash due to execution failure of a style module.Tamito Kajiyama
2009-03-02Fixed an issue regarding render layers. Now the Freestyle renderer builds a ↵Tamito Kajiyama
view map based on selected object layers in a render layer, instead of the global selection of object layers. This allows, for example, to have two render layers, one for rendering solid faces in all object layers, and the other for rendering outlines of objects in selected object layers by Freestyle. At the moment, the number of Freestyle-enabled render layers is restricted to one -- a better fix is in the future work.
2008-12-11renamed app_blender/api.cpp FRS_freestyle.cppMaxime Curioni
2008-12-11improved Freestyle IO formattingMaxime Curioni
2008-12-11removed AppGLWidget and all related classesMaxime Curioni
added an AppView class to transfer camera information from Blender to Freestyle removed unused functions
2008-12-10when Freestyle would execute style modules, a copy of the Python script ↵Maxime Curioni
would end up in the text editor and pollute the text editor file list. This is corrected: executed scripts do not leave trails behind.
2008-12-10replaced "Shape loading" message with "Importing triangular meshes into Blender"Maxime Curioni
handled case when scene is empty made controller's view map as public variable
2008-12-05Reverted the changes (in revisions 17517-17519) for the antialiasing based ↵Tamito Kajiyama
on OpenGL accumulation buffer.
2008-12-02The GL-based renderer was removed. Freestyle now uses Blender's internal ↵Maxime Curioni
renderer to raster strokes. The render generated from Freestyle's data is currently stored in the original scene's render structure ( as 'freestyle_render'): when the render database is generated, the scene's geometrical data is first imported into Freestyle and strokes are calculated. The generated strokes are used to create a Blender scene, rendered independently. The render result is used in the rendering loop. The final rendering is performed the same way edge rendering is, in a function ('freestyle_enhance_add') operating on each individual render part. Freestyle strokes are only included if the toggle button "Freestyle" (in the 'Output' panel) is active and if the "Freestyle" render layer is also selected. Freestyle's panel appears when the toggle button 'Freestyle' is active. IMPORTANT: as of now, rendering ONLY works when OSA is disabled and when Xparts = Yparts = 1. If these settings are not set, a bogus image will be created. To make the render happen, many modifications had to be made: - the Canvas::Draw and Operators::create methods no longer render strokes. They only generate shading and locational information. - a BlenderStrokeRenderer class was added to turn Freestyle's strokes into a Blender scene. Basically, the scene consists of strokes in their projected image 2D coordinates and an orthographic camera centered in the middle of the corresponding canvas. The scene is rendered using vertex colors, in shadeless mode (therefore, no lamp is needed). BlenderStrokeRenderer uses the old GLTextureManager to load textures (as required by the StrokeRenderer class), even though stroke textures are probably not supported (not tested). After the scene is rendered, it is safely and automatically discarded. - AppCanvas' code was greatly reduced to the bare minimum. The former AppCanvas would use an OpenGL-based back buffer and z buffer to determine the scene's color and depth information. In the future, this data will be determined from the corresponding render passes. Currently, the integration is not achieved so all style modules using depth/color information are sure to fail. - before, Freestyle needed an OpenGL context to determine the camera's information and to compute the view map. As of now, the modelview and projection matrices are fully determined using data provided by Blender. This means both perspective and orthographic projections are supported. The AppGLWidget will very soon be removed completely.
2008-12-01Added changes to support Python's native iterator protocol in Stroke and ↵Tamito Kajiyama
StrokeVertexIterator. freestyle_init.py * Added a generic getName() method that allows subclasses to omit the method to return their class names. BPy_Convert.cpp BPy_Convert.h * Added to BPy_StrokeVertexIterator_from_StrokeVertexIterator() a second argument to specify the direction (reversed or not) of the iterator to be created. BPy_Stroke.cpp * Added support for Python's native iterator protocol. * Added code to parse the optional argument of strokeVerticesBegin(). BPy_StrokeVertexIterator.cpp BPy_StrokeVertexIterator.h * Added support for Python's native iterator protocol. Stroke.cpp * Fixed a null pointer reference. Stroke.h * Added new method Stroke::strokeVerticeAt(i) that returns the i-th StrokeVertex of the Stroke.
2008-12-01Fixed memory leaks.Tamito Kajiyama
2008-11-20Added changes for implementing antialiasing. The OSA settings for the internalTamito Kajiyama
renderer are respected by the Freestyle renderer as well.
2008-11-09Made changes to enable features line parameters (ridges/valleys and ↵Tamito Kajiyama
suggestive contours) and add corresponding UI controls to the Freestyle tab in the Scene buttons.
2008-11-09Fixed a bug in Nature_Type and BPy_Nature_from_Nature() that broke all ↵Tamito Kajiyama
nature-related functionalities (e.g. pyNatureUP1D() and CurveNatureF1D()).
2008-10-01soc-2008-mxcurioni: refactored Freestyle API to prepare for both rendering ↵Maxime Curioni
modes (OpenGL and Blender internal), applied a patch to allow CMake to be used for compilation.
2008-09-29soc-2008-mxcurioni: moved the style module and data files to Blender's ↵Maxime Curioni
standard directory (.blender/scripts/freestyle), cleaned up some useless files. As of this revision, the environment variable FREESTYLE_BLENDER_DIR is NOT needed anymore
2008-09-28soc-2008-mxcurioni: FRS_glBlendEquation filesMaxime Curioni
2008-09-28soc-2008-mxcurioni: imposed the glBlendEquation test accross all platforms ↵Maxime Curioni
(providing greater robustness), introduced the FRS_glBlendEquation that uses glBlendEquation/glBlendEquationEXT based on the system's capabilities.
2008-09-25soc-2008-mxcurioni: incorporated Tamito Kajiyama's patch, improving ↵Maxime Curioni
robustness for the Win32 build on older machines. In detail, the _blendEquation variable from AppCanvas is replaced by a _basic variable in Canvas, determing the rendering mode (standard with blending or basic). This latter variable is used to make sure that strokes are rendered in the right mode
2008-09-25soc-2008-mxcurioni: corrected texture loading feedback, removed paper ↵Maxime Curioni
textures from the project
2008-09-15soc-2008-mxcurioni: added Aldrik Dunbar's patch for 64bit Linux buildsMaxime Curioni
2008-09-09soc-2008-mxcurioni: Win32 build clean-upMaxime Curioni
2008-09-09* Make sure freestyle branch compiles with SCons/msvc9 on Windows. This was ↵Nathan Letwory
joint operation with mxcurioni :)