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
2012-12-23Code cleanup: add usual 'BKE_' prefix to 'public' constraint functions from ↵Bastien Montagne
blenkernel...
2012-12-11define the size of matrix args for both rows/cols.Campbell Barton
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-05-06Simplifying constraints code - removed relink_data() callbacks in favour of aJoshua Leung
more generic system which goes through id_looper(), reducing the maintainance burden for new constraint authors
2012-05-05Bugfixes for various ID-block references (Constraints, NLA)Joshua Leung
* ID-blocks referenced by Constraints but not being used as the target objects (such as Actions in the Action Constraint, or Text Blocks in PyConstraints) now get usercounts for being referenced in this way. This should fix ancient bugs such as [#19205] and [#8593]. More tests still needed to verify that this does now play nicely with proxies. * Changing actions used by NLA strips should now update the usercounts accordingly
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2011-08-12Bye bye vile relics of extinct version control systems,Joshua Leung
Causing a flurry of refresh file prompts post-commit, Confusing local diffs and causing merge conflicts, Stating the obvious; redundant and useless... We shall not miss thou, blasted expand $keywords$
2011-05-24= Limit Distance Constraint - 'For Transform' Option =Joshua Leung
The Limit Distance Constraint now has a "For Transform" option just like all the other Limit constraints. This option controls whether the constraint gets applied to interactive transforms in the 3D View too, preventing controllers from getting large values without the animator knowing. Additional code changes: * Split code to get constraint targets and grab their matrices for solving out to a separate helper function: get_constraint_targets_for_solving() * Fixed a bug where "found constraint ...." prints would appear in the console. Looks like some warning print that was forgotten TODO: * While coding this, I noticed potential division by zero bugs with the Limit Distance constraint. Looking into these after this commit.
2011-02-18doxygen: blenkernel under core as module.Nathan Letwory
2010-08-24py/rna remove functions now all work in a similar way.Campbell Barton
- some remove() functions took an int argument rather then the item to remove. - disallow None argument. - raise an error if the item isnt in the collection.
2010-04-29option to copy constraints without making their ID references direct links.Campbell Barton
needed because proxies are causing libs to be linked directly when they should be kept indirect (likely slowing load times though I didnt time this)
2010-04-26Pass constraint names as operator properties in constraint operatorsMatt Ebb
This is similar to commit revision 22078, but for constraint operators rather than modifiers, making it possible to use them from scripting.
2010-02-21Bugfix #21245: "Track to" (Ctrl + T) operator was missing notifier updatesJoshua Leung
Bugfix #21255: Clear track operator did not remove TrackTo constraints too. This could still be made to do Locked Track and other tracking constraints later too, but for now this will do.
2010-02-12correct fsf addressCampbell Barton
2010-02-06Constraints API: ID-LoopersJoshua Leung
Added a system for running a callback on all the ID-blocks referenced by constraints (like for modifiers). Also, added an API function which calls these on the constraints present in the given list. These could be used for: - the proxies + action/pyconstraint fix that campbell committed - simplification of file loading code
2009-11-24- added rna api function scene.update(), needed for rig generation to update ↵Campbell Barton
driver deps - removed some warnings
2009-11-16Constraints: Code cleanupJoshua Leung
* Removing duplicate api functions * Shuffled around newly added api functions to make the ordering more consistent * Fixes for a few bugs in the api functions as I checked over them * Replaced most of the #defines for flags and modes with enums
2009-11-16- fcurve modifiers.new()/remove()/activeCampbell Barton
- renamed .add() to .new() for rna collection functions since they dont add an existing item. - remove 'name' as an argument from the new driver target function, better to keep the api minimal and let scripters use the data api for editing values after. - added some api functions to keep rna api from becoming a mess.
2009-11-11object.constraints.add()/remove()/active, same for PoseChannelCampbell Barton
modified internal api for minimal rna wrapper functions. TODO - missing updates for pose channels - typecheck for pose/object constraints
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-12Bugfix #19616: vertex group select as IK target cause crash in Blender2.5Joshua Leung
Thanks to Masahito Takahashi (mato) for the report and patch to fix this!
2009-09-25Merge of itasc branch. Project files, scons and cmake should be working. ↵Benoit Bolsee
Makefile updated but not tested. Comes with Eigen2 2.0.6 C++ matrix library.
2009-09-022.5 - Rotation order is now taken into account for constraintsJoshua Leung
* Added a 'rotOrder' parameter for constraint evaluation objects and constraint targets, which describes the rotation mode used for the matrices there. Todos: * Constraint targets default to using XYZ only for now. This will need be be addressed eventually. * Copy Rotation constraint currently cannot use the new rotation order code for the target matrix. What's surprising is that even though it's just using XYZ as the old code did, it doesn't work, and yet everything else works nicely. Silly constraint! (it is almost impossible to improve this constraint further without breaking a rig out there)
2009-04-01Animato - Support for 'BuiltIn' and 'Relative' Keying Sets Joshua Leung
When inserting keyframes in the 3D-View (support will be extended to other editors in due course) using the IKEY hotkey, the menu which appears will now consist of 3 parts: * 'Active Keying Set' - this option allows you to use the user-defined KeyingSet which is active for the current scene (i.e. the one seen in the TimeLine/Outliner headers) * User defined Keying Sets - a list of all such available KeyingSets is included, and entries can be chosen from there * Built-In Keying Sets - see later... To achieve this, several changes needed to be made first: * Added support for 'relative' in addition to 'absolute' Keying Sets. Relative Keying Sets are Keying Sets which operate on data from the current context (i.e. a 'location' KeyingSet will add location keyframes for selected objects/bones/nodes as opposed to location keyframes for some particular object). The is a tentative 'templates' requirement system here, which still needs to be fully fleshed out. * Added support for builtin Keying Sets (i.e. 'Location', 'Rotation', 'Scaling', and 'LocRot' as a few initial demonstrations), which replaces the temporary Insert Keyframe operator for the 3D-View (IKEY). These are effectively relative Keying Set definitions which are included in Blender by default and stored in a list separate from user-defined ones. Volunteer help in defining a few more of these for other editors will be welcome soon. * Removed/replaced much of the crappy temporary Keyframing operator code, though a few tweaks could still be done.
2009-01-172.5: Blender "Animato" - New Animation System Joshua Leung
Finally, here is the basic (functional) prototype of the new animation system which will allow for the infamous "everything is animatable", and which also addresses several of the more serious shortcomings of the old system. Unfortunately, this will break old animation files (especially right now, as I haven't written the version patching code yet), however, this is for the future. Highlights of the new system: * Scrapped IPO-Curves/IPO/(Action+Constraint-Channels)/Action system, and replaced it with F-Curve/Action. - F-Curves (animators from other packages will feel at home with this name) replace IPO-Curves. - The 'new' Actions, act as the containers for F-Curves, so that they can be reused. They are therefore more akin to the old 'IPO' blocks, except they do not have the blocktype restriction, so you can store materials/texture/geometry F-Curves in the same Action as Object transforms, etc. * F-Curves use RNA-paths for Data Access, hence allowing "every" (where sensible/editable that is) user-accessible setting from RNA to be animated. * Drivers are no longer mixed with Animation Data, so rigs will not be that easily broken and several dependency problems can be eliminated. (NOTE: drivers haven't been hooked up yet, but the code is in place) * F-Curve modifier system allows useful 'large-scale' manipulation of F-Curve values, including (I've only included implemented ones here): envelope deform (similar to lattices to allow broad-scale reshaping of curves), curve generator (polynomial or py-expression), cycles (replacing the old cyclic extrapolation modes, giving more control over this). (NOTE: currently this cannot be tested, as there's not access to them, but the code is all in place) * NLA system with 'tracks' (i.e. layers), and multiple strips per track. (NOTE: NLA system is not yet functional, as it's only partially coded still) There are more nice things that I will be preparing some nice docs for soon, but for now, check for more details: http://lists.blender.org/pipermail/bf-taskforce25/2009-January/000260.html So, what currently works: * I've implemented two basic operators for the 3D-view only to Insert and Delete Keyframes. These are tempolary ones only that will be replaced in due course with 'proper' code. * Object Loc/Rot/Scale can be keyframed. Also, the colour of the 'active' material (Note: this should really be for nth material instead, but that doesn't work yet in RNA) can also be keyframed into the same datablock. * Standard animation refresh (i.e. animation resulting from NLA and Action evaluation) is now done completely separate from drivers before anything else is done after a frame change. Drivers are handled after this in a separate pass, as dictated by depsgraph flags, etc. Notes: * Drivers haven't been hooked up yet * Only objects and data directly linked to objects can be animated. * Depsgraph will need further tweaks. Currently, I've only made sure that it will update some things in the most basic cases (i.e. frame change). * Animation Editors are currently broken (in terms of editing stuff). This will be my next target (priority to get Dopesheet working first, then F-Curve editor - i.e. old IPO Editor) * I've had to put in large chunks of XXX sandboxing for old animation system code all around the place. This will be cleaned up in due course, as some places need special review. In particular, the particles and sequencer code have far too many manual calls to calculate + flush animation info, which is really bad (this is a 'please explain yourselves' call to Physics coders!).
2009-01-132.5 Joshua Leung
* Tweaked a few incorrect comments in Constraints code * Made Sequencer use View2D system correctly (only looked at the 'time-grid' thing so far).
2009-01-042.5Ton Roosendaal
Think global, act local! The old favorite G.scene gone! Man... that took almost 2 days. Also removed G.curscreen and G.edbo. Not everything could get solved; here's some notes. - modifiers now store current scene in ModifierData. This is not meant for permanent, but it can probably stick there until we cleaned the anim system and depsgraph to cope better with timing issues. - Game engine G.scene should become an argument for staring it. Didn't solve this yet. - Texture nodes should get scene cfra, but the current implementation is too tightly wrapped to do it easily.
2008-04-17Patch from GSR that a) fixes a whole bunch of GPL/BL licenseChris Want
blocks that were previously missed; and b) greatly increase my ohloh stats!
2008-03-08Bugfix #8478: Constraints PyApi for setting targetspace non-functionalJoshua Leung
Finishing off some unfinished business (from the multi-target constraints work), it is now possible to get/set target-space for constraints where this is relevant. For this to be possible, target-space setting(s) are now always presented as a list of ints, with each int representing the target-space setting for the relevant target. Constraints C-API note: get_targets function now needs to return the number of targets the constraint can have
2008-02-032 Tweaks:Joshua Leung
* Action Editor now doesn't draw channels which are out of view at all, which should help to provide (some minimal) improvements in some situations * Typo in comment in constraints code
2008-01-04== Local Constraints for Proxies (Peach Request) ==Joshua Leung
Proxy protected bones can now get local (per-file) constraints added to them, which will be preserved after a file load. This is necessary for adding constraints to proxy-protected bones for special purposes while animating (i.e. adding CopyLocs to IK-hand controls to pick up an object). These must be added after any constraints from the proxy, as proxy constraints may come and go without warning. As such, the UI forbids this from happening by removing the relevant button. I've also made UI-changes to show which constraints come from the proxy (the buttons to move the constraint up/down and delete it, are replace with two icons - a the proxy 'ghost' icon and a lock). Also, trying to change any settings of proxy-protected constraint will show an error. Notes: * Object constraints are still not playing nice with proxies yet. They didn't before this commit either...
2007-10-24Pole Target for IKBrecht Van Lommel
================== This adds an extra target to the IK solver constraint to define the roll of the IK chain. http://www.blender.org/development/current-projects/changes-since-244/inverse-kinematics/ Also fixes a crashes using ctrl+I to set an IK constraint on a bone due to the recent constraints refactor.
2007-10-22== Constraints System - Recode 2 ==Joshua Leung
Once again, I've recoded the constraints system. This time, the goals were: * To make it more future-proof by 'modernising' the coding style. The long functions filled with switch statements, have given way to function-pointers with smaller functions for specific purposes. * To make it support constraints which use multiple targets more readily that it did. In the past, it was assumed that constraints could only have at most one target. As a result, a lot of code has been shuffled around, and modified. Also, the subversion number has been bumped up. Known issues: * PyConstraints, which were the main motivation for supporting multiple-targets, are currently broken. There are some bimport() error that keeps causing problems. I've also temporarily removed the doDriver support, although it may return in another form soon. * Constraints BPy-API is currently has a few features which currently don't work yet * Outliner currently only displays the names of the constraints instead of the fancy subtarget/target/constraint-name display it used to do. What gets displayed here needs further investigation, as the old way was certainly not that great (and is not compatible with the new system too)
2007-10-15Bugfix:Brecht Van Lommel
Object constraints with a driven influence ipo were not being evaluated properly. The code for adding the depsgraph relation and updating without time changes was simply missing.
2007-08-14constraint_mat_convertspace is now no longer static/private to constraint.cJoshua Leung
2007-08-14Whitespace commit in constraints code.Joshua Leung
2007-07-24== Constraints - Important Bugfix ==Joshua Leung
I've finally fixed the bug with the Constraint Space Conversion. It was a single matrix multiplication in the wrong order (for local->pose). Also, there is more code added for the space conversion process when bones have 'hinge' on. (NOTE: this stuff for hinge bones may still not work really nice yet)
2007-07-15== Constraints System ==Joshua Leung
After just over a week of coding, I've finished doing a major refactor/cleanup of the constraints code. In the process, quite a few old kludges and ugly hacks have been removed. Also, some new features which will greatly benefit riggers have been implemented. === What's New === * The long-awaited ``ChildOf Constraint'': This allows you to animate parent influences, and choose which transformation channels the parent affects the child on (i.e. no translation/rotation/scaling). It should be noted that disabling some combinations may not totally work as expected. Also, the 'Set Inverse' and 'Clear Inverse' buttons at the bottom of this constraint's panel set/clear the inverse correction for the parent's effects. Use these to make the owner not stick/be glued to the parent. * Constraint/Target Evaluation Spaces: In some constraints, there are now 1-2 combo boxes at the bottom of their panel, which allows you to pick which `co-ordinate space' they are evaluated in. This is much more flexible than the old 'local' options for bones only were. * Action Constraint - Loc/Rot/Size Inputs The Action Constraint can finally use the target's location/rotation/scaling transforms as input, to control the owner of the constraint. This should work much more reliably than it used to. The target evaluation should now also be more accurate due to the new space conversion stuff. * Transform - No longer in Crazy Space (TM) Transforming objects/bones with constraints applied should no longer occur in Crazy Space. They are now correctly inverse-corrected. This also applies to old-style object tracking. === General Code Changes === * solve_constraints is now in constraints.c. I've removed the old `blend consecutive constraints of same type' junk, which made the code more complex than it needed to be. * evaluate_constraint is now only passed the constraint, and two matrices. A few unused variables have been removed from here. * A tempolary struct, bConstraintOb, is now passed to solve_constraints instead of relying on an ugly, static workobject in some cases. This works much better. * Made the formatting of constraint code consistent * There's a version patch for older files so that constraint settings are correctly converted to the new system. This is currently done for MajorVersion <= 244, and SubVersion < 3. I've bumped up the subversion to 3 for this purpose. However, with the imminent 2.45 release, this may need to be adjusted accordingly. * LocEulSizeToMat4 and LocQuatSizeToMat4 now work in the order Size, Rot, Location. I've also added a few other math functions. * Mat4BlendMat4 is now in arithb. I've modified it's method slightly, to use other arithb functions, instead of its crazy blending scheme. * Moved some of the RigidBodyJoint constraint's code out of blenkernel, and into src. It shouldn't be setting its target in its data initialisation function based + accessing scene stuff where it was doing so. === Future Work === * Geometry to act as targets for constraints. A space has been reserved for this already. * Tidy up UI buttons of constraints
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-08-25Huge commit, but not much features... had to shuffle a lot of code around.Ton Roosendaal
Main target was cleanup of editconstraint.c and removal of the ugly ob->activecon (active constraint channel), which was set by the "Show" button in the Constraint Panel. Better is to introduce an 'Active Constraint' itself, which stores in the Constraint itself. By using this setting, and by checking the active Bone, the UI can update reliably now. This only shows now in IpoWindow btw (for constraint ipos). The active Constraint is drawn in the Buttons with a slightly brighter backdrop. Any action in that Panel selects a constraint now (even click in backdrop). So now we have pose channels & constraint channels nicely behaving. Now the darn Action channels... :) Further in this commit: - interface.c: Button ROUNDBOX now does button callback too. Button NUMSLI didn't do the callback on a click only - Cleaned up include files in yafray, got annoyed it compiled over all the time. - removed unused variables from Constraint struct
2005-07-24Armature-Pose IK goodies!Ton Roosendaal
- Added option to the IK buttons, to have it use the 'tip' as end of the IK chain. I never really understood this old convention (IK didn't work on the Bone itself). Old files still will read OK though. But I made the "To Tip" a default when adding new IK constraints. - Hotkey CTRL+I: add IK, with option to have it adding an Empty target, or use a selected Bone as target. With the new non-modal PoseMode, it gives instant access to playing with the IK chain. - Hotkey ALT+I: clears IK, on all selected Bones - Hotkey ALT+C: clears Constraints on all selected Bones (incl IK)
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-
2004-08-16Renamed get_constraint_target in constraint kernel file to ↵Martin Poirier
get_constraint_target_matrix since that's what it really does Moved get_con_target from editconstraint to constraint kernel file and renamed to get_constraint_target Make scene.c use constraint functions from kernel instead of doing the switch itself (regrouping specific constraint code in one file). Add LockTrack as an option in the Make Track menu (Ctrl-T) Adding fun for vortex forces in 3D window, the representation now match the orientation and direction of the force (this is code will need optimisation). I'll probably be slapped for mixing two things in one commit but some function calls needed to be fixed for the new spelling and since this is really isolated code I didn't feel like wasting time getting a fresh copy, doing the changes and then readded this after commiting. Fixed some warning regarding implicit casts and constants (this last one is a MSVCism where you need to explicitely tell the compiler to use floats with an f. AFAIK, it doesn't affect/bother other compilers). Removed a useless commented piece of code in readfile (there was an uncommented copy a couple of lines before)
2004-01-27Armature related fixes and cleanups:Chris Want
* Armatures that had constraint targets inside other armatures weren't transform()-ing correctly * Issues with lattice deformed objects that are parents of bones when rendering an animation. Seems to be mostly OK now with the exception of the first rendered frame -- weird bugs like this have plagued blender for ages, which leads me to believe that RE_rotateBlenderScene() is a piece of garbage that nobody understands (especially me). * made a few helper functions to clean up some repeated code related to clearing constraint status and rebuilding displists.
2003-11-23No line for constraint without targetMartin Poirier
Code notes: The constraint_has_target can be used to test if a constraint has a target at all.
2003-10-21Constraint stuff from tuhopuu including (but probably not limited too):Martin Poirier
Axis options for TrackTo LockTrack FollowPath Auto creation of TrackTo constraint from Ctrl-T (old track still an option) Auto creation of FollowPath when parenting to path (Normal parent still an option) Backward compatibility stuff to convert the per object axis settings to per constraint when a Track constraint is present. Function to convert old track to constraint (commented out) Revamped the constraints interface with Matt's work from tuhopuu and the stuff we were discussing earlier. -------------------- For coders: unique_constraint_name and *new_constraint_data moved to the kernel (constraint.c) new Projf function in arithb gives the projection of a vector on another vector add_new_constraint now takes a constraint type (int) parameter add_constraint_to_object(bConstraint *con, Object *ob) to link a constraint to an object add_constraint_to_client(bConstraint *con) to link constraint to current client (object or bone) add_influence_key_to_constraint (bConstraint *con) to (eventually) add a keyframe to the influence IPO of a constraint
2002-12-27Removed the config.h thing from the .h's in the source dir.Kent Mein
So we should be all set now :) Kent -- mein@cs.umn.edu
2002-11-25Did all of the .h's in sourceKent Mein
(adding) #ifdef HAVE_CONFIG_H #include <config.h> #endif also the Makefile.in's were from previous patch adding the system depend stuff to configure.ac Kent -- mein@cs.umn.edu
2002-10-30fixed spacing in the headers to get rid of some warnings and some otherKent Mein
little minor spacing issues.
2002-10-12Initial revisionv2.25Hans Lambermont