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
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-11-19Merge branch 'blender-v3.0-release'Omar Emara
2021-11-19Cleanup: fix typos in comments and docsBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D13264
2021-11-19Fix (unreported) wrong behavior of constraints in liboverrides.Bastien Montagne
All constraints were 'made local', including the ones comming from the reference linked object.
2021-09-27Constraints: change default Stretch To rotation type to Swing.Alexander Gavrilov
As also explained in D6134, in most case of Stretch To usage in rigs, it is desirable to use swing rotation, either via the old method of pairing the constraint with Damped Track, or via the Swing rotation type introduced in 2.82. This is for instance true for all usages of the constraint in Rigify. The reason can be understood by realizing that unlike order- dependent euler rotations, swing is not biased to an axis, and isn't affected by gimbal lock effects at merely 90 degrees of rotation (it has only one singularity at 180 degrees). Thus it makes sense to change the default for newly created constraints to the Swing mode. This has no backward compatibility concerns except for old tutorials and rig generation scripts. Differential Revision: https://developer.blender.org/D12643
2021-09-14Doc: expand on comment for why bound-box access could cause issuesCampbell Barton
2021-08-26Cleanup: Use `ID_IS_LINKED` instead of direct `id.lib` pointer check.Bastien Montagne
2021-08-19Cycles: experimental integration of Alembic procedural in viewport renderingKévin Dietrich
This patch exposes the Cycles Alembic Procedural through the MeshSequenceCache modifier in order to use and test it from Blender. To enable it, one has to switch the render feature set to experimental and activate the Procedural in the modifier. An Alembic Procedural is then created for each CacheFile from Blender set to use the Procedural, and each Blender object having a MeshSequenceCache modifier is added to list of objects of the right procedural. The procedural's parameters derive from the CacheFile's properties which are already exposed in the UI through the modifier, although more Cycles specific options might be added in the future. As there is currently no cache controls and since we load all the data at the beginning of the render session, the procedural is only available during viewport renders at the moment. When an Alembic procedural is rendered, data from the archive are not read on the Blender side. If a Cycles render is not active and the CacheFile is set to use the Cycles Procedural, bounding boxes are used to display the objects in the scene as a signal that the objects are not processed by Blender anymore. This is standard in other DCCs. However this does not reduce the memory usage from Blender as the Alembic data was already loaded either during an import or during a .blend file read. This is mostly a hack to test the Cycles Alembic procedural until we have a better Blender side mechanism for letting renderers load their own geometry, which will be based on import and export settings on Collections (T68933). Ref T79174, D3089 Reviewed By: brecht, sybren Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D10197
2021-08-12Add Extras Dropdown Menu to ConstraintsHenrik Dick
Add Apply Constraint, Duplicate Constraint, and Copy To Selected operators, and include them in a menu similar to the menu for modifiers. The shortcuts in the extras menu are also matched to modifiers. All the here added operators are intended to work exactly like the analogous ones for modifiers. That means the apply operator should apply a constraint as if it was first in the list, just like modifiers do. I have added the same warning message as for modifiers when that happens. The decision to use this approach of appling the constraint as if it was first, was made for consistency with modifiers. People are already used to how it works there. Is also provides more intricate control over the applied transforms, then just applying all constraints up to that one. Apply all constraints is already kinda implemented in Bake Animation. Reviewed By: HooglyBoogly, sybren, #user_interface Differential Revision: https://developer.blender.org/D10914
2021-08-05Action Constraint: add Split Channels Mix choices from Copy TransformsAlexander Gavrilov
Practice shows that when combining actions and direct animation it is usually best to combine location, rotation and scale separately, which is implemented by the Split Channels modes recently introduced in D9469 for Copy Transforms. This completes the same set of 6 choices for the Action Constraint. The default for new constraints is changed to the newly added Before Original (Split Channels) mode. The original patch is motivated by Loic Pinsard, who created an addon that does the equivalent of this feature by splitting the action into two, separating location and rotation+scale. Differential Revision: https://developer.blender.org/D7547
2021-08-05Fix T83164: Spline IK `joint_bindings` parameter is broken.Bastien Montagne
Code freeing the array would not properly reset its length value to zero. Note that this corrupted data could also be saved in .blend files, so had to bump fileversion and add some doversion code too. Fix T90166: crash when creating a liboverride.
2021-08-03USD: add USD importerMichael Kowalski
This is an initial implementation of a USD importer. This work is comprised of Tangent Animation's open source USD importer, combined with features @makowalski had implemented. The design is very similar to the approach taken in the Alembic importer. The core functionality resides in a collection of "reader" classes, each of which is responsible for converting an instance of a USD prim to the corresponding Blender Object representation. The flow of control for the conversion can be followed in the `import_startjob()` and `import_endjob()` functions in `usd_capi.cc`. The `USDStageReader` class is responsible for traversing the USD stage and instantiating the appropriate readers. Reviewed By: sybren, HooglyBoogly Differential Revision: https://developer.blender.org/D10700
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-02Cleanup: Further use of const when accessing evaluated meshHans Goudey
Also resolve a warning from the previous commit. The next blocker to using const is `BKE_mesh_wrapper_ensure_mdata`.
2021-07-02Constraints: support a new Local Space (Owner Orientation) for targets.Alexander Gavrilov
Add a new transformation space choice for bone constraints, which represent the local transformation of the target bone in the constraint owner's local space. The use case for this is transferring the local (i.e. excluding the effect of parents) motion of one bone to another one, while ignoring the difference between their rest pose orientations. The new option replaces the following setup: * A `child` bone of the `target`, rotated the same as `owner` in rest pose. * A `sibling` bone of the `target`, positioned same as `child` in rest pose and using Copy Transforms in World Space from `child`. * The `owner` bone constraint uses Local Space of `sibling`. (This analogy applies provided both bones use Local Location) Differential Revision: https://developer.blender.org/D9493
2021-07-02Copy Transforms: implement Remove Target Shear and more Mix options.Alexander Gavrilov
This constraint can be naturally viewed as a prototype for a future 4x4 matrix math node (or subset thereof), since its basic semantics already is matrix assignment. Thus it makes sense to add math options to this constraint to increase flexibility in the meantime. This patch adds support for several operations that would be useful: - An option to remove shear in the incoming target matrix. Shear is known to cause issues for various mathematical operations, so an option to remove it at key points is useful. Constraints based on Euler like Copy Rotation and Limit Rotation already have always enabled shear removal built in, because their math doesn't work correctly with shear. In the future node system shear removal would be a separate node (and currently Limit Rotation can be used as a Remove Shear constraint). However removing shear from the result of the target space conversion before mixing (similar to Copy Rotation) has to be built into Copy Transforms itself as an option. - More ways to combine the target and owner matrices. Similar to multiple Inherit Scale modes for parenting, there are multiple ways one may want to combine matrices based on context. This implements 3 variants for each of the Before/After modes (one of them already existing). - Full implements regular matrix multiplication as the most basic option. The downside is the risk of creating shear. - Aligned emulates the 'anti-shear' Aligned Inherit Scale mode, and basically uses Full for location, and Split for rotation/scale. (This choice already existed.) - Split Channels combines location, rotation and scale separately. Looking at D7547 there is demand for Split Channels in some cases, so I think it makes sense to include it in Copy Transforms too, so that the Mix menu items can be identical for it and the Action constraint. Differential Revision: https://developer.blender.org/D9469
2021-07-02Cleanup: Use const variables for object's evaluated meshHans Goudey
Generally the evaluated mesh should not be changed, since that is the job of the modifier stack. Current code is far from const correct in that regard. This commit uses a const variable for the reult of `BKE_object_get_evaluated_mesh` in some cases. The most common remaining case is retrieving a BVH tree from the mesh.
2021-06-30Fix T89153: Follow Path for empty works only in negative valuesSebastian Parborg
The old code only clamped cyclic curves
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-05Limit Rotation: explicitly orthogonalize the matrix before processing.Alexander Gavrilov
Add a call to orthogonalize the matrix before processing for the same reasons as D8915, and an early exit in case no limits are enabled for a bit of extra efficiency. Since the constraint goes through Euler decomposition, it would in fact remove shear even before this change, but the resulting rotation won't make much sense. This change allows using the constraint without any enabled limits purely for the purpose of efficiently removing shear. Differential Revision: https://developer.blender.org/D9626
2021-06-05Limit Rotation: add an Euler Order option.Alexander Gavrilov
Since Limit Rotation is based on Euler decomposition, it should allow specifying the order to use for the same reasons as Copy Rotation does, namely, if the bone uses Quaternion rotation for its animation channels, there is no way to choose the order for the constraint. Ref D9626
2021-05-20Merge branch 'blender-v2.93-release'Sebastian Parborg
2021-05-20Fix T87854: Add clamp option to Path AnimationSebastian Parborg
Previously, the "follow path constraint" and "follow parented curve" were clamped. This restriction was lifted in rBcf2baa585cc8 Add back an option to get the old behavior in the "Path animation" settings. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D11263
2021-04-30Cleanup: rename BKE_pose_channel_{verify => ensure}Campbell Barton
The term `verify` doesn't fit with what this function does and is sometimes used to check data is valid or to control validity checking as with `RNA_define_verify_sdna`. use more common term `ensure`.
2021-04-08Fix T81707: Spline IK Joints "Floating" above curveSebastian Parborg
The issue was that where_on_path uses a resampled curve to get the data from the curve. This leads to disconnects between the curve the user sees and the evaluated location data. To fix this we simply use the actual curve data the user can see. The older code needed a cleanup either way as there were hacks in other parts of the code trying to work around some brokenness. This is now fixed and we no longer need to clamp the evaluation range to 0-1 or make helper functions to make it do what we actually want. Reviewed By: Campbell, Sybren Differential Revision: http://developer.blender.org/D10898
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-01-18Armature: fix B-Bone deformation blending artifacts with Preserve Volume.Alexander Gavrilov
The double quaternion blending method in addition to the deformation matrix of each bone requires their rest matrices. For ordinary bones this literally should use the bone rest matrix without any ambiguity. However, it was also using the bone rest matrix for all of its B-Bone segments, which is incorrect and causes strange deformation in some cases involving extreme non-uniform scale, especially at boundaries between different B-Bones. There is also a similar known issue that happens with scale at bending joints, and this fix reduces the distortion when both bones are B-Bones. This changes both the Armature modifier and the Armature constraint to use the actual segment rest matrices. Unlike bones, these can have scale even in rest pose, so normalization is required. Differential Revision: https://developer.blender.org/D10003
2020-12-15Cleanup: doxy comments (use colon after parameter name)Campbell Barton
Also remove colon after `\note`.
2020-12-08Cleanup: LibOverride: Forgot to update comments in previous commit.Bastien Montagne
2020-12-08LibOverride: Refactor collection items 'local' helper functions.Bastien Montagne
It's easier to read and less 'weird' to check that an item is non-local in a liboverride data-block, than the other way around. Thanks to @sybren for noticing it.
2020-12-07LibOverride: Abstract a bit handling of local items of RNA collections.Bastien Montagne
RNA collections that support insertion of new items in liboverride data-block need a special way to distiguish between locale and orig-from-linked items (since some operations are allowed on the forer, but no the latter). In future we want a proper solution to abstract that at the `BKE_lib_override` level, but for now we need to add some code for each case. Note that this commit also fixes a few potential issues with GPencil modifiers, and constraints, regarding their handling of local overrides.
2020-12-04Cleanup: clang-formatSybren A. Stüvel
Rerun `make format`. No functional changes.
2020-12-03Add Custom Object Space to ConstraintsHenrik Dick
Add Custom Space to the list of space conversions for constraints. Constraints can use World Space, Local Space, Pose Space, Local with Parent, and now also Custom Space with a custom object to define the evaluation space. The Custom Space option uses the Local Space of an other object/bone/vertex group. If selected on owner or target it will show a box for object selection. If an armature is selected, then it will also show a box for bone selection. If a mesh object is selected it will show the option for using the local space of a vertex group. Reviewed By: #animation_rigging, sybren, Severin, angavrilov Differential Revision: https://developer.blender.org/D7437
2020-11-29Run clang-format to fix line length after D8915.Alexander Gavrilov
2020-11-26Fix T80970: Copy Rotation constraint incorrect under shearJoseph Brandenburg
Orthogonalize the constraint target's matrix before decomposing it into Euler angles. This removes sheer, and is actually a requirement for correct decomposition. It's conceivable that someone has used the incorrect behaviour in a rig. As the shear caused unpredictable flipping of the constrained object, this is unlikely. Reviewed By: angavrilov, sybren Differential Revision: https://developer.blender.org/D8915
2020-11-17Cleanup: Use LISTBASE_FOREACH macroHans Goudey
2020-11-06Refactor: move Constraint .blend I/O to blenkernelJacques Lucke
Ref T76372.
2020-10-30Cleanup: Use an enum to set instanced panel expansionHans Goudey
This commit uses an enum to access expansion for specific panels for each modifier, constraint, etc. Even though these values are quite simple, this can help make the code more explicit when the ui_expand_flag is accessed directly. Also update comments about this bitfield to make them consistent.
2020-10-28Outliner: Properties editor sync on selectionNathan Craddock
When outliner datablocks are selected, switch to the corresponding tab for that datablock in properties editors. Only properties editors that share an edge with the outliner will change tabs. Additionally, when modifiers, constraints, and shader effects are selected from the outliner, the panel will be expanded in all properties editors. Part of T77408 Manifest Task: https://developer.blender.org/T63991 Differential Revision: https://developer.blender.org/D8638
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-19Cleanup: use parenthesis for if statements in macrosCampbell Barton
2020-09-16Action Constraint: Add manual time factor input controlChris Clyne
Adds an optional slider to the action constraint so that it can be driven without a constraint target. This is very helpful for more complex rigging and mechanical rigs, as it means the action constraint can be controlled with a driver/custom property directly, currently if we want to use a driver to control it we must add a "dummy" bone/object inbetween to act as a control. Reviewed By: Sebastian Parborg, Sybren A. Stüvel, Demeter Dzadik, Julian Eisel Differential Revision: http://developer.blender.org/D8022
2020-09-11Constraints: Child-Of, set inverse matrix upon creationJoseph Brandenburg
Set the inverse matrix when the Child Of constraint is created. This prevents the bone/object from jumping away when the constraint is added, improving usability. Reviewed by: sybren Differential Revision: https://developer.blender.org/D8851
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-08-29Cleanup: spellingCampbell Barton
2020-08-17Cleanup: spellingCampbell Barton
2020-08-13Cleanup: spellingCampbell Barton