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: merged changes to revision 15705Maxime Curioni
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: merge with trunk - rev 15540Maxime Curioni
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-12Fix for bug [#13479] Particle system "corrupts" when changing material ↵Janne Karhu
colour and used in conjunction with softbodies - changing particlesystem settings for hair particles cleared & recalculated everything even when hair softbody was baked
2008-07-11Memory leak fix (found with Valgrind)Daniel Genrich
2008-07-11Memory leak fix: br_find_exe() uses strdup() which uses malloc and therefore ↵Daniel Genrich
the returned string needs free'ing (Found with valgrind).
2008-07-11Bugfix #17306: Missing refresh call for button in UserPrefs Joshua Leung
Autokey settings were missing redraw for Info-window
2008-07-10Fix for bug #14411: missing preview render redraw for a few lamp buttons.Brecht Van Lommel
2008-07-10Fix for bug #14665: stars not working in 3D view.Brecht Van Lommel
2008-07-10Fix for bug #17292: vertex paint blur darkens the colors as youBrecht Van Lommel
paint, due to old optimization to use >>8, but this is equivalent to /256, and it should be /255.
2008-07-10Adding an option for action actuator - "Continue" this means animations ↵Campbell Barton
always play from where they left off. Continue was the 2.46 operation too, so new functionality is the option to disable. When using states, an action like kick or throw can often switch out before finishing playing the action, and there was no way to play from the start frame the second time round. (even setting the actions current frame through python doesn't work work)
2008-07-10Sync with Apricot Game EngineBrecht Van Lommel
============================= * Clean up and optimizations in skinned/deformed mesh code. * Compatibility fixes and clean up in the rasterizer. * Changes related to GLSL shadow buffers which should have no effect, to keep the code in sync with apricot.
2008-07-10AutoMerge Keyframes option for Action/NLA editors will now also delete ↵Joshua Leung
duplicate keyframes if a Duplicate (SHIFT-DKEY) operation is cancelled.
2008-07-10-> Support for Custom Data in bevel modifierGeoffrey Bantle
Added Customdata to Bmesh <-> derivedmesh functions
2008-07-10Apricot Request:Joshua Leung
When changing the active action in the NLA editor with NLA-override off, armatures now have their restpose applied before the new action is evaluated. I've commented the code here to make it clearer what is going on.
2008-07-09[#17298] surface normal direction compensation for objects with negative ↵Campbell Barton
scale in rendering with radiosity from Roelf De Kock (kiemdoder) Fixes bug [#7969] Mirroring Object Breaks Radiosity Calculations - copied from the tracker. The code in this patch detects whether an object has negative scale (test the OB_NEG_SCALE bit in Object.transflag) and then compensate for the negative scale when the surface normals are calculated for a radiosity render.
2008-07-09Fixed bug #14510 - wave modifier crashBen Batt
CDDM_apply_vert_coords needs a CDDerivedMesh, but it was getting a CCGDerivedMesh from the preceding Subsurf modifier. This fix just makes a CDDerivedMesh copy of the supplied DerivedMesh rather than using it directly.
2008-07-09bugfix, vector was not checked for zero length before normalizing, closing ↵Campbell Barton
blender instantly with an assert.
2008-07-09Buhh... and now I left in testing print in exr code.Ton Roosendaal
2008-07-09Replaced strcasecmp with BLI_strcasecmp, to make msvc happy!Ton Roosendaal
2008-07-09Fix for reported openexr file reading failures.Ton Roosendaal
For simple RGB(A) files, the channel names in openexr were supposed to be simply "R" "G" "B" and "A" too. Other programs like other names... like lower case, or like "ambient.r" Tested with file from renderman.
2008-07-09Fix for bugfix #12075: gamma node check for nan was alwaysBrecht Van Lommel
checking red channel.
2008-07-09added a factor argument for aligning to vector, this isn't correct since it ↵Campbell Barton
does linear interpolation of the vector and renormalizes. (can be improved to rotate correctly but for our use ist ok for now, would also be useful to have an argument to clamp the maximum rotation angle to get a constant rotation speed), This will used to make franky upright when falling from an angle, to track to a surface when hanging onto a ledge and setting the glide pitch. Without this rotation is instant and jerky. currently this is done with Mathutils which isnt available in Blender Player. def do_rotate_up(own): own.alignAxisToVect([0,0,1], 2, 0.1) replaces... def do_rotate_up(own): up_nor = Vector(0,0,1) own_mat = Matrix(*own.getOrientation()).transpose() own_up = up_nor * own_mat ang = AngleBetweenVecs(own_up, up_nor) if ang > 0.005: # Set orientation cross = CrossVecs(own_up, up_nor) new_mat = own_mat * RotationMatrix(ang*0.1, 3, 'r', cross) own.setOrientation(new_mat.transpose()) M source/gameengine/Ketsji/KX_GameObject.cpp M source/gameengine/Ketsji/KX_GameObject.h
2008-07-09soc-mx-2008: SWIG dependency - wrapper functions extracted from ↵Maxime Curioni
ModuleWrapper.cpp
2008-07-09exiting wasnt working (was raising errors), also use dict.keys() rather then ↵Campbell Barton
appending from iteritems,
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-09fix for crasher with touch sensor, ben you may want to look at this, should ↵Campbell Barton
be ok since the ray sensor does NULL checks in for getNewClientInfo in a similar area.
2008-07-08bugfix - GameEngine PyObject methods did not all return when using dir(), ↵Campbell Barton
because inherited methods were ignored, This made it incredibly annoying, not only having to search a C++ file to see what functions were available. but looking up methods inherited from other C++ classes. There is still no __members__ attribute so dir() wont work at all for attributes.
2008-07-08Fix for crash in freeing group nodes, node trees have to be freedBrecht Van Lommel
before materials.
2008-07-08BGE logic patch: new "Add" mode for Ipo actuator, several corrections in ↵Benoit Bolsee
state system. New Add mode for Ipo actuator ============================= A new Add button, mutually exclusive with Force button, is available in the Ipo actuator. When selected, it activates the Add mode that consists in adding the Ipo curve to the current object situation in world coordinates, or parent coordinates if the object has a parent. Scale Ipo curves are multiplied instead of added to the object current scale. If the local flag is selected, the Ipo curve is added (multiplied) in the object's local coordinates. Delta Ipo curves are handled identically to normal Ipo curve and there is no need to work with Delta Ipo curves provided that you make sure that the Ipo curve starts from origin. Origin means location 0 for Location Ipo curve, rotation 0 for Rotation Ipo curve and scale 1 for Scale Ipo curve. The "current object situation" means the object's location, rotation and scale at the start of the Ipo curve. For Loop Stop and Loop End Ipo actuators, this means at the start of each loop. This initial state is used as a base during the execution of the Ipo Curve but when the Ipo curve is restarted (later or immediately in case of Loop mode), the object current situation at that time is used as the new base. For reference, here is the exact operation of the Add mode for each type of Ipo curve (oLoc, oRot, oScale, oMat: object's loc/rot/scale and orientation matrix at the start of the curve; iLoc, iRot, iScale, iMat: Ipo curve loc/rot/scale and orientation matrix resulting from the rotation). Location Local=false: newLoc = oLoc+iLoc Local=true : newLoc = oLoc+oScale*(oMat*iLoc) Rotation Local=false: newMat = iMat*oMat Local=true : newMat = oMat*iMat Scale Local=false: newScale = oScale*iScale Local=true : newScale = oScale*iScale Add+Local mode is very useful to have dynamic object executing complex movement relative to their current location/orientation. Of cource, dynamics should be disabled during the execution of the curve. Several corrections in state system =================================== - Object initial state is taken into account when adding object dynamically - Fix bug with link count when adding object dynamically - Fix false on-off detection for Actuator sensor when actuator is trigged on negative event. - Fix Parent actuator false activation on negative event - Loop Ipo curve not restarting at correct frame when start frame is different from one.
2008-07-08Bugfix #16535Ton Roosendaal
The infamous Fkey 'make face' in editmode still failed in cases, giving an annoying convex error popup. Found two errors in this code: - not all cases were evaluated to make a face of 4 vertices (6 cases) - the function that makes always a face when the 4 edges already exist failed when not in vertex-select mode. I also removed the popup, but added a print... its still not perfect.
2008-07-08scenes set pose objects would draw in posemode while weight painting if they ↵Campbell Barton
were set to posemode in their scene.
2008-07-08Compiler warning fixes (how some of this stuff compiled without stopping ↵Joshua Leung
compiling I don't know) ;)
2008-07-08== Select Swap for Armatures (Ctrl I) ==Joshua Leung
It is now possible to swap the selection of bones in EditMode and PoseMode using the CTRL IKEY hotkey. As a result, the hotkey for adding IK Constraints has now changed to SHIFT IKEY (so that select swap can have a consistent hotkey)
2008-07-08-> UV and VCOL support for bevel (editmode)Geoffrey Bantle
BMesh and the bevel code now support UVs/VCOLS. The offset is fixed at this time, but will be made dynamic later.