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
2007-12-24Step 3 for the initial commits for 2.5: removing src/ and python,Ton Roosendaal
adding new windowmanager module, and the first bits of new editors module.
2007-12-17Reverting to 2_2x BPYMartin Poirier
I was careful in selectively rolling back revisions, but if you've committed changes unrelated to BPY mixed with BPY changes, I might have reverted those too, so please double check.
2007-10-26==Python API==Campbell Barton
layerMask access for bone and armatures Window.PoseMode() similar to Window.EditMode()
2007-08-14added bone comparison for the python apiCampbell Barton
2007-05-26More memory leaks fixed - in IDProp, Bone.head, tail, matrix, ob.DupObjects ↵Campbell Barton
(my fault) and in Effect module as well as a few others. Also stopped using Py_BuildValue for strings, ints and floats.
2007-05-25Many long standing memory leaks fixed in the BPY api.Campbell Barton
Data from Armature.c and logic.c still leaks. Mostly todo with PyList_Append adding a refcount and the bpython api not decrefing. Also added some features needed to fix a bug in mesh_clean.py (ob.pinShape and ob.activeShape)
2007-04-28Python APIKen Hughes
---------- Draw.c: Fix some gcc warnings Bone.c: Bone_getAllChildren() was calling EXPP_incr_ret() but not returning the value
2007-04-24editface.c & buttons_logic.c & Draw.c & verse_session.c - added missing headerCampbell Barton
Bone.c - return an empty list rather then None for bone.children bone.getAllChildren() Draw.c - per button callbacks are now have (event, value) passed
2007-01-16== Armature Joining Bugfixes ==Joshua Leung
Since 2.40 (and a few pre-releases around then), armature joining has not worked correctly. Constraints and other attributes of bones in posemode (IK DOF limits, transform locks, custom shapes, etc.) were not preserved on the armature(s) that were joined onto the last selected armature. This was a serious production problem, as it meant that you could not easily add pre-made rig segments and merge them with the rest of your rigs without having to redo all the constraints. After a few attempts, I've finally managed to fix this. All constraints and parenting relationships get name corrections for the post- merge armatures. Action channels in actions don't really get any corrections yet unless the action is being used by an Action Constraint. Python-API people: beware, I may have broken something in this commit.
2006-11-19Fix for bug #5250: inaccurate conversion between edit and pose mode bones.Brecht Van Lommel
Using acos(dot(u, v)) to find the angle between two vectors is quite inaccurate, and there's a better way to do it, as explained here: http://www.plunk.org/~hatch/rightway.php Also changed the use of atan for computing roll to atan2 in some places, the latter avoids accuracy and division by zero issues.
2006-09-303rd attempt to commit, metaball fixes and small vector optimizationCampbell Barton
2006-08-26added tipRadius and headRadius bone propertiesCampbell Barton
2006-07-06===Python API===Ken Hughes
Bugfix #4369. Patch provided by Alberto Torres Ruiz (thanks) which fixes a bug in EditBone_getRoll(). Thanks!
2006-04-16a little spring cleaning to remove some compiler warnings forStephen Swaney
implicit declarations, redundant redeclarations, missing initializers, nested externs and other cruft. Cleaned up includes and moved extern _Type decls from Types.h into Types.c since that is the only place where they are needed now. Did not touch Ipo.[ch] since work is on-going there.
2006-01-28Cleanup of blender/ module; Makefiles now compile this warning free.Ton Roosendaal
Mostly was unused variables, unused functions, missing prototypes and missing include files.
2006-01-16clean up some warnings in bpy codeStephen Swaney
2006-01-13*bone.children fixJoseph Gilbert
- fixes bone.children to return direct bone children - added bone.getAllChildren() to allow previous behavior
2006-01-11*pose code for pythonJoseph Gilbert
- adds object.getPose - ability to manipulate poses /posebones - fixes a overflow bug in matrix sequence accessor - adds code to get vec/roll from mat3 - few internal fixes to NLA - ability to set bone matrices
2006-01-05I added {}'s around an if block of code to prevent gcc from sayingKent Mein
this else is ambiguous... code was if (blah) if (blah2) stuff; else stuff2; its now if (blah) { if (blah2) stuff; else stuff2; } Kent
2005-12-12- Armature/Bone API for pythonJoseph Gilbert
* this resolves a number of outstanding issues with the armature api and gets this ready for release - add/remove bones possible - rolls work correctly now! - ik'ing to parent should work - flags for tip/root/bone selection - etc.
2005-11-07*armature api for pythonJoseph Gilbert
- don't get too excited - allows you to get armatures from a scene - makeEditable()/saveChanges() puts the armature into out of editmode (pythonically) - Armature.bones is a dictionary that contains all the bones in the armature and can be iterated - getters are available for: name, roll (dictionary) keys are BONESPACE, ARMATURESPACE head (dictionary) keys are BONESPACE, ARMATURESPACE tail (dictionary) keys are BONESPACE, ARMATURESPACE matrix (dictionary) keys are BONESPACE, ARMATURESPACE weight deform_dist subdivisions options (list of constants) parent children Setter work only in editmode. Some are not fully implemented. Type class is embedded in the module. This means the construct is called as follows: Blender.Armature.ArmatureType() import Blender.Armature as Armature arm = Armature.Get('myarm') for name, bone in arm.bones.items(): ...print name, bone, bone.matrix['ARMATURESPACE'] more documentation is forth coming. This is an alpha for this api.
2005-10-10Stupid me! Committed in wrong console with wrong dir... here's the rest ofTon Roosendaal
all files for the Ipo/Action/NLA makeover...
2005-09-11Bug fix #3033Ton Roosendaal
Using "make parent armature with creating vertex groups" option gave corrupted memory when one or more bones had the "Deform" option not set. Was caused by old boneclass SKINNABLE variable. To end this confusement, removed this define from code. Note for future Armature tool coders; don't use this bonelooper functionality. Operations in Object mode for armatures should use the Pose Channels, which is a simple ListBase to go over. I have to recode the 'create vertexgroups' still...
2005-08-28Integration of new IK lib features in Armature Poses.Ton Roosendaal
Best is to forget yesterday's commit and old docs. New docs are underway... Here's how IK works now; - IK chains can go all the way to the furthest parent Bone. Disregarding the old option "IK to Parent" and disgregarding whether a Bone has an offset to its parent (offsets now work for IK, so you can also make T-bones). - The old "IK to Parent" option now only does what it should do: it denotes whether a Bone is directly connected to a Parent Bone, or not. In the UI and in code this option is now called "Connected". - You can also define yourself which Bone will become the "Root" for an IK chain. This can be any Parent of the IK tip (where the IK constraint is). By default it goes all the way, unless you set a value for the new IK Constraint Panel option "Chain Lenght". - "Tree IK" now is detected automatic, when multiple IK Roots are on the same Bone, and when there's a branched structure. Multiple IK's on a single chain (no branches) is still executed as usual, doing the IK's sequentially. - Note: Branched structures, with _partial_ overlapping IK chains, that don't share the same Root will possibly disconnect branches. - When you select a Bone with IK, it now draws a yellow dashed line to its Root. - The IK options "Location Weight" and "Rotation Weight" are relative, in case there's a Tree IK structure. These weights cannot be set to zero. To animate or disable IK Targets, use the "Influence" slider. - This new IK is backwards and upwards compatible for Blender files. Of course, the new features won't show in older Blender binaries! :) Other changes & notes; - In PoseMode, the Constraint Panel now also draws in Editing Buttons, next to the Bones Panel. - IK Constraint Panel was redesigned... it's still a bit squished - Buttons "No X DoF" is now called "Lock X". This to follow convention to name options positive. - Added Undo push for Make/Clear Parent in Editmode Armature - Use CTRL+P "Make Parent" on a single selected Bone to make it become connected (ALT+P had already "Disconnect"). On todo next; Visualizing & review of Bone DoF limits and stiffness
2005-08-19Forgot hidden flag update in this file...Ton Roosendaal
2005-07-27Cleanup & goodies for rigging geeks! :)Ton Roosendaal
- PoseMode: Wkey menu, "Flip Left/Right Names". On selected bones, it flips the L/R tags in names, and calls the proper code to rename everything that's related (constraint targets, bone-childs, etc). - PoseMode: Shift+S snapmenu: snap cursor to selected now works - Outliner: select bones now correctly sets 'active' flag for bones, updating the UI as well. Also made sure you cannot select hidden bones in outliner. - 3DWindow: in PoseMode/EditMode draws name of active Bone too (with user option "Draw active object name" set. - Added the new Armature/PoseMode options in View3D pulldowns. Cleanup: - moved Pose code from editaction.c to poseobject.c - removed BSE_editaction.h and BSE_editaction_types.h, moved contents of it to BIF_editaction.h. One include per C file should be fine. :) I know the src/ structure would require more elaborated includes, but we don't have that now...
2005-07-18Header file clean up and warning fixesJoseph Gilbert
- Mostly this cleans up the #includes and header files in the python project. - Warning fixes are mostly casting issues and misc fixes. General warning clean up. - #include Python.h MUST come as the first include to avoid the POSIX redefine warning in the unix makefiles - fno-strict-aliasing flag added to makefile to fix a unavoidable type punning warning in types.c
2005-07-14Mathutils updateJoseph Gilbert
- also included is some fixes for preprocessor inclues and some clean up of the previous commit -rewrite and bugfixes ---------------------------------- Here's my changelog: -fixed Rand() so that it doesn't seed everytime and should generate better random numbers - changed a few error return types to something more appropriate - clean up of uninitialized variables & removal of unneccessary objects - NMesh returns wrapped vectors now - World returns wrapped matrices now - Object.getEuler() and Object.getBoundingBox() return Wrapped data when data is present - Object.getMatrix() returns wrapped data if it's worldspace, 'localspace' returns a new matrix - Vector, Euler, Mat, Quat, call all now internally wrap object without destroying internal datablocks - Removed memory allocation (unneeded) from all methods - Vector's resize methods are only applicable to new vectors not wrapped data. - Matrix(), Quat(), Euler(), Vector() now accepts ANY sequence list, including tuples, list, or a self object to copy - matrices accept multiple sequences - Fixed Slerp() so that it now works correctly values are clamped between 0 and 1 - Euler.rotate does internal rotation now - Slice assignment now works better for all types - Vector * Vector and Quat * Quat are defined and return the DOT product - Mat * Vec and Vec * Mat are defined now - Moved #includes to .c file from headers. Also fixed prototypes in mathutils - Added new helper functions for incref'ing to genutils - Major cleanup of header files includes - include Mathutils.h for access to math types - matrix.toQuat() and .toEuler() now fixed take appropriate matrix sizes - Matrix() with no parameters now returns an identity matrix by default not a zero matrix - printf() now prints with 6 digits instead of 4 - printf() now prints output with object descriptor - Matrices now support [x][y] assignment (e.g. matrix[x][y] = 5.4) - Matrix[index] = value now expectes a sequence not an integer. This will now set a ROW of the matrix through a sequence. index cannot go above the row size of the matrix. - slice operations on matrices work with sequences now (rows of the matrix) example: mymatrix[0:2] returns a list of 2 wrapped vectors with access to the matrix data. - slice assignment will no longer modify the data if the assignment operation fails - fixed error in matrix * scalar multiplication - euler.toMatrix(), toQuat() no longer causes "creep" from repeated use - Wrapped data will generate wrapped objects when toEuler(), toQuat(), toMatrix() is used - Quats can be created with angle/axis, axis/angle - 4x4 matrices can be multiplied by 3D vectors (by popular demand :)) - vec *quat / quat * vec is now defined - vec.magnitude alias for vec.length - all self, internal methods return a pointer to self now so you can do print vector.internalmethod() or vector.internalmethod().nextmethod() (no more print matrix.inverse() returning 'none') - these methods have been deprecated (still functioning but suggested to use the corrected functionality): * CopyVec() - replaced by Vector() functionality * CopyMat() - replaced by Matrix() functionality * CopyQuat() - replace by Quaternion() functionality * CopyEuler() - replaced by Euler() functionality * RotateEuler() - replaced by Euler.rotate() funtionality * MatMultVec() - replaced by matrix * vector * VecMultMat() - replaced by vector * matrix - New struct containers references to python object data or internally allocated blender data for wrapping * Explaination here: math structs now function as a 'simple wrapper' or a 'py_object' - data that is created on the fly will now be a 'py_object' with its memory managed by python * otherwise if the data is returned by blender's G.main then the math object is a 'simple wrapper' and data can be accessed directly from the struct just like other python objects.
2005-07-03Result of 2 weeks of quiet coding work in Greece :)Ton Roosendaal
Aim was to get a total refresh of the animation system. This is needed because; - we need to upgrade it with 21st century features - current code is spaghetti/hack combo, and hides good design - it should become lag-free with using dependency graphs A full log, with complete code API/structure/design explanation will follow, that's a load of work... so here below the list with hot changes; - The entire object update system (matrices, geometry) is now centralized. Calls to where_is_object and makeDispList are forbidden, instead we tag objects 'changed' and let the depgraph code sort it out - Removed all old "Ika" code - Depgraph is aware of all relationships, including meta balls, constraints, bevelcurve, and so on. - Made depgraph aware of relation types and layers, to do smart flushing of 'changed' events. Nothing gets calculated too often! - Transform uses depgraph to detect changes - On frame-advance, depgraph flushes animated changes Armatures; Almost all armature related code has been fully built from scratch. It now reveils the original design much better, with a very clean implementation, lag free without even calculating each Bone more than once. Result is quite a speedup yes! Important to note is; 1) Armature is data containing the 'rest position' 2) Pose is the changes of rest position, and always on object level. That way more Objects can use same Pose. Also constraints are in Pose 3) Actions only contain the Ipos to change values in Poses. - Bones draw unrotated now - Drawing bones speedup enormously (10-20 times) - Bone selecting in EditMode, selection state is saved for PoseMode, and vice-versa - Undo in editmode - Bone renaming does vertexgroups, constraints, posechannels, actions, for all users of Armature in entire file - Added Bone renaming in NKey panel - Nkey PoseMode shows eulers now - EditMode and PoseMode now have 'active' bone too (last clicked) - Parenting in EditMode' CTRL+P, ALT+P, with nice options! - Pose is added in Outliner now, with showing that constraints are in the Pose, not Armature - Disconnected IK solving from constraints. It's a separate phase now, on top of the full Pose calculations - Pose itself has a dependency graph too, so evaluation order is lag free. TODO NOW; - Rotating in Posemode has incorrect inverse transform (Martin will fix) - Python Bone/Armature/Pose API disabled... needs full recode too (wait for my doc!) - Game engine will need upgrade too - Depgraph code needs revision, cleanup, can be much faster! (But, compliments for Jean-Luc, it works like a charm!) - IK changed, it now doesnt use previous position to advance to next position anymore. That system looks nice (no flips) but is not well suited for NLA and background render. TODO LATER; We now can do loadsa new nifty features as well; like: - Kill PoseMode (can be option for armatures itself) - Make B-Bones (Bezier, Bspline, like for spines) - Move all silly button level edit to 3d window (like CTRL+I = add IK) - Much better & informative drawing - Fix action/nla editors - Put all ipos in Actions (object, mesh key, lamp color) - Add hooks - Null bones - Much more advanced constraints... Bugfixes; - OGL render (view3d header) had wrong first frame on anim render - Ipo 'recording' mode had wrong playback speed - Vertex-key mode now sticks to show 'active key', until frame change -Ton-
2005-05-22Roll back changes from Big Mathutils Commit on 2005/05/20.Stephen Swaney
2005-05-20-rewrite and bugfixesJoseph Gilbert
---------------------------------- Here's my changelog: -fixed Rand() so that it doesn't seed everytime and should generate better random numbers - changed a few error return types to something more appropriate - clean up of uninitialized variables & removal of unneccessary objects - NMesh returns wrapped vectors now - World returns wrapped matrices now - Object.getEuler() and Object.getBoundingBox() return Wrapped data when data is present - Object.getMatrix() returns wrapped data if it's worldspace, 'localspace' returns a new matrix - Vector, Euler, Mat, Quat, call all now internally wrap object without destroying internal datablocks - Removed memory allocation (unneeded) from all methods - Vector's resize methods are only applicable to new vectors not wrapped data. - Matrix(), Quat(), Euler(), Vector() now accepts ANY sequence list, including tuples, list, or a self object to copy - matrices accept multiple sequences - Fixed Slerp() so that it now works correctly values are clamped between 0 and 1 - Euler.rotate does internal rotation now - Slice assignment now works better for all types - Vector * Vector and Quat * Quat are defined and return the DOT product - Mat * Vec and Vec * Mat are defined now - Moved #includes to .c file from headers. Also fixed prototypes in mathutils - Added new helper functions for incref'ing to genutils - Major cleanup of header files includes - include Mathutils.h for access to math types - matrix.toQuat() and .toEuler() now fixed take appropriate matrix sizes - Matrix() with no parameters now returns an identity matrix by default not a zero matrix - printf() now prints with 6 digits instead of 4 - printf() now prints output with object descriptor - Matrices now support [x][y] assignment (e.g. matrix[x][y] = 5.4) - Matrix[index] = value now expectes a sequence not an integer. This will now set a ROW of the matrix through a sequence. index cannot go above the row size of the matrix. - slice operations on matrices work with sequences now (rows of the matrix) example: mymatrix[0:2] returns a list of 2 wrapped vectors with access to the matrix data. - slice assignment will no longer modify the data if the assignment operation fails - fixed error in matrix * scalar multiplication - euler.toMatrix(), toQuat() no longer causes "creep" from repeated use - Wrapped data will generate wrapped objects when toEuler(), toQuat(), toMatrix() is used - Quats can be created with angle/axis, axis/angle - 4x4 matrices can be multiplied by 3D vectors (by popular demand :)) - vec *quat / quat * vec is now defined - vec.magnitude alias for vec.length - all self, internal methods return a pointer to self now so you can do print vector.internalmethod() or vector.internalmethod().nextmethod() (no more print matrix.inverse() returning 'none') - these methods have been deprecated (still functioning but suggested to use the corrected functionality): * CopyVec() - replaced by Vector() functionality * CopyMat() - replaced by Matrix() functionality * CopyQuat() - replace by Quaternion() functionality * CopyEuler() - replaced by Euler() functionality * RotateEuler() - replaced by Euler.rotate() funtionality * MatMultVec() - replaced by matrix * vector * VecMultMat() - replaced by vector * matrix - New struct containers references to python object data or internally allocated blender data for wrapping * Explaination here: math structs now function as a 'simple wrapper' or a 'py_object' - data that is created on the fly will now be a 'py_object' with its memory managed by python * otherwise if the data is returned by blender's G.main then the math object is a 'simple wrapper' and data can be accessed directly from the struct just like other python objects.
2005-03-09big warning hunt commitJean-Luc Peurière
lot of casts, added prototypes, missing includes and some true errors
2005-02-09BPython:Willian Padovani Germano
- applied Campbell Barton's patch for access to Oops location and selection of materials, mesh data and objects, slightly modified. Thanks, Campbell; - got rid of warnings in many files, hopefully not introducing any other during the process. Mostly this was done: 1) new EXPP_incr_ret_True/False functions were added and used instead of "Py_INCREF(Py_True/False); return Py_True/False;". Currently at least the functions use the fact that PyTrue/False == 1/0 and use 1 and 0 to avoid the warnings. 2) Filling of certain types structs got 0's added for all not defined data and methods. This is surely Python version specific, since these structs can change size and content at each major version number Python update.
2005-01-25bugfix: #2117 Overflow in Armature.Bone.setName()Stephen Swaney
contributed by Joilnen B. Leite (pidhash).
2004-10-07Another step in the Big Bpy Cleanup.Stephen Swaney
- move static declarations and data definitions out of headers. the BGL module still need cleaning. - move declarations out of modules.h and into appropriate .h files. modules.h still exists as a container for the few modules that need to #include almost everything. - all files now have a $Id tag and have been formatted by indent there are no changes to executable code. pre-commit versions are tagged with bpy-cleanup-pre-20041007 for the sake of paranoia.
2004-09-26Another round in the Great BPy Cleanup:Stephen Swaney
Run everything thru indent to cleanup spaces vs tabs. Clean up some of the comments by hand. BGL.c was not touched due to all that macro wackyness. There are no functional changes to the code. Pre-indent versions of source are tagged with tag bpy-cleanup-20040925 , just in case.
2004-09-18One small part of the Great Bpy Code Cleanup.Stephen Swaney
Add cvs $Id tag to files
2004-05-25- added Boneclass supportJoseph Gilbert
- ability to get a bonespace/worldspace bone matrix - get ik flag - some tweaking to matrix updates for addBone()
2004-05-11- bugfix #1197 (New Bone.parent/child Access Destructive)Joseph Gilbert
- a major redo of the Bone module - BPy_Bone structs are separated into Bone data and python vars. This is necessary for the correct memory allocation of bone data between python and the global armature list.
2004-05-05 - PyInt_AsLong() was called on a possibly NULL object, this may beDaniel Dunbar
a checked error but is no good anyway - Bone_dealloc free'd Blender's actual copy of the Bone! AGH!!!! - On syntax errors the python global dictionary was being free'd twice. AGH!!! again! Can someone from the Python team please audit this.
2004-04-19-NLA module addedJoseph Gilbert
-ability to set poses for the armatures - allows for keyframing armatures -adds support for actions/actionchannels -additional checking for addBone and clear parenting -moved getActionIpos from object module to NLA module
2004-04-15- parenting checks for bone additions to armatureJoseph Gilbert
- update to addBone parenting transform code - hide/unhide bones - draw axes/draw names - clear parenting and clear children from bones - removes childbase links from bone and set as root or remove parenting and set as root
2004-04-06- quaternion support for bone typeJoseph Gilbert
- get/set bone weighting
2004-04-05- getBones() fixed - returns all armature bones including childrenJoseph Gilbert
2004-04-04- added support for adding/parenting bones to armaturesJoseph Gilbert
- fixed getArmatureIpo compiling error
2004-03-31more housekeeping. move static declarations and definititions out of .h files.Stephen Swaney
tidy up initializers and c++ style comments.
2004-01-23BPython:Willian Padovani Germano
- local tentative fix for BLI_gethome(), which returns '.blender' appended only on some Windows systems. Created bpymenu_gethome() to check and add '.blender' if needed. - changed name: .Bpymenus to Bpymenus as suggested by GSR - trivial additions: Object module: added methods .set/getSize Armature/Bone module: bone.set???() methods now accept both n floats or a list of n floats: fff or (fff). All these additions were requested by user Carlos Lopez (Klopes). - New doc: for module Registry.
2003-10-26Exppython:Willian Padovani Germano
- Added "Radio" to Material modes - Fixed bug in bone.getParent (bug report on blender.org py forum) - Added more types to object.shareFrom (method to share obdata) - Added nmesh.get/setMaxSmoothAngle and nmesh.get/setSubDivLevels - Updated NMesh doc
2003-08-05Exppython:Willian Padovani Germano
- Fixed bug #399: Old bug on NMesh: segfault on NMesh.Face(vertexlist). - Fixed bug #433: "Typo" on Armature: bone's setQuat method was changing bone->head, not bone->quat.
2003-07-31* got rid of a warning in editipo.c:Willian Padovani Germano
changed "get_ipo(key, ..." to "get_ipo((ID *)key, ..." in line 107. * changed insert_meshkey(Mesh *me) to insert_meshkey(Mesh *me, short offline): To call this function from a script, so that it doesn't pop the "relative / absolute" dialog window when the "offline" arg is non-zero. Exppython: * NMesh module: - Added method NMesh.addMaterial(mat) to the NMesh module: alternative safer (aka slower) way to add materials. - Added optional arg to NMesh_update(): if given and equal to 1, the mesh normals are recalculated. - Fixed NMesh.getVertexInfluences: it was segfaulting when a NULL bone was linked to the vertex. Thanks to Jiba on the bf-python mailing list for bug report and sample .blend file. Also made this method give an IndexError when the vertex index is out of range. * Material module: Added specR, specG, specB vars for compatibility with the 2.25 API. Pointed by Manuel Bastioni. * Image module: Exposed image width, height and depth parameters. From a suggestion by jms. * BPython Ref Doc: - Small updates to reflect the above additions. - Added info for the Bone type in the Armature doc.