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
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2016-11-21Cleanup: get rid of unused `BKE_constraints_relink()`.Bastien Montagne
Libquery/generic ID remapping code handles this now.
2015-03-30Cleanup: use const for typeinfoCampbell Barton
2015-03-06Fix access freed memory when doing constraints ID counter on main freeSergey Sharybin
Basically just made constraints free function aware of possible do_id_users argument, same as we've got for objects, object data and so on.
2015-02-11Outliner: ContextMenus for constraints/modifiersCampbell Barton
Context menu to toggle render, visibility & delete D996 by @lichtwerk
2015-01-11Fix T43204: Shrinkwrap constraint, project mode: Space ignored in bone case.Bastien Montagne
Own fault in rBb154aa8c060a60d to fix T42447... Reverted that commit, and added kind of not-so-nice hack instead. Note root of the issue comes from the special case we are doing here re 'Local' space of parent-less objects. In that case, local space should be the same as world one, but instead we apply the object rotation to it... This is inconsistent with all other cases and could very well lead to other issues as T42447, but afraid fixing that properly would be rather hairy - not to mention it would likely break all existing riggings etc. :( Should be safe for a 2.73a, shall we need it.
2014-04-11API Cleanup: Use BKE_constraint prefix for constraint apiCampbell Barton
2014-04-11Code cleanup: use boolCampbell Barton
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
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)