Currently the volume variation feature in stretch constraints is
unlimited. This has to be compensated by riggers by adding scale limit
constraints, but these are unaware of the stretch orientation and can
lead to flipping. Also the stretch calculation itself is not working
properly and can lead to collapsing volume.
The patch fixes this with several modifications:
- Interpret the volume variation factor as exponent, which works better
with large values for artistic purposes.
- Add integrated limits to the volume "bulge" factor, so secondary
constraints for compensation become unnecessary
- Add a smoothness factor to make limits less visible.
Eventually a generic volume preservation constraint would be nicer,
because multiple constraints currently implement volume variation of
their own. This feature could actually work very nicely independent from
other constraint features.
Differential Revision: https://developer.blender.org/D826
There is no good solution here, since RNA props can only have one type/unit.
Tried to find the less worse one - have different RNA props for same DNA value
(a bit like the angle/length for camera lens).
Also fixed two other issues with Transform conctraint:
* Angle were still in degrees (yes, another backward-compatibility breacking).
* Scale was absolute, unlike loc/rot.
Also cleaned up a bit the code, replaced some magic numbers by proper enums, ...
To reduce user confusion, we were already presenting users with an error message
when they tried to edit constraints for bones from the Object Constraints tab.
This commit just makes things more convenient by adding a button which takes
users to the right tab when clicked.
- ability to change the space the axis is projected in (so you can choose worldspace or -space, was always local-space before).
- support projecting on a negative axis, without this some very simple clamping is not possible if the direction happened not to be positive.
- add distance limit (same as modifier), without this single meshes surrounding an object would make the constraint impossible to use in some cases (it would snap to the wrong side).
note: this removes the ability to project on multiple axes at once but this option only added up directions and didnt project on multiple axes as you might expect.
Notes:
* Made those edits by full checking of py files, so I should have spoted most needed edits, yet it remains quite probable I missed a few ones, we'll fix if/when someone notice it...
* Also made some cleanup "on the road"!
The code in this file is NOT restricted to use in object context only. Renaming
it makes it easier to find this file (taking in account name truncations).