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
2010-04-11py api file renameCampbell Barton
- prefix mathutils api. - 2 blf.c files (annoying for debugging) - py api docs ignore keying sets as with operators.
2010-03-22spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)Campbell Barton
2010-02-28comparing Vector(-2, 0, 0) and Vector(2, 0, 0) was returning true, this bug ↵Campbell Barton
is years old, strange nobody noticed. use float comparison from the "Ever Faster Float Comparisons" paper, tested with random values as well as random values converted to ints (where this existing code would fail).
2010-02-28examples for autogenerated docs are now implicit and used when available.Campbell Barton
This means adding the file "bpy.props.py" in the examples dir will automatically be used when generating docs, unused examples give warnings.
2010-02-20Mathutils API: Euler support for rotation order.Campbell Barton
Examples. euler = Euler(1, 2, 3) euler.order = 'ZXY' euler = matrix.to_euler('XZY') Still missing rna support. this still wont give the right order, defaulting to XYZ. eul = object.rotation_euler
2010-02-12correct fsf addressCampbell Barton
2010-02-01setting invalid vector swizzle attributes (from blender2.4x docs for ↵Campbell Barton
instance), could crash blender. - disallow setting swizzle's that have duplicate values: vec.xxx = [1,2,3] - raise an error if the list setting a swizzle's longer. - mathutils write callback was running on the wrong vector, which could crash blender.
2010-02-01Mathutils doc improvements + other small thingsCampbell Barton
- bpy.app moved into PyStructSequence (used by sys.float_info) - added buildinfo into bpy.app.build_* - bpy.ui removed (wasnt used) - include external example files in Mathutils docs (only Mathutils and Vector are currently written) - added support to auto document PyStructSequence's - CMake had "'s inside all its strings.
2010-01-30utility functions is_negative_m3 & is_negative_m4, added python Mathutils ↵Campbell Barton
access Matrix.is_negative renamed Mathutils attribute wrapped -> is_wrapped
2010-01-28* Mathutils attributes documented - ↵Campbell Barton
http://www.blender.org/documentation/250PythonDoc/Mathutils.html * Vector.difference() needed normalized vectors * bpy.DEUBG -> bpy.app.debug
2010-01-27py api - utility function for vectors.Campbell Barton
quat = vec.difference(other) also pedantic change with enum names.
2010-01-25Mathutils refactor & include in sphinx generated docs, (TODO, include ↵Campbell Barton
getset'ers in docs) - Mathutils.MidpointVecs --> vector.lerp(other, fac) - Mathutils.AngleBetweenVecs --> vector.angle(other) - Mathutils.ProjectVecs --> vector.project(other) - Mathutils.DifferenceQuats --> quat.difference(other) - Mathutils.Slerp --> quat.slerp(other, fac) - Mathutils.Rand: removed, use pythons random module - Mathutils.RotationMatrix(angle, size, axis_flag, axis) --> Mathutils.RotationMatrix(angle, size, axis); merge axis & axis_flag args - Matrix.scalePart --> Matrix.scale_part - Matrix.translationPart --> Matrix.translation_part - Matrix.rotationPart --> Matrix.rotation_part - toMatrix --> to_matrix - toEuler --> to_euler - toQuat --> to_quat - Vector.toTrackQuat --> Vector.to_track_quat
2010-01-22Math Lib:Brecht Van Lommel
* inline some more functions, from math_base and math_vector * also made some changes to the way inline is done so it can work for more than one file * reflect_v3_v3v3 requires input vectors to be normalized now. * added rgb_to_grayscale * added zero_v4, copy_v4_v4, swap_v4_v4, is_one_v3 * added box_clip_bounds_m4 to clip a bounding box against a projection matrix
2010-01-22error message errorCampbell Barton
2010-01-14spelling errors, no real changes to code.Campbell Barton
2010-01-03editbone.transform(matrix) function, requested by Cessen.Campbell Barton
Also added matrix.median_scale attribute to get the average scale from the matrix, use for scaling bone envalopes.
2009-12-01User Script support added back.Campbell Barton
- the scripts path set in the user preferences or ~/.blender/scripts/ui (io, op, io etc..) will be used to load scripts. - the default home dir part probably only works in *nix os's - Added a missing sync callback to vector.toTuple()
2009-11-30- added a new math function double_round, useful for rounding a number to a ↵Campbell Barton
number of decimal places. - added Mathutils vector method, vec.asTuple(round), since this is tedious in python and fairly common task.
2009-11-26Mathutils vec += vec wasnt running mathutls callbacksCampbell Barton
2009-11-10Math LibBrecht Van Lommel
* Convert all code to use new functions. * Branch maintainers may want to skip this commit, and run this conversion script instead, if they use a lot of math functions in new code: http://www.pasteall.org/9052/python
2009-10-21Make compiler happy, remove doubtful non init usage.Guillermo S. Romero
2009-09-08manual merge trunk -r 23037Dalai Felinto
strangely vector.c was skipped in last merge from trunk. ----------------------------------- Mathutils fix: Vector.reflect * correct function for reflection and moving it to arithb.c
2009-09-08Fix bug in Mathutil with matrix/matrix and matrix/vector multiplication order.Benoit Bolsee
MathUtil matrix type follows Blender convention of column major storage. This means that the elements on one column are contiguous in memory. Vectors are one dimensional arrays that can be considered in row or in column but the Blender convention is column so vector should only be considered as row. This means that the only logical multiplication operation between matrix and vector is matrix * vector. This convention is respected in all parts of MathUtil except in matrix/matrix and matrix/vector multiplication where the row major convention is assumed, which in the and is equivalent to reversing the order of multiplication. This is clearly a bug and must be corrected but the side effect is that it will break all scripts using these operations. Script writers who care about the correctness of the matrix operations have already implemented work around: 1) change order of matrix/vector multiplication. vec2 = vec1 * mat1 This must be changed to the normal order: vec2 = mat1 * vec1 2) change order of matrix/matrix multiplication (with matl a local transform in matw reference) mat3 = matl * matw This must be changed to the normal order: mat3 = matw * matl 3) transpose before an after the multiplication matl.transpose() matw.transpose() mat3 = matw * matl mat3.transpose() This must be changed to: mat3 = matw * matl;
2009-08-26- Mathutils.Vector assignment wasnt working in the BGE's py api, was using ↵Campbell Barton
getValue() rather than setValue() - added GPL header to bpy_interface.c from 2.4x's BPY_interface.c - warning fixes
2009-08-152.5: warning fixesBrecht Van Lommel
Directories intern/ and source/blender/ now compile warning free again here with scons/gcc.
2009-08-10remove python2.x supportCampbell Barton
2009-07-092.5Ton Roosendaal
Monthly cleaning round to make it compile warning free. Mostly it was const stuff (strings, Context), but also a couple useful fixes, like wrong use of temp pointers. Only Mathutils callback struct I left alone... design issue.
2009-07-02needed for building with py2Campbell Barton
2009-07-01slice support working in py3 for Vector and Matrix types.Campbell Barton
Added slice to PyRNA collections and arrays (py3 only). eg. some_verts = mesh.verts[0:10] some_rna_array[4:-1] = [0,1,2,3] Collections dont support assignment, when assigning slices, resizing the array isnt support like with python lists.
2009-06-30Python APICampbell Barton
Mathutils support for subclassing Vector, Quat, Euler and Matrix types. Removed C docstrings, prefer to make sure our epydocs are well maintained rather then duplicate, vague doc strings. Will convert scripts to detect missing docs from the BGE.
2009-06-28PyNumberMethods needed ifdefs for python3.x and some other corrections.Campbell Barton
2009-06-26Made Mathutils use radians rather then degrees. defining USE_MATHUTILS_DEG ↵Campbell Barton
for testing existing scripts. Added conversion for BGE Quaternion WXYZ (Blender/C) -> XYZW (Moto C++). BGE Python API now uses WXYZ following mathutils (break script warning).
2009-06-25PyAPI RNA/BGECampbell Barton
* all mathutils types now have optional callbacks * PyRNA returns mathutils quat and euler types automatically when they have the rotation subtype. * PyRNA, reuse the BPy_StructRNA PyObject rather name making a new one for each function returned. * use more arithb.c functions for Mathutils quaternion type (less inline cruft). * BGE Mathutils integration mostly finished- KX_PyMath now converts to Mathutils types rather then lists. * make all mathutils types share the same header so they can share a number of functions - dealloc, getWrapped, getOwner.
2009-06-23PyRNA API support for matrix types as Mathutils matrix (with callbacks) ↵Campbell Barton
rather then a generic rna sequence of floats. Any 3x3 or 4x4 rna matrix will automatically be returned as a Mathutils matrix. This makes useful stuff like multiplying a vector location by an object matrix possible. ob = bpy.data.scenes[0].objects[0] print (ob.data.verts[0].co * ob.matrix) Also added mathutils matrix types to the BGE GameObject.localOrientation, worldOrientation * MT_Matrix3x3 added getValue3x3 and setValue3x3, assumed a 4x3 float array. * KX_GameObject.cpp convenience functions NodeSetGlobalOrientation, NodeGetLocalOrientation, NodeGetLocalScaling, NodeGetLocalPosition. * 2.5 python api now initializes modules BGL, Mathutils and Geometry * modules py3 PyModuleDef's use PyModuleDef_HEAD_INIT, rather then {}, was making msvc fail to build. * added macros for Vector_ReadCallback, Vector_WriteCallback etc. to check if the callback pointer is set before calling the function.
2009-06-23SVN maintenance.Guillermo S. Romero
2009-06-22PyAPI Mathutils Vector callbacks, referencing other PyObjects rather then ↵Campbell Barton
thin wrapping vectors which is crash prone. in short, vectors can work as if they are thin wrapped but not crash blender if the original data is removed. * RNA vector's return Mathutils vector types. * BGE vectors for GameObject's localPosition, worldPosition, localPosition, localScale, worldScale, localInertia. * Comment USE_MATHUTILS define to disable returning vectors. Example... * 2.49... * loc = gameOb.worldPosition loc[1] = 0 gameOb.worldPosition = loc * With vectors... * gameOb.worldPosition[1] = 0 * But this wont crash... * loc = gameOb.worldPosition gameOb.endObject() loc[1] = 0 # will raise an error that the objects removed. This breaks games which assume return values are lists. Will add this to eulers, matrix and quaternion types later.
2009-06-20ObColor wasnt converted into an RNA string.Campbell Barton
Updated Mathutils.Vector/Euler/Quaternion/Matrix so these are types rather then module methods, each type now has a tp_new function, matching python builtins float/int/str. Also cleaned up float conversion and arg passing. Changed buttons_objects.py... if ob in groups.objects: # no longer works if ob.name in groups.objects: # is the new syntax ...its more dict like and a lot faster (avoids python iterating over each item and comparing each, use a single rna lookup instead).
2009-06-19Update Mathutils for py3kCampbell Barton
* removed coercing types which has been removed from py3. * matrix uses getset's rather then getset items. * removed deprecated functions.
2009-06-18Some generic modules from blender 2.4x building with py3k and mostly working.Campbell Barton
* Mathutils, Geometry, BGL, Mostly working, some //XXX comments for things to fix with py3 python import override (bpy_internal_import.c) so you can import python internal scripts from the BGE and running blender normally.