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-05-23Typos and whitespace tweaksJoshua Leung
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-25Bugfix #8736: Follow Path constraints does not work for BonesJoshua Leung
This appears to be a long-standing bug, and it only affected the Follow-Path constraint as it was the only one which was dependant on time-based changes. An oversight in the depsgraph code meant that Follow-Path constraints on armature bones were not evaluated, unless there was an Action or some NLA-Strips for that armature. I've added a new flag to pose->flag (POSE_CONSTRAINTS_TIMEDEPEND) which only gets set/cleared by update_pose_constraint_flags. This flag indicates that the depsgraph needs to do an update for such cases, and will require going in/out of EditMode to set this for old files. It's been implemented as such to avoid having costly searches when trying to run animations realtime (as is done for modifiers).
2008-02-14Bugfix #8283: PyConstraints menu problemsJoshua Leung
The menu listing the scripts available for use was not working correctly for newly created PyConstraints. This was caused by a missing initialisation for the 'active' index.
2008-02-10Constraints Bugfixes/Tweaks:Joshua Leung
* Optimised transform constraint a bit * PyConstraints now show the script-selection menu correctly when a new constraint is added (i.e. it now displays the correct initial value).
2008-01-25== Limit Distance Constraint ==Joshua Leung
Added a new constraint, "Limit Distance". This constraint defines a 'virtual sphere' around the target which the owner can be made to stay inside, outside, or on the surface of it. This constraint is best used when applied using the Ctrl-Alt-C hotkey, as the radius is set correctly that way. One usage, is to prevent the target of an IK-chain from straying away from the chain. Care should be taken to not use a member of the IK-chain as the target though. Description of Variables: * 'Dist' - Radius of virtual sphere * 'R' - Click on this to recalculate the 'Dist' value (note: like the 'R' button in the StretchTo constraint, this is currently buggy) ' Mode' - This menu gives different options for how the limiting sphere should act. The mode names are self explanatory. * 'Soft' and 'SoftDistance' - currently not functional (so settings are hidden). These are used to define a smaller radius around the sphere of influence where a non-linear relationship between input and resulting locations occurs to prevent the owner 'crashing' into the sphere.
2008-01-06One-liner fix: Joshua Leung
IK-constraint was broken by code cleanups, as it required the pole-target to be set too.
2008-01-05Bugfix #7793: ChildOf Constraint works bad for bonesJoshua Leung
I hope this time I've fixed it once and for all. The cases which use to fail seem to work now, so I assume it's now fixed. In case it isn't, I'll leave the bug report open for a few days first.
2008-01-05== Constraints - Code Cleanups ==Joshua Leung
* Tidied up coding style of code in editconstraint.c - removed blank lines, made whitespace-use more consistent * Shuffled code in editconstraint.c and BIF_editconstraint.h so that it was in a more orderly fashion * Reduced code redundancy in test_constraints - tests which can apply to general constraints (target existance, and clashes with the owner) are not copied out for each constraint that needs it - ChildOf constraint now gets validated too (before it was missing such checks) * Recoded the way PyConstraints build the menu for displaying scripts available for use. It now uses dynstr instead of guessing how much memory to allocate for each entry
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-23More constraints bugfixes:Joshua Leung
* Fixed crash that occurs when using an unknown constraint type or a Null constraint - missing NULL check * ClampTo constraint now draws ok again * Null constraints now get drawn in the stack again
2007-10-22== Constraints Bugfixes ==Joshua Leung
* Removed the old get_con_subtarget_name function and fixed the places that used it. This was only suitable for single-target constraints. * PyConstraints interface drawing should now no longer draw multiple-target fields on top of each other * Removed double call to BPY_pyconstraint_update when the Update button was clicked. I found this while debugging why PyConstraints didn't seem to be working yet...
2007-10-22== Action Constraint ==Joshua Leung
Now the Action Constraint can be applied to Objects as well as Bones!
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-08-15== Child-Of Constraint ==Joshua Leung
Now 'Set Inverse' works correctly for PoseChannels in all cases. Previously, it was still using a temporary hack that failed when 'parent' bone had any transforms.
2007-08-05Little code cleanup. Joshua Leung
bsystem_time was being called with an extra variable, which was useless. Most of the places that called it, were passing NULL for that variable anyway. I've also cleaned up that function a bit, but the underlying problems with that part of the code still exist (EVIL GLOBALS that are exported for frame_to_float), for mblur and fields rendering features. That remains for another time.
2007-07-29More Constraints Bugfixes:Joshua Leung
* Transform Constraint should now work in more cases. Somehow the old code (for location case) wasn't working correctly. * ChildOf Constraint applied on objects, should now get the right 'inverse'/'offset' matrix set. It now uses the same code that is used by Blender's parenting method to do so.
2007-07-21== Transformation Constraint ==Joshua Leung
This commit adds a new constraint to Blender: the Transformation Constraint. This constraint gives you more freedom to choose how transforms are copied from one object/bone to another object/bone. You can assign the Loc/Rot/Scale channels of a source to the Loc/Rot/Scale channels of a destination, specifying the range of motion (per axis) from the source to consider, and the range of motion (per axis) that will be applied to the destination. Also, for each destination axis, you can choose which of the source axes to copy from. A similar constraint was coded by Jason Blary (snark), as Patch #4991. This constraint is basically rewritten from scratch, although there are some elements of the original patch which may be borrowed in future. Various notes: * PyAPI access has been coded. * Space conversion is also enabled for this constraint. * Also the useless get_constraint_col function has been removed * Doing a rotation copy with a ratio that is not 1:1 doesn't always work correctly yet (like for the Copy Rotation constraint).
2007-07-15A few minor changes:Joshua Leung
* Removed obsolete comments from constraints code * ChildOf constraint buttons: Set/Clear Inverse are now Set/Clear Offset. Hopefully that makes it a bit clearer for users.
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
2007-06-20== PyConstraints - 2 Fixes ==Joshua Leung
* Error print for getSettings was lacking a newline * When adding a PyConstraint using Ctrl-Alt-C, the script is now queried to find out whether it uses a target.
2007-06-20== Constraints - Code Cleanup ==Joshua Leung
Simplified the code in two functions where checking for targets/subtargets could really have been done using Constraint API methods (constraint_has_target, get_constraint_target).
2007-06-18== PyConstraints ==Joshua Leung
At last! The ability to code constraints in Python. This opens up many interesting rigging possibilities, as well as making prototyping constraints easier. * A PyConstraint script must begin with the line #BPYCONSTRAINT * It must also define a doConstraint function, which performs the core actions of the constraint. * PyConstraints use IDProperties to store custom properties for each PyConstraint instance. The scripter can choose which of these ID-Properties to expose to a user to control the behaviour of the constraint. This must be done using the Draw.PupBlock method. Credits to Joe Eager (joeedh) for coding the original patch on which this is based. I've made heavy revisions to large parts of the patch. For more detailed information, and some demo scripts, see the following page: http://aligorith.googlepages.com/pyconstraints2
2007-04-07Missing ; at the end of a line in initial commit for ClampTo constraint.Joshua Leung
2007-04-07== Clamp-To Constraint (was Patch #4818) ==Joshua Leung
This (new) constraint limits the location of an object/bone to the range of locations on a given curve. It works by comparing the location of the owner on one axis, to the extents of the curve's bounding-box on the same axis, to find the location on the curve. Usage Notes: * 'Ob:' field must point to a valid curve object * This curve should have 'Path' turned on in order for this constraint to work. You don't really need to do this as it will be taken care of by the code. * 'Auto' toggle automically determines which axis should be used for the distance estimations/calculations. It is the default option, but may not work that well for some cases. * X/Y/Z toggles can be used to select the axis to use for these calculations. Try to choose the axis along which the curve stretches out for most. Python Notes: Python API access for this constraint is not included in this commit. Will be coming soon.
2007-03-12python apiCampbell Barton
removed most custom add_*data* wrappers from Main.c removed makeCurrent() from Text.c (was never in a release), use "bpy.texts.active = text" now clamp new image sizes made add_empty_action accept a string rather then a blocktype since the blocktype was only being used to choose one of 3 strings anyway.
2006-12-20Warning fixes for previous Image commit, also fixed verse_image.cTon Roosendaal
2006-12-17== Transform Limiting Constraints ==Joshua Leung
Two tweaks: * Reduced the amount of empty space at the bottom of these constraints. * When using the Add Constraint menu (Ctrl Alt C) to add new constraints, an empty is no longer created when creating a "Limit *" constraint.
2006-12-15== Add Constraints Menu ==Joshua Leung
Now, it is possible to add action constraints to the last selected bone from the Add Constraint Menu (Ctrl Alt C)
2006-11-30Proxy Objects revisited!Ton Roosendaal
The first incarnation assumed that proxies were local objects per definition. Unfortunately that makes it impossible to - for example - reference-link an entire Scene with proxies, to be used as a special character set. This commit makes the proxy implementation also a bit more clear. Related work: the scene-sets were not executed fully or correctly for the dependency graph. That happens now (in 3d view) as well.
2006-11-161)Ton Roosendaal
Bugfix: Beziers in curve didn't calculate the tilt values correctly for the endpoint and not for all handle types. That way deforming curves didn't extend the tilted deform either. (IRC report by Jahka) 2) If you setup a Proxy for Armatures, the protected bones now have an error pupup for buttons and for some of the tools in 3d window (constraint edit mostly). Also the Bones Panel shows a note when the bone is not editable.
2006-11-02Bugfix #5022Ton Roosendaal
If you rename a Constraint, the used Constraint Channels (Ipo curves) were not renamed as well, making animations not work anymore. Now renaming works up to this level: - own object constraints - own object Action constraints This is identical to Bone renaming. Note that other actions (like in NLA) are not corrected for renaming. Have to look at ways to provide that once.
2006-08-13Patch: Constraints to Limit Transforms (#4662) by Joshua Leung (aligorith)Martin Poirier
This adds three new constraints to limit the range of location, rotation and scaling values.
2006-06-15Changed some references to 'size' to now refer to 'scale'. If anybodyChris Want
sees a reference to size, as it pertains to a 3D object, please let me know.
2006-04-09Bugfix #3781Ton Roosendaal
Using the new "Add constraint" hotkey (CTRL+ALT+C) or the option in the pulldown menu, didn't set a proper flag in Curve object when a "Follow Path" constraint was choosen.
2006-02-19Path: [ #2789 ] Add a "copy size" constraintMartin Poirier
At long last! This new constraint is pretty simple. Following in the footsteps of such giants as Copy Loc and Copy Rot, it lets you constrain the size of an object/bone to another object/bone, with per axis restrictions.
2006-01-11Tuesday merger of bf-blender into orange branch.Ton Roosendaal
2006-01-06Lots of stupid warning fixes:Kent Mein
Added newlines at end of a bunch of files that didn't have them. removed a couple of unused variables and an extra ';' (Also removed config.h crap from these files) Kent
2005-12-19Orange: monday merger with bf-blender (loadsa bugfixes).Ton Roosendaal
ALso: a bit tidying up in editaction.c and python Object.c
2005-12-18* Updates for missing menu itemsMatt Ebb
2005-12-14Orange: On adding constraints, names are now unique per object/bone, thisTon Roosendaal
prevents confusing situations when adding constraint ipos.
2005-12-08Orange: More fixes in bone-layers (#$@%!).Ton Roosendaal
- constraint buttons were drawing the hidden bone settings - ctrl+I or 'Add constraint' didn't respect layers yet
2005-10-30Two new IK features.Ton Roosendaal
1) Target-less IK If you add an IK constraint without a target set (no object or bone target), it now can be grabbed and moved with IK, using its own Bone tip or root as target itself. This way you can use IK for posing, without having the IK executed while it animates or while a Pose is being solved for real IK. After grabbing "Target-less IK", it applies the resulted motion in the pose-channels, which then can be used to insert keypositions. The Target-less IK bone can still be rotated without IK, also its chain can be edited as usual. UI: The CTRL+I menu gives this as an option too. In the 3D window it is drawn with orangish color. Note that IK is not resistant to non-uniform scaling yet. 2) Auto-IK When the option "Automatic IK" is set, in Edit Buttons Armature Panel, it creates automatic temporal Target-less IK for the Bone you grab or translate. The rules are: - it only works when a single Bone is selected - if the Bone is a root bone (no parent), it adds IK to the end of the chain(s) - otherwise it adds the IK to the active Bone - the temporal IK chain only consists of connected Bones. This method is still a bit experimental. Maybe it should become a special grabbing option (like SHIFT+G in Pose Mode). It also only works OK for rigs that fit for it well... when a rig already is fully setup with IK it can't do much good. :)
2005-10-27CTRL+I, pose mode, added accidentally a location constraint, when having 2Ton Roosendaal
Bones selected.
2005-10-24Bugix #3200Ton Roosendaal
DAG_object_flush_update() always used scene layers, causing updates to go wrong with 3d windows with "Lock" off (allowing local layer and camera). This fixes a larger amount of potential issues. Also: fixed menu title for adding IK constraint to Bone (CTRL+I).
2005-10-23New: Hotkey/menu access in 3D window to add constraints. Works in PoseModeTon Roosendaal
as well as for Objects. Hotkey: CTRL+ALT+C (bit clumsy I know, but I like to use the Ckey). Constraints are added to the active Object or Bone. Based on selection context, the menu has three versions: Pose Mode: - if another bone is selected, bone becomes target - else if another Object is selected, Object becomes target - else it adds a new Empty as target Object Mode - if another Object is selected: Object becomes target - else it adds a new Empty as target Same works this way now for CTRL+I, "Add IK". To be solved: ALT+C in PoseMode is "Clear Constraints", but in Object Mode it does "Convert" still...
2005-10-10Stage two of the giant animation recode project; Ipo/Action/NLA cleanupTon Roosendaal
-> Note; added 2 new c files (split editipo.c). MSVC needs upgrade. Impatient people can check the goodies in CMS: http://www.blender3d.org/cms/Action_and_NLA_editor.706.0.html Most work was on trying to unwind the spaghetti for editing ipos. Too much history and bad design got added here. Most evident changes: - made generic 'context' for detecting which Ipo is being edited, or to assign ipos or to retrieve ipo curves. - made generic insertkey() for all ipo types, including actions - shuffled a lot of code around to make things more logical. Also made sure local functions are not exported It is far from ready... when action/nla was added in Blender, a lot of duplicate code was generated. That's for another time. Now the goodies; - made Actions to allow any Ipo type - made NLA to define active actions, for Action window too - corrected timing for active action, so it shows the 'real time', as defined in NLA editor. I did update python code, but that would require testing. Testing is needed for this commit in general, too many changes happened on all levels of the animation system. :) Will keep track of all reports this evening, hopefully it doesnt break the pre-release schedule!
2005-09-07Roland Hess' Floor Constraint patch: ↵Martin Poirier
https://projects.blender.org/tracker/?func=detail&aid=2993&group_id=9&atid=127 Minor modifications to simplify the code in evaluate_constraint. The "Stick" feature will need more work as it gives bad results when skipping frames, jumping around on the timeline and when going backward in time. Suggestion: Would be nice if it could use the local space too, not just global space planes.
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