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
2008-07-24soc-2008-mxcurioni: added (without testing) the following classes: BBox, ↵Maxime Curioni
SShape, ViewShape. Also corrected a few typos (Get#->get#).
2008-07-24soc-2008-mxcurioni: Added first batch of Iterators: AdjacencyIterator, ↵Maxime Curioni
Interface0DIterator, CurvePointIterator, StrokeVertexIterator, SVertexIterator, orientedViewEdgeIterator.
2008-07-23soc-2008-mxcurioni: added Iterator class, base class for all iterators in ↵Maxime Curioni
Freestyle (on the C++ side). Created the equivalent in Python BPy_Iterator with the simple interface: - getExactTypeName() - increment() - decrement() - isBegin() - isEnd() Contrary to previously stated, I am reverting back to implementing iterators in the (Python) API, for different reasons: - it will make testing quicker to achieve, as I won't have to recode a big chunk of the original Python files - it will be a base for API refactoring - it won't prevent the use a list-based approach later (it is simple to get it from the Iterator)
2008-07-23soc-2008-mxcurioni: renamed all Freestyle API related files with 'BPy_' ↵Maxime Curioni
prefix to avoid library name collision. Included MediumType's initialization at proper time to avoid Blender's crash.
2008-07-23soc-2008-mxcurioni: implemented (without testing) StrokeShader, Stroke and ↵Maxime Curioni
MediumType (used by Stroke to define medium types) classes. The Stroke class is missing the InsertVertex method. Before porting other classes, I'll resolve the List (Python) <=> Iterator (C++) correspondence problem by implementing a general class appropriately suited for the task.
2008-07-22soc-2008-mxcurioni: filled and tested StrokeVertex classMaxime Curioni
2008-07-22soc-2008-mxcurioni: corrected StrokeAttribute, verified with test case.Maxime Curioni
I realized today that it will not be possible to implement getter/setter functionality easily for our Freestyle API. The reason is that Python does not support function overloading as-is. It is possible to 'fake' overloading by taking a general argument object and count the number of arguments in the object (rgbTuple_setCol in Blender's API is a good example of how to go about it). For the time being, we'll get around that problem. The tangible effect of that constraint is that all API setter functions return a 'None' PyObject, instead of returning an integer status code. It is important to note that this problem is due to Freestyle's API being C++ in nature. Fortunately, this shouldn't really impact the usage of the API. If the Blender Python group wants me to correct that, I'll be able to do it. It is just going to take me quite some time correcting it, writing support functions for methods having different types of arguments.
2008-07-22Added StrokeAttribute class. Beginning of StrokeVertex.Maxime Curioni
IMPORTANT: The setters functions' names were normalized due to constant confusion regarding capitalization. All the function names start with set... instead of Set.... This convention was changed all throughout Freestyle. To use Freestyle as an external renderer, the SWIG library MUST be regenerated.
2008-07-20soc-2008-mxcurioni: updated support for Nature class.Maxime Curioni
2008-07-19soc-2008-mxcurioni: Added IntegrationType and Nature classes, used to store ↵Maxime Curioni
constants used throughout Freestyle
2008-07-18soc-2008-mxcurioni: canvas for UnaryFunction0D, UnaryFunction1D, ↵Maxime Curioni
UnaryPredicate0D, UnaryPredicate1D. UnaryFunction0D and UnaryFunction1D implementations are going to be really challenging due to the changes in the infrastructure: UnaryFunction0D<T> and UnaryFunction0D<T> are templates and must be determined for compile-time. The easiest solution is to support each type individually; unfortunately, it removes the benefit of using an interface. To find a middle ground, a general unary function Python object type was created for 0D and 1D. In both cases, the types have a void* pointer keeping the address of the current unary function type. I am not sure yet if it will work. Interface0DIterator being removed by a list type, the t() and u() coordinate functions will to be transferred somehow, probably directly at the Interface0D level.
2008-07-18soc-2008-mxcurioni: FEdge class added. Modifed converting functions to ↵Maxime Curioni
passing-by-reference format. Improved the type checking for FEdge and CurvePoint. Modified FEdge C++ class to test for null vertices. Updated previous classes to support FEdge. So far, whenever a Python object is created from its corresponding C++ object, the input object reference is copied into a new object. Due to Freestyle's functions (especially regarding the way it is iterated), it is currently impossible to deal with a pointer-based Python object. It is not a real drawback, just an aspect to keep in mind.
2008-07-17soc-2008-mxcurioni: SWIG removal - completed SVertex and CurvePoint classes ↵Maxime Curioni
migration. Stabilized a lot of the code for C++ -> Python conversion. Added the correct rich comparison operator and tested it. Corrected 'dupplicate' typo and changde to __copy__ for Python API. From now on, when a set should be output (PySet_Type), it is given as a list (PyList_Type). The reason is that it doesn't really matter what we bring back to the Python interpreter. The set is guaranteed in memory on the C++ side. For the CurvePoint class, the userdata variable is not yet ported (and will probably available as a list or a dictionary). The CurvePoint implementation works except for the initialization from other CurvePoints: somehow, the inner variables don't seem to be correctly handled. I do not know if it is a bug in Freestyle or if the CurvePoint object's state is correct for my test case. CurvePoint needs more testing.
2008-07-15soc-2008-mxcurioni: reimplemented the initialization/allocation for base ↵Maxime Curioni
classes. The Python object type tp_new slot is now set to PyType_GenericNew, instead of the former custom functions. As a note, by default, Python does not set this slot: it is therefore mandatory for the base classes. For children classes, only __init__ is needed. To make our base classes subclasses, the Py_TPFLAGS_BASETYPE flag was added to the object type tp_flags slot. Finally, I began to implement CurvePoint, descendant of Interface0D. This commit allowed me to verify that my SWIG replacement method works: interfaces are well taken into account by children. For a test, use the following code: ================================ import Blender from Blender import Freestyle from Blender.Freestyle import * print Interface0D() print CurvePoint() ================================ The __repr__ method is only implemented in Interface0D: PyObject * Interface0D___repr__(BPy_Interface0D* self) { return PyString_FromFormat("type: %s - address: %p", self->if0D->getExactTypeName().c_str(), self->if0D );} and the result is of the form: type: Interface0D - address: 0x18e5ccc0 type: CurvePoint - address: 0x18e473f0 As you can see, the correct getExactTypeName of the class is called.
2008-07-15soc-2008-mxcurioni: Reimplemented the Freestyle Python API's files to be ↵Maxime Curioni
correctly used as classes and not submodules. Added and integrated object lifecycle functions (__new__, __alloc__, __repr__) for the previous classes: BinaryPredicate0D, BinaryPredicate1D, Id, Interface0D, Interface1D. All of these classes were tested within Blender's Python interpreter with simple test cases and their getter/setters were corrected. Interface0DIterator was modified to allow BPy_Interface1D to be instantiated: verticesBegin(), verticesEnd(), pointsBegin(float) and pointsEnd(float) are not pure virtual functions anymore. If they are called directly from BPy_Interface1D (instead of its subclasses), an error message is displayed.
2008-07-12soc-2008-mxcurioni: first part of the Freestyle Python implementation. A new ↵Maxime Curioni
Freestyle module is added. The following modules are implemented: BinaryPredicate0D, BinaryPredicate1D, Id, Interface0D, Interface1D. I added a Convert module to help in the creation of Python objects for Freestyle's data structures. I also added a missing file for guarded_alloc needed for compilation on Windows.
2008-07-09soc-mx-2008: SWIG dependency - wrapper functions extracted from ↵Maxime Curioni
ModuleWrapper.cpp
2008-07-09soc-2008-mxcurioni: first (blank) file upload for SWIG removal, in ↵Maxime Curioni
source/blender/freestyle/intern/python. The migration will be based on source/blender/freestyle/intern/swig/ModuleWrapper.{cpp,h}
2008-07-06soc-2008-mxcurioni: merge-repair with trunk rev 15456Maxime Curioni
2008-07-05soc-2008-mxcurioni: render buffer modificationMaxime Curioni
2008-07-05soc-2008-mxcurioni: render buffer formatMaxime Curioni
2008-07-05soc-2008-mxcurioni: render layer with FBOs -> render buffers, version 2. ↵Maxime Curioni
Still not working.
2008-07-05soc-2008-mxcurioni: first render layer implementation with frame buffer ↵Maxime Curioni
objects. It does not work yet: I cannot manage to read from the correct buffer yet.
2008-07-04soc-2008-mxcurioni: foundations for Freestyle as a render layer - new UI ↵Maxime Curioni
buttons and mode flags, Freestyle API refactoring, modified pipeline to incorporate the new render layer. Compared to previously, the layer functionality is available when selecting 'Blender Internal' as the rendering engine. Freestyle's result is not available in the layer yet. I need to integrate OpenGL offscreen rendering properly (with framebuffer objects) to reach that goal.
2008-07-02soc-2008-mxcurioni: renamed libQGLWidget's Camera class to ↵Maxime Curioni
AppGLWidget_Camera to use Blender's Camera struct, integrated the camera parameters from Blender. Perspective projection (precisely field of view) is now correct. Orthographic projection still having issues.
2008-06-16soc-2008-mxcurioni: Freestyle now supports camera information (the image is ↵Maxime Curioni
still a bit larger than Blender's internal renderer, probably a field of view problem). 3d scene is now no longer rendered, only 2d scene (strokes from view map information) is. Style module is still static (contour.py), will soon be handled via independent UI panel. Phase 1 is considered finished. Phase 2 starts now: the objective is integrating Freestyle as an independent render layer.
2008-06-14soc-2008-mxcurioni: removed static dependencies (formerly fixed in ↵Maxime Curioni
app_blender/test_config.h). From now on, to use the branch, one needs to define a FREESTYLE_BLENDER_DIR environment variable to point to the Freestyle directory source/blender/freestyle
2008-06-08soc-2008-mxcurioni: now supports current scene drawing (instead of fixed ↵Maxime Curioni
scene object), still with fixed style and fixed camera. Initialization is properly handled, which limits memory problems and speed-ups subsequent rendering. The viewing ratio should be correct now too. I also removed linking references to former lib3ds library path (caused some linking problems).
2008-05-29soc-mx-curioni: resolved the rendering issue. In the previous steps, I was ↵Maxime Curioni
only rendering the strokes, not the toatl scene (explaining why the render color was being inverted). i added a call to the view's draw() method. Now, the rendering steps are complete and display both the object and the silhouette.
2008-05-29soc-2008-mxcurioni: made the image rendering faster by reading the frame ↵Maxime Curioni
buffer directly into the RenderResult's ImBuf structure, removing the need to copy it manually
2008-05-29soc-2008-mxcurioni: updated SConscript file for SWIG module compilation and ↵Maxime Curioni
linking under Linux
2008-05-29soc-2008-mxcurioni: First render ! It should render the teapot upside down ↵Maxime Curioni
on a black background. The correction was made by following Yafray's rendering and display implementation, which is very clear.
2008-05-29soc-2008-mxcurioni: corrected GLStrokeRender::preparePaper function for ↵Maxime Curioni
paper texture loading. The canvas view now has its frame properly initialized to fixed dimensions. When the Freestyle render is executed, the render is displayed for a fraction of a second and is then erased by a standard gray background. I have to analyze what command I need to call to keep the result on display.
2008-05-27soc-2008-mxcurioni: updated SWIG module linking instructionMaxime Curioni
2008-05-27soc-2008-mxcurioni: Freestyle execution now works flawlessly (Python runtime ↵Maxime Curioni
loads appropriate modules, using SWIG wrapper), but does not render anything yet (render window OpenGL context not used yet). Currently, the SWIG wrapper library needs to be manually compiled (see SWIG section in source/blender/freestyle/SConscript for details). I am missing some knowledge on scons to create it automatically from the SConscript. Once I find that information, I'll make it automatic and for different platforms. I also corrected a simple GLStrokeRenderer bug for texture loading (not in original Freestyle code). Apparently, IMB_loadiffname doesn't recognize the paper's texture depth so a work-around will have to be found.
2008-05-27soc-2008-mxcurioni: PythonInterpreter now properly handles its ↵Maxime Curioni
initialization (in accordance with original Freestyle code). This is achieved by creating a temporary Text structure, adding the required import and appending the necessary Python path. The text is executed using the BPY_txt_do_python_Text command. When Freestyle is run within Blender, it should not crash; the Python interpreter should report an ImportError on _Freestyle (the SWIG wrapper).
2008-05-26soc-2008-mxcurioni: PythonInterpreter works, using Blender's Python ↵Maxime Curioni
functions. The drawing still does not produce anything because the SWIG module wrapper is missing
2008-05-26soc-2008-mxcurioni: Freestyle compiles but crashes at runtime because of the ↵Maxime Curioni
Python environment. I analyzed the crash with gdb and PyImport_AddModule ("__main__") in Python/import.c:320 seems responsible for the crash: apparently, "__main__" is not found and causes the error "No such file or directory". I have to figure out what's wrong with the current configuration, especially whether Freestyle's PythonInterpreter can be used as is. I am going to see whether it's just quicker to use Blender's functions.
2008-05-25soc-2008-mxcurioni: Big update. Finally works (links and compiles). So far, ↵Maxime Curioni
the following steps work: 1. instantiates the config path, the controller and the view 2. sets the controller’s view 3. loads a 3ds file (right now a fixed file) 4. inserts a style module (right now, also fixed) 5. computes the view map The next and final step is running the Python script. A lot of information are fixed and should be changed to test the following code: see source/blender/freestyle/app_blender/*.cpp and search for fixed paths (starting in /Users/). I am currently evaluating whether it's worth making Python run on its own environment (right now, the program crashes because of PyImport_AddModule) or whether it should use Blender's Python capabilities. Also, I need to figure out how to integrate the SWIG wrapper dynamic library into the current scheme.
2008-05-19soc-2008-mxcurioni: resolved uint issues (replaced with unsigned int). Still ↵Maxime Curioni
NOT linking
2008-05-19soc-2008-mxcurioni: uploaded missing files. Still NOT linking so do not use ↵Maxime Curioni
this version yet :(
2008-05-18corrected swig Sconscript to compile on unix-like machinesMaxime Curioni
2008-05-18soc-2008-mxcurioni: towards Freestyle's first render: controller, config, ↵Maxime Curioni
appglwidget corrected. Freestyle is called but cannot be linked (ImBuf issues). This is an unstable commit.
2008-05-12soc-2008-mxcurioni: swig SConscript updated to compile under all configs ↵Maxime Curioni
except Win32 (where binary is copied to build directory)
2008-05-12soc-2008-mxcurioni: lib3ds SConscript updated to compile under Win32 configsMaxime Curioni
2008-05-12soc-2008-mxcurioni: merged changes to revision 14798, compilation works for ↵Maxime Curioni
rendering/ directry. Still needs to figure out how to compile on non-Unix machines.
2008-05-10soc-2008-mxcurioni: towards Freestyle compilation, removing Qt's QString and ↵Maxime Curioni
QImage dependencies. Up to this commit, the following directories compile well (and without any warning): system, image, geometry, graph, winged_edge, view_map, stroke. Modified code is commented by //soc and unused variables by //soc unused
2008-05-08soc-2008-mxcurioni: merged changes to revision 14747, cosmetic changes for ↵Maxime Curioni
source/blender/freestyle
2008-05-06soc-2008-mxcurioni: swig compiles as independent libraryMaxime Curioni
2008-05-05merge to 14689, Freestyle library changes, SConscript startMaxime Curioni