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-02-07Cleanup: Animation, match parameter names in declaration with implementationSybren A. Stüvel
The implementation had more descriptive parameter names, so I copied those to the declarations. No functional changes.
2020-01-24Depsgraph: fix false positive time dependencies for simple drivers.Alexander Gavrilov
The dependency graph has to know whether a driver must be re-evaluated every frame due to a dependency on the current frame number. For python drivers it was using a heuristic based on searching for certain sub- strings in the expression, notably including '('. When the expression is actually evaluated using Python, this can't be easily improved; however if the Simple Expression evaluator is used, this check can be done precisely by accessing the parsed data. Differential Revision: https://developer.blender.org/D6624
2019-11-22UI: Changes to Graph Editor selection and transformJulian Eisel
When introducing "drag-all-selected" support all over Blender, we figured this wouldn't work well with the Graph Editor selection/transform behavior. Hence, William and I worked on the following changes, although we used this chance to improve the behavior in general too. For more info see T70634. * Handles now always move with the key, regardless if they are selected or not. * Selecting the key doesn't select the handles anymore, their selection is separate. * Multiple keys and handles can now be dragged. * Dragging a handle moves all selected handles **on the same side**. * Tweak-dragging any handle can never affect any keyframe location, only handles. * G/R/S should behave as before. * Changing the handle type with a key selected always applies the change to both handles. * Box selection with Ctrl+Drag now allows deselecting handles (used to act on entire triple only). * Box selection //Include Handles// option now only acts on visible handles, wasn't the case with Only Selected Keyframes Handles enabled. * Box selection //Include Handles// is now enabled by default in all bundled keymaps. The changes have been tested for some days by the animators here in the Blender Animation Studio. Some changes are based on their feedback. Also, this improves/adds comments for related code. Differential Revision: https://developer.blender.org/D6235 Reviewed by: Sybren Stüvel, William Reynish
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-05-16Fix T64681: evaluate curves with generative modifiers and no keys.Alexander Gavrilov
Introduce a new function and use it everywhere, including automatic curve deletion checks to guarantee consistency.
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-17Animation: Refactor storage usage during fcurve modifier evaluationJacques Lucke
Previously, when a fcurve modifier used storage, many heap allocations were done. This caused major slowdowns as described in T63656. Furthermore, the storage usage was a special case only used by the Cycles modifier. This refactor makes storage usage the "normal" case. That reduces the overall complexity. The storage is stack allocated now. The framerate on the provided test scene went up from ~5 fps to ~16 fps. Reviewers: angavrilov Differential Revision: https://developer.blender.org/D4701
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-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-02Cleanup: remove author/date info from doxy headersCampbell Barton
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: allow curve of driver to be evaluated individuallyJacques Lucke
This is necessary when adding a new keyframe to a fcurve that also has a driver. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D4278
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2019-01-15Cleanup: commas at the end of enumsCampbell Barton
Without this clang-format may wrap them onto a single line.
2018-11-30Merge branch 'master' into blender2.8Campbell Barton
2018-11-30Cleanup: name macros w/ matching BEGIN/ENDCampbell Barton
2018-11-14Merge branch 'master' into blender2.8Campbell Barton
2018-11-14Cleanup: comment block tabsCampbell Barton
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-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 blenkernelCampbell Barton
2018-06-11Drivers: ensure Python expressions are cached with copy-on-write.Brecht Van Lommel
Store the compiled expressions on the original driver. Ref T55442.
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-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2016-07-30Py-Driver: add 'self' optionCampbell Barton
Drivers can use this to refer to the data which the driver is applied to, useful for objects, bones, to avoid having to create a variable pointing to its self.
2016-06-03Fix T48234: Glitch w/ action constraints sharing an actionCampbell Barton
FCurve evaluation depended on FCurve.curval, which isn't threadsafe. Now only use this value for debug display, and pass the value instead of storing in the FCurve for all but debug-display.
2016-04-15Drivers Editing: Added "Copy/Paste" buttons beside "Add Variable" for ↵Joshua Leung
copying all variables from one driver to another This was a feature request from a few years back (IIRC from ZanQdo?) to make it easier to reuse one set of driver variables across several different drivers. Dev Notes: * Finally it's done! All that trouble for two little buttons. * Grr... cmake... grrr!
2016-04-05PyDriver support for all RNA property typesCampbell Barton
Support for driver variables that don't resolve to numbers, eg: objects, bones, curves... etc. Without this, Python expressions to access this data needed to use an absolute path from `bpy.data`, however this is inconvenient, breaks easily (based on naming) and wouldn't set the dependencies correctly.
2016-03-24Cleanup: use prefix for return argsCampbell Barton
2016-03-24Driver Keyframing: Some tweaks to make inserting keyframes on Driver ↵Joshua Leung
F-Curves easier Now, when trying to insert a keyframe on a driven property (using IKEY, or with autokeying enabled), the keyframes will get created on the Driver's F-Curve (instead of creating a new FCurve that goes into the active action, but will never do anything). Furthermore, the x-value of the new keyframe will be the current result of the driver expression. Why/Motivations: This way, it becomes easier to create corrective drivers, as you can position all the targets the driver depends on, then adjust the driver value until it does what you need, and then you keyframe that value to bake it into the Driver F-Curve (in effect, "training" the computer how to behave in that case). Usage Notes: * In practice, that particular workflow is still quite clunky to achieve, due to some quirks of how the driver system and the UI widgets interact. Specifically, you'll need to disable/mute the driver before trying to edit the setting (to prevent the driver from immediately resetting the value - before even autokey fires!). However, if you're using the Graph Editor to preview/monitor/manage the keying process, you'll then want to re-enable the driver before changing the targets, so that you can see how much of a change you'll want to be applying! * The warning about editing driver values may need to be disabled or selectively knocked out. I had it disabled while testing this functionality, but it's actually harmless in its current state (if just a bit annoying).
2016-03-24Drivers UI: Added name validation/linting for Driver VariablesJoshua Leung
When attempting to change a driver variable name to an "invalid" name, an indicator will now be shown beside the offending variable name. Clicking on this icon will show a popup which provides more information about why the variable name cannot be used. Reasons that it knows about are: 1) Starts with number 2) Has a dot 3) Has a space 4) Starts with or contains a special character 5) Starts with an underscore (Python does allow this, but it's bad practice, and makes checking security of drivers harder) 6) Is a reserved Python keyword
2015-03-30Cleanup: use const for typeinfoCampbell Barton
2015-03-28Keyframes on NLA-Strip F-Curves are detected by RNA buttons tooJoshua Leung
2014-11-16Bugfix T41525: Button keyframe indicators don't work correctly when editing ↵Joshua Leung
NLA Strips When the active action is a NLA strip, the keyframe indicator colors for buttons and the 3D view indicator (i.e. the current frame indicator changes color) didn't work correctly. This was because they were still checking for keyframes in "global" time space, whereas they needed to be applying NLA corrections to "look inside" the remapped action.
2014-10-06Fix T40350: Some texture prop did not have visual feedback they were driven.Bastien Montagne
This is only a (hacky) partial fix, actually, since `RNA_property_animated()` will still not work in those cases... Better that than nothing, though. Thanks to Campbell for review.
2014-04-15Move binary-search threshold used for FCurves to BKE_fcurve.h headerJoshua Leung
Since this is now pretty much the de-facto "minimum distance between keyframes", we might as well expose this in this header so that other places which need similar thresholds can perform similar checks (needed for my next commit)
2014-03-30Code cleanup: de-duplicate cotangent weight function & add arg sizesCampbell Barton
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2014-01-31Code cleanup: be less vague checking invalid index valuesCampbell Barton
2014-01-01Fix crash happening in Cycles fcurve modifierSergey Sharybin
Summary: Crash was happening because of fcurve modifier stack used modifier's DNA to store temporary data. Now made it so storage for such a thing is being allocated locally per object update so multiple objects which shares the same animation wouldn't run into threading conflict anymore. This storage might be a part of EvaluationContext, but that'd mean passing this context all over in object_where_is which will clutter API for now without actual benefit for this. Optimization notes: storage is only being allocated if there're Cycles modifier in the stack, so there're no extra allocations happening in all other cases. To make code a bit less cluttered with this storage passing all over the place added extra callbacks to the FModifier storage which runs evaluation with the given storage. Reviewers: brecht, campbellbarton, aligorith CC: plasmasolutions Differential Revision: https://developer.blender.org/D147
2013-10-02fix [#36919] Cannot delete keyframe of animated simulation parameter if ↵Campbell Barton
simulation has been disabled
2013-10-01fix for error setting vector handles to free when both vector handles were ↵Campbell Barton
selected but not the mid-point. only one of the handles would be changed to the HD_FREE. effected curves and fcurves.
2013-07-18fix for action editor view-selected behaving strangely.Campbell Barton
- when an fcurve had no selected keyframes, a default fallback value was used which caused view-selected to include frame 1, even when no selected frames were there. - the vertical axis was always reset, ideally we would center vertically too but the way this operator currently works we only know about the frame range, now don't change the vertical scroll when viewing selected since it would always jump to the top of the screen (view-all still acts this way).
2013-03-17use const pointers for file loading and booleans for animation system return ↵Campbell Barton
values passed as pointers.
2013-01-31patch [#33985] Added FModifierEnvelope control_point add remove to APICampbell Barton
from Peter Staples (batfinger)
2012-08-18Bugfix [#32331] Graph editor zoom to selected includes coordinate origin if moreJoshua Leung
than one curve is displayed The range calculation used to use a fixed 0-1 range whenever it couldn't find any values for a particular F-Curve. However, this was then taken by the aggregation calculation to be used as just another value, leading to problems if only vertices of a very high-value curve are selected to be included. Modified the range calculation to ensure that suitable vertices were found before trying to take the range values returned.
2012-08-09code cleanup: ensure macros require ';' endingsCampbell Barton