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
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-27Constraints: replace 'Set Inverse' operator with an eval-time updateSybren A. Stüvel
This fixes {T70269}. Before this commit there was complicated code to try and compute the correct parent inverse matrix for the 'Child Of' and 'Object Solver' constraints outside the constraint evaluation. This was done mostly correctly, but did have some issues. The Set Inverse operator now defers this computation to be performed during constraint evaluation by just setting a flag. If the constraint is disabled, and thus tagging it for update in the depsgraph is not enough to trigger immediate evaluation, evaluation is forced by temporarily enabling it. This fix changes the way how the inverse matrix works when some of the channels of the constraint are disabled. Before this commit, the channel flags were used to filter both the parent and the inverse matrix. This meant that it was impossible to make an inverse matrix that would actually fully neutralize the effect of the constraint. Now only the parent matrix is filtered, while inverse is applied fully. As a result, pressing the 'Set Inverse' matrix produces the same transformation as disabling the constraint. This is also reflected in the changed values in the 'Child Of' unit test. This change is not backward compatible, but it should be OK because the old way was effectively unusable, so it is unlikely anybody relied on it. The change in matrix for the Object Solver constraint is due to a different method of computing it, which caused a slightly different floating point error that was slightly bigger than allowed by the test, so I updated the matrix values there as well. This patch was original written by @angavrilov and subsequently updated by me. Differential Revision: https://developer.blender.org/D6091
2019-12-24Action Constraint: introduce a mix mode setting.Alexander Gavrilov
Currently the action channels are applied after the existing transformation, as if the action controlled a child of the bone. This is not very natural, but more importantly, the transform tools are not designed to work conveniently with an additional 'pseudo-child' transformation, resulting in effects like an unexpected pivot location. Implementing a Before mode that integrates the action channels as if applied to a parent allows using the special transform tool code intended for dealing with such constraints. Note that in either mode, Action constraints should be added in reverse order, putting a new constraint before the existing ones that the Action was keyframed to work together. In order to implement the option, extract a utility from the Copy Transform constraint code for combining transforms with special anti-shear scale handling that matches the Aligned Inherit Scale mode. The Before mode also requires switching the constraint to the Local owner space, while the After mode can still use the World space for efficiency as before. Since the constraint doesn't have an Owner space option in the UI, this has to be handled in an RNA setter. For full backward compatibility, the original simple matrix multiplication mode is preserved as the third option, but it is not recommended due to creating shear. Differential Revision: https://developer.blender.org/D6297
2019-11-07Stretch To: implement a mode similar to Damped Track for rotation.Alexander Gavrilov
Most of the time Stretch To is used in actual rigs, like BlenRig or Rigify, in combination with Damped Track to handle rotation before the stretch, because it produces rotations more appropriate for organic deformation, and doesn't flip because of internal gimbal lock. The prevalence of this pattern suggests that Stretch To should support that kind of rotation directly as an option. Differential Revision: https://developer.blender.org/D6134
2019-10-17Fix T70739: Make Library Override doesn't re-target Armature constraints.Bastien Montagne
Missing one step (collection prop itself) in RNA hierarchy of properties leading to those armature object pointers...
2019-09-06Transformation Constraint: implement a Mix Mode option.Alexander Gavrilov
Allow selecting how the new location/rotation/scale is combined with the existing transformation. This is most useful for rotation, which has multiple options, and scale, which previously could only replace.
2019-09-06Copy Transforms: add a mixing mode option.Alexander Gavrilov
Allow combining location, rotation and scale at the same time, using one constraint. The mixing modes are based on matrix multiplication, but handle scale in a way that avoids creating shear. Reviewers: brecht Differential Revision: https://developer.blender.org/D5640
2019-09-06Copy Rotation: implement new mixing modes that actually work.Alexander Gavrilov
Upon close inspection, the way the Offset mode works in the Copy Rotation constraint makes no sense, and in fact, destroys the rotation of its owner unless either it's single axis, or the order is set specifically to `ZYX Euler`. Since it can't simply be changed because of backward compatibility concerns, replace the checkbox with a dropdown that provides a set of new modes that actually make sense. Specifically, add a mode that simply adds Euler components together, and two options that use matrix multiplication in different order. The Python use_offset property is replaced with compatibility stubs. Reviewers: brecht Differential Revision: https://developer.blender.org/D5640
2019-09-01Copy Rotation & Transform: add Euler order override options.Alexander Gavrilov
For reasons similar to drivers, it should be possible to set an explicit Euler rotation order in constraints that use Euler angles. The Transform constraint in a way approaches drivers in its use, in that it effectively alters channels using values of other channels after applying a fixed form mathematical expression. For this reason, instead of just specifying the euler order for its inputs, it uses the same enum as driver variables. However Quaternion components are converted to a weighted pseudo-angle representation as the rest of the constraint UI expects angles.
2019-08-29Copy Scale: support copying arbitrary non-uniform scale as uniform.Alexander Gavrilov
Uniform scale is superior to non-uniform scale in that it works with parenting without causing shear. Thus it is a valid desire in some cases to turn arbitrary scale into guaranteed uniform scale. Implementing this in the Copy Scale constraint allows one for instance to 'inherit scale as uniform' by disabling Inherit Scale, and using Copy Scale from parent with Offset and Make Uniform. Reviewers: brecht Differential Revision: https://developer.blender.org/D5614
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
2019-08-16Outliner: Draw constraint icons and enable buttonNathan Craddock
Draw all constraint icons and enable/disable restrict buttons. The action constraint needs its own icon. It currently draws white instead of the blue modifier color.
2019-06-28Remove Sticky option from the Floor constraintSergey Sharybin
This option from the very beginning of its existence needed more work to make it work correct and this was never done. This option was working fine during continuous playback, when there are no skipped frames, but it was failing when AV-sync of framedrop was enabled. It was never working correct when jumping between frames, including rendering on a farm which usually does frame-range based rendering. With copy-on-write things became even more tricky, since the "stuck" flag was never preserved between re-evaluations. Fixes T65683: Sticky Option in Floor Constraint for Bones Not Working
2019-06-15Cleanup: Rename: Static Override -> Library Override.Bastien Montagne
Better to make internal code naming match official/UI naming to some extent, this will reduce confusion in the future. This is 'breaking' scripts and files that would use that feature, but since it is not yet officially supported nor exposed in 2.80, as far as that release is concerned, it is effectively a 'no functional changes' commit.
2019-06-05Code Style: Make FormatJeroen Bakker
2019-06-04UI: Add icons to ConstraintsWilliam Reynish
Each constraint now has a unique icon, just like modifiers. Icons are designed by Andrzej Ambroż & Alessio Monti, with user input. Patch by Alessio Monti.
2019-06-03Cleanup: style, use braces in RNACampbell Barton
2019-05-20Cleanup: reorder report argument for pointer assignmentCampbell Barton
Most code uses ReportList argument last (or at least not first) when an optional report list can be passed in.
2019-05-17Python: Raise an error even NO_MAIN data is assigned to objectSergey Sharybin
The goal is to prevent assignment of temporary or evaluated meshes to objects from the main database. Majority of the change is actually related on passing reports around. On a positive side there are more error prints which can become more visible to scripters. There are still possible further improvements in the related areas. For example, disable user counting for evaluated ID datablocks when assignment happens. But can also happen later on as a separate improvement. Reviewers: brecht, campbellbarton, mont29 Reviewed By: brecht Differential Revision: https://developer.blender.org/D4884
2019-05-08Copy Scale: support raising the copied scale to an arbitrary power.Alexander Gavrilov
Since scale is multiplicative, the appropriate way to partially copy it is to use power. However, the influence slider of constraints uses linear interpolation. Thus, there is no way to correctly split scale via constraints without adding this feature. In addition, this allows inverting scale by using negative powers, fulfilling the function of Copy Rotation's Invert checkboxes.
2019-05-07Spline IK: support using both original scaling and volume preservation.Alexander Gavrilov
Add a new option that makes the Spline IK solver apply volume preservation on top of the original scaling, considering the pre-IK scale of the bone as the goal volume to be preserved. This basically works similar to the Stretch To constraint, and allows easily rigging a stretchy chain that uniformly follows its parent's scaling. Since the Stretch To behavior is more familiar, the new option is on by default for newly created Spline IK constraints.
2019-05-06Maintain Volume: introduce an option switching between modes.Alexander Gavrilov
After a lot of thinking about this, I decided that all operation modes that I've tried over the past couple of years, including the original 2.79 one, have their uses after all. Thus the only reasonable solution is to add yet another option. The modes are: - Strict: The current 2.80 mode, which overrides the original scaling of the non-free axes to strictly preserve the volume. This is the most obvious way one would expect a 'Maintain Volume' constraint to work. - Uniform: The original 2.79 mode, which assumes that all axes have been scaled the same as the free one when computing the volume. This seems strange, but the net effect is that when simply scaling the object uniformly with S, the volume is preserved; however, scaling the non- free axes individually allows deviating from the locked volume. This was obviously intended as a more or less convenient UI tool. - Single Axis: My own variant of the intent of the Uniform scale, which does volume-preserving if the object is scaled just on the Free axis, while passing the non-free axis scaling through. I.e. instead of uniform S scaling, the user has to scale the object just on its primary axis to achieve constant volume. This can allow reducing the number of animation curves when only constant volume scaling is needed, or be an easier to control tool inside a complex rig.
2019-05-01Alembic: integrate cache file into the dependency graphBrecht Van Lommel
* The cache file datablock is now evaluated as part of the dependency graph, creating/freeing the Alembic file handle matching the current frame. Modifiers and constraints depend on this evaluation. * Cache file handles and readers now only exist on COW datablocks, never the original ones. * Object data paths are flushed back to the original for the user interface. * The cache file keeps a list of all readers associated with its handle, and automatically frees them when the handle is freed. This kind of sharing of data across datablocks is weak but we have no better mechanism for it. Fix T62720: Alembic sequences not working and crashing Differential Revision: https://developer.blender.org/D4774
2019-04-21Cleanup: comments (long lines) in makesrnaCampbell Barton
2019-04-18Cleanup: comment blocksCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-16Spline IK: support changing individual bone length via Y scaling.Alexander Gavrilov
Previously Spline IK provided only two choices: either scale the length of the bone chain to fit the length of the curve, or don't scale the bone in the Y dimension at all (ignoring effects of actually fitting to the curve due to curvature and curve object scale). This patch adds a new option to use the pre-IK Y scale of the bones to adjust their length when fitted to the curve, allowing individual posing control over the length of the segments. Reviewers: brecht Differential Revision: https://developer.blender.org/D4687
2019-04-14Explain the Local With Parent coordinate space better.Alexander Gavrilov
Just saying "parent transformation added" doesn't really explain what this coordinate space does. Thus it seems almost nobody used it and serious bugs like T61981 went unnoticed.
2019-04-02Merge branch 'blender2.7'Sergey Sharybin
2019-04-02Constraints: Use RNA update instead of block updateSergey Sharybin
Allows to have more control over which tags are done for which properties. This is a part of T62960 which fixes the issue in the 2.7 series.
2019-04-02Constraints: Mark proxy lcoal as not editableSergey Sharybin
This can not work reliably anyway.
2019-04-02Cleanup: Remove space at the end of descriptionSergey Sharybin
2019-04-01Fix T62960: Expanding/Closing Constraints/Modifiers causes re-renderSergey Sharybin
Mark specific properties as no-dependency-graph tag. This is needed to avoid a centralized Copy-on-Write tag from RNA pointer update.
2019-03-24Cleanup: redundant use of string formatting functionsCampbell Barton
2019-03-20Fix T62770: Changing Constraint.mute does not update poseSergey Sharybin
Missing dependency graph tag. Is only happening for scripts, since the interface is handling this from do_constraint_panels(). Fix is suggested by Edmund Kapusniak (@edmundmk), thanks!
2019-03-13UI: put Armature constraint in alphabetical order in the menu.Adrian Newton
Differential Revision: https://developer.blender.org/D4492
2019-02-20Units: Use units for smokeWilliam Reynish
-Use factor for flame_vorticity, slice_depth, density & volume_density -Use distance for surface_distance -Use factor for mix factor in Data Transfer modifier -Use prop_translation for pivot constraint offset
2019-02-20RNA: use factor when appropriateWilliam Reynish
- Many factor properties were set to PROP_NONE, even properties that had 'Factor' in the name! - Some time properties were not set to PROP_TIME, especially in Particles. - Changed motion_blur_shutter to use a soft max value of 1 instead of 2. Anything > 1 here is not physically correct and makes no real logical sense. - Changed display name of Dynamic Paint dissolve_speed to Dissolve Time, since it's a time property, not speed.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2018-11-22Icons: use newly added iconsWilliam Reynish
2018-11-14Depsgraph: fix relations for drivers on bone weight in Armature constraint.Alexander Gavrilov
2018-11-07Cleanup: styleCampbell Barton
2018-11-06Shrinkwrap: new mode that projects along the target normal.Alexander Gavrilov
The Nearest Surface Point shrink method, while fast, is neither smooth nor continuous: as the source point moves, the projected point can both stop and jump. This causes distortions in the deformation of the shrinkwrap modifier, and the motion of an animated object with a shrinkwrap constraint. This patch implements a new mode, which, instead of using the simple nearest point search, iteratively solves an equation for each triangle to find a point which has its interpolated normal point to or from the original vertex. Non-manifold boundary edges are treated as infinitely thin cylinders that cast normals in all perpendicular directions. Since this is useful for the constraint, and having multiple objects with constraints targeting the same guide mesh is a quite reasonable use case, rather than calculating the mesh boundary edge data over and over again, it is precomputed and cached in the mesh. Reviewers: mont29 Differential Revision: https://developer.blender.org/D3836
2018-11-06Implement an Armature constraint that mimics the modifier.Alexander Gavrilov
The main use one can imagine for this is adding tweak controls to parts of a model that are already deformed by multiple other major bones. It is natural to expect such locations to deform as if the tweaks aren't there by default; however currently there is no easy way to make a bone follow multiple other bones. This adds a new constraint that implements the math behind the Armature modifier, with support for explicit weights, bone envelopes, and dual quaternion blending. It can also access bones from multiple armatures at the same time (mainly because it's easier to code it that way.) This also fixes dquat_to_mat4, which wasn't used anywhere before. Differential Revision: https://developer.blender.org/D3664
2018-10-17Shrinkwrap: implement the use of smooth normals in constraint & modifier.Alexander Gavrilov
- Use smooth normals to displace in Above Surface mode. - Add an option to align an axis to the normal in the constraint. I've seen people request the alignment feature, and it seems useful. For the actual aligning I use the damped track logic. In order to conveniently keep mesh data needed for normal computation together, a new data structure is introduced. Reviewers: mont29 Differential Revision: https://developer.blender.org/D3762