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
path: root/source
AgeCommit message (Collapse)Author
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-09corrected crash caused when enabling scene vectorsMaxime Curioni
2008-12-05corrected problems using different filters: Freestyle pixels were being ↵Maxime Curioni
fetched outside of the render result rect. Corrected with a test to make sure that the used pixels are valid.
2008-12-05Reverted the changes (in revisions 17517-17519) for the antialiasing based ↵Tamito Kajiyama
on OpenGL accumulation buffer.
2008-12-04fixed OSA and tile rendering problemsMaxime Curioni
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-20Renamed arguments rad1 and rad2 in order to avoid name conflicts with symbolsTamito Kajiyama
defined in Microsoft SDKs/Windows/v6.1/include/dlgs.h.
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-31soc-2008-mxcurioni: merged changes to revision 17246Maxime Curioni
2008-10-31This is coverity issue CID: 456Kent Mein
fixes a buffer overrun issue. Kent
2008-10-31* Minimum SCons version is now 1.0.0Nathan Letwory
- Code has been changed to reflect this (ie. deprecated functions are not anymore used) * clean up the C and C++ compiler flags mess. - in the environment construction of BlenderLib all the compile flag governing options have been split in the *C*, *CC* and *CXX* containing equivalents. C is for C compiler only flags. CC is for C and C++ compiler flags and CXX is for C++ compiler only flags. All the platform default config files need to be double checked and fixed wherever it looks necessary. Either DIY, or send me a note with needed changes. - a start for the BlenderLib parameter list has been made - all the SConscripts need to be checked and modified to hand in flags properly. * A theeth request: make -jN settable in the config file. - I give you BF_NUMJOBS, which is set to 1 by default. In your user-config.py, set BF_NUMJOBS=4 to have 4 parallel jobs handled. Yay.
2008-10-30* Build aborts when giving options on command-line when WITH_BF_DOCS=TrueNathan Letwory
- make sure epydoc generation doesn't get a fit over options given on scons command-line -> don't use arguments from command-line.
2008-10-30Build fix (C90): Declaration after statementMartin Poirier
2008-10-30Fix for dependency graph cycle print, regular "Parent" relation wasBrecht Van Lommel
incorrectly printed as "Curve Parent".
2008-10-30Bugfix for [#17879] Speed vectors/velocity data not working on ALL fluids.Daniel Genrich
2008-10-29EditVert hash *is* used elsewhere in the code, so just to be safe, use a ↵Martin Poirier
scratch array instead. This is actually much safer than juggling values in the tmp union all the time.
2008-10-29This is a fix for coverity issue CID: 517Kent Mein
Basically the code was referencing var[-1] it wasn't using it but also did not need to be set in those cases. So I moved the assignments so it skips the -1 case. Kent
2008-10-29fix for more disable python defines,Campbell Barton
FTOCHAR didnt have brackets around the value. FTOCHAR(a+b) didnt work, FTOCHAR((a+b)) did.
2008-10-29merging harmonic-skeleton branch into trunk. All changes are hidden behind a ↵Martin Poirier
disabled define, nothing to see here
2008-10-28merge 17206:17211harmonic-skeletonMartin Poirier
2008-10-28error in DISABLE_PYTHON definesCampbell Barton
2008-10-28added scons option BF_WITH_PYTHON (defined as DISABLE_PYTHON)Campbell Barton
2008-10-28merge 17122:17206Martin Poirier
2008-10-28Add compile time define to disable skeleton generation and retargetting UI ↵Martin Poirier
(disabled by default). This is done to make merging make in trunk painless.
2008-10-28Updated cmake so it has the option to use WITH_DDSKent Mein
Kent
2008-10-28bpy access to image premul was missing.Campbell Barton
2008-10-28Python APIKen Hughes
---------- Bugfix #17911: Mesh.getFromObject() incorrectly decremented the mesh's material user refcount when the material was linked to the object.
2008-10-27face transp option CLIP wasnt added to the py api.Campbell Barton
added gameObject.replaceMesh(meshname) - needed this for an automatically generated scene where 100's of objects would have needed logic bricks automatically added. Quicker to run replace mesh on all of them from 1 script.
2008-10-27Fix for crash reading a peach file, chubbychestnut.blend. A do_versionsBrecht Van Lommel
conversion was reading the mtex array in a library linked material. It is however not guaranteed that direct_link_* was called on the material yet, so the array pointer is not always valid and it can crash.