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-05-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-20Cleanup: unused enumsCampbell Barton
2019-09-03Drivers: support decomposing rotation into swing followed by twist.Alexander Gavrilov
In order to correctly drive corrective shape keys from a freely rotating organic joint it is very often found necessary to decompose the rotation into separate bending and twisting motions. This type of decomposition cannot be reproduced by any Euler order or a single quaternion. Instead this is done by using a helper bone with a Damped Track constraint aimed at the tail of the control to pick up the bending, and its helper child with Copy Transforms to separate the twist. Requiring two additional bones to drive a shape key or a correction bone seems inconvenient, so this implements the necessary math as new options in the recently introduced Rotation Mode dropdown of the Transform Channel driver variable type. The data is also accessible as a Transformation constraint input. The output is in the form of Quaternion-derived 'pseudo-angles', which for `Swing and Y Twist` would represent the following: * W: true bend angle, independent of bend direction. * Y: true twist angle. * X, Z: pseudo-angles representing the proportion of bending around X/Z. Reviewers: brecht Differential Revision: https://developer.blender.org/D5651
2019-08-31Drivers: support accessing Quaternion rotation channels.Alexander Gavrilov
After adding the Euler order option, it's an easy addition to the enum. The list of channels had of course to be expanded too.
2019-08-31Drivers: support explicit euler rotation order for transform channels.Alexander Gavrilov
The meaning of the euler angles completely depends on the rotation order. Currently the rotation order is taken from the target of the driver variable, which somewhat makes sense if it uses euler, but if it's quaternion, then the order is always set to XYZ. Add a new option for the rotation channels of the Transform Channel driver variables that defaults to the old behavior, but allows setting an explicit rotation order.
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-05-11Python API: expose more keyframing flags for use in keyframe_insert.Alexander Gavrilov
Expose REPLACE and CYCLE_AWARE, and add AVAILABLE for completeness. These flags are generic and safe to use, and necessary to match the behavior of certain UI options.
2019-05-06Drivers: add an Average Scale option to the Transform Channel driver vars.Alexander Gavrilov
Unlike location and rotation, there is a meaningful definition of overall/average scaling via the total change in the volume. This adds an option to retrieve that via a single driver variable, instead of having to use three and an expression. Using the determinant to compute the volume scaling also allows detecting flipping due to negative scale - this is impossible to do via the three variable approach. The volume_scale functions are added purely for code readability: 'volume scale factor' is easier to understand than determinant. Differential Revision: https://developer.blender.org/D4803
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-30Depsgraph: Store pointer to original NLA stripSergey Sharybin
Similar to modifier data and particle systems.
2019-04-21Cleanup: comments (long lines) in makesdnaCampbell 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-16Cleanup: trailing commasCampbell Barton
2019-04-14Cleanup: doxy commentsCampbell Barton
Use doxy references to function and enums, also correct some names which became out of sync.
2019-03-18Cleanup: spaces around operators in DNA headersCampbell Barton
2019-03-17Cleanup: rename DEPRECATED to UNUSEDCampbell Barton
While the flags have been deprecated they're currently unused. Rename for clarity.
2019-03-15Cleanup: style, use doxygen for commentsCampbell Barton
2019-03-08Cleanup: spellingCampbell Barton
2019-02-27Cleanup: use '_pad' convention for padding in all DNA structsCampbell Barton
Avoids mixing these in with regular variables in code-completion. Use char for pad members except for 'void *', to make size clearer. Removed/shrink a few redundant padding vars which were >= 8 bytes.
2019-02-18Cleanup: Remove unused fieldSergey Sharybin
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-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-31Fix T59495, T59992, T59904, T59178, T60598: broken keyframed value editing.Brecht Van Lommel
This removes a bunch of animation/driver evaluations and recalc flags that should be redundant in the new depsgraph, and were incorrectly affecting the evaluated scene in a permanent way. Still two cases that could be removed if the depsgraph is improved, in BKE_object_handle_data_update and BKE_cachefile_update_frame. For physics subframe interpolation there are also still calls to BKE_object_where_is_calc that should ideally be removed as well, though they are not known to cause keyframing bugs. Differential Revision: https://developer.blender.org/D4274
2019-01-15Cleanup: commas at the end of enumsCampbell Barton
Without this clang-format may wrap them onto a single line.
2019-01-15Cleanup: comment line length (DNA)Campbell Barton
Prevents clang-format wrapping text before comments.
2019-01-14NLA: implement a new blending mode that intelligently combines actions.Alexander Gavrilov
The existing Add and Multiply blending modes have limited usability, because the appropriate operation for meaningfully combining values depends on the channel. This adds a new mode that chooses the operation automatically based on property settings: - Axis+Angle channels are summed, effectively averaging the axis, but adding up the angle. Default is forced to 0. - Quaternion channels use quaternion multiplication: result = prev * value ^ influence - Scale-like multiplicative channels use multiplication: result = prev * (value / default) ^ influence - Other channels use addition: result = prev + (value - default) * influence Inclusion of default in the computation ensures that combining keyframed default values of properties keeps the default state, even if the default isn't 0 or 1. Strips with this mode can be keyframed normally in Tweak mode, except that for quaternion rotation keyframing always inserts all 4 channels, and the channel value sliders on the left side of Graph/Action editors won't insert keys without Auto Key. Quaternion keys are also automatically normalized. Differential Revision: https://developer.blender.org/D4190
2019-01-12NLA: ignore time range when evaluating a raw action.Alexander Gavrilov
When editing an action without a strip, or tweaking a strip without time mapping enabled or supported, the extents of the virtual strip can't be controlled and are purely derived from keys in the action. Thus, cutting off evaluation of the action at these arbitrary points gets in the way of observing the natural extrapolation of the F-Curves and thus appears to be a mis-feature. With this change non-mapped actions are evaluated with infinite range, exactly like they are handled without NLA, unless extend mode is set to Nothing.
2019-01-07Cleanup: corrections to last commitCampbell Barton
2019-01-07Cleanup: move DNA comments before struct membersCampbell Barton
Needed for clang-format in some cases, see: T53211
2018-11-14Merge branch 'master' into blender2.8Campbell Barton
2018-11-14Cleanup: comment block tabsCampbell Barton
2018-11-12Remove AnimMapper: it has been left unimplemented for almost ten years.Alexander Gavrilov
It was supposed to be a feature for substituting RNA paths on the fly, but has never been implemented, apart from a couple of structure definitions and passing around some always-NULL pointers. Now it gets in the way of refactoring NLA evaluation to use GHash for efficiency.
2018-10-31Add an option to do keyframe insertion in a cycle-aware fashion.Alexander Gavrilov
When enabled, inserting keyframes into F-Curves with simple cyclic extrapolation (the same conditions as required for cycle-aware auto handle smoothing to activate) will take the cycle into account: - Keyframes that are being inserted outside of the cycle bounds are remapped to be inside the cycle. Thus it is not necessary to be within the main iteration of the cycle when tweaking. This becomes especially useful in the final animation tweaking phase when the channel keys may be staggered for overlap, so the actual master period is different for different channels. - Modifying one of the end points of a cycle also changes the other end point when appropriate, to preserve smooth transition. This feature applies to both manual keyframe insertion using 'I', and auto-keyframing. Differential Revision: https://developer.blender.org/D3140
2018-09-19Cleanup: rename BLI_simple_expr -> BLI_expr_pylike_evalCampbell Barton
Simple isn't a good prefix for library names since lots of unrelated modules could be called 'simple'. Include 'py' in module name since this is a subset of Python, one of the main motivations for this is to be Python like/compatible.
2018-09-18Support evaluating simple driver expressions without Python interpreter.Alexander Gavrilov
Recently @sergey found that hard-coding evaluation of certain very common driver expressions without calling the Python interpreter produces a 30-40% performance improvement. Since hard-coding is obviously not suitable for production, I implemented a proper parser and interpreter for simple arithmetic expressions in C. The evaluator supports +, -, *, /, (), ==, !=, <, <=, >, >=, and, or, not, ternary if; driver variables, frame, pi, True, False, and a subset of standard math functions that seem most useful. Booleans are represented as numbers, since within the supported operation set it seems to be impossible to distinguish True/False from 1.0/0.0. Boolean operations properly implement lazy evaluation with jumps, and comparisons support chaining like 'a < b < c...'. Expressions are parsed into a very simple stack machine program that can then be safely evaluated in multiple threads. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D3698
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for DNA headersCampbell Barton
2018-06-01Merge branch 'master' into blender2.8Campbell Barton
2018-06-01Cleanup: trailing whitespace (comment blocks)Campbell Barton
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-05-31Depsgraph: Remove unused flagsSergey Sharybin
They are no longer needed after the active depsgraph concept is here.
2018-05-31Depsgraph: optimization of driver evaluation with many drivers.Brecht Van Lommel
2018-05-23Drivers UI Cleanup (Part of T55145)Joshua Leung
* Remove "Show Debug Info" option. Everyone has it turned on all the time, since it's just useful to have * Make the "Remove Driver" button less prominent. It doesn't happen that much, so it shouldn't take up as much room * Make "expressions" textbox wider (i.e. taking up the whole column width) by separating the label and textbox on separate lines. * Rename "Add Variable" button to make it clearer to users what "variables" may be (i.e. they serve as a way to specify Inputs, just like adding a "Source Data" node in a nodetree) * Regroup buttons
2018-04-26Animation: Make it possible to keyframe to with copy-on-writeSergey Sharybin
The issue was that every object tweak was doing a full copy of original datablock onto evaluated version, and was updating animation. This made it impossible to tweak properties which has keyframes. Proposed solution is to: - Always apply animation on frame change, and when object is explicitly tagged for animation update. This will store original DNA value of animated property in the f-curve. - When applying animation in other cases, we check original DNA value stored in f-curve with the actual original DNA property. If they differ, it means user started to tweak animated property, and we should skip animation. If the value is the same, we apply animation. This is just a first step towards proper final implementation, but seems to be the direction we want to take.
2018-04-20Cleanup (followup commit for D3160)Gaia Clary
Added some spaces to keep the eInsertKeyFlags enumeration proper
2018-04-20Fix: D3160 Propose to use proper typedefs to avoid confusionGaia Clary
Differential Revision: https://developer.blender.org/D3160
2017-11-01Implement a new automatic handle algorithm to produce smooth F-Curves.Alexander Gavrilov
The legacy algorithm only considers two adjacent points when computing the bezier handles, which cannot produce satisfactory results. Animators are often forced to manually adjust all curves. The new approach instead solves a system of equations to trace a cubic spline with continuous second derivative through the whole segment of auto points, delimited at ends by keyframes with handles set by other requirements. This algorithm also adjusts Vector handles that face ordinary bezier keyframes to achieve zero acceleration at the Vector keyframe, instead of simply pointing it at the adjacent point. Original idea and implementation by Benoit Bolsee <benoit.bolsee@online.be>; code mostly rewritten to improve code clarity and extensibility. Reviewers: aligorith Differential Revision: https://developer.blender.org/D2884
2017-10-17Make auto handle placement aware of cyclic extrapolation.Alexander Gavrilov
Cyclic extrapolation is implemented as an f-curve modifier, so this technically violates abstraction separation and is something of a hack. However without such behavior achieving smooth looping with cyclic extrapolation is extremely cumbersome. The new behavior is applied when the first modifier is Cyclic extrapolation in Repeat or Repeat with Offset mode without using influence, repeat count or range restrictions. This change in behavior means that curve handles have to be updated when the modifier is added, removed or its options change. Due to the way code is structured, it seems it requires a helper link to the containing curve from the modifier object. Reviewers: aligorith Differential Revision: https://developer.blender.org/D2783
2017-07-29Cleanup: quiet picky ubsan warningsCampbell Barton