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-07-20T77086 Animation: Passing Dependency Graph to DriversSybren A. Stüvel
Custom driver functions need access to the dependency graph that is triggering the evaluation of the driver. This patch passes the dependency graph pointer through all the animation-related calls. Instead of passing the evaluation time to functions, the code now passes an `AnimationEvalContext` pointer: ``` typedef struct AnimationEvalContext { struct Depsgraph *const depsgraph; const float eval_time; } AnimationEvalContext; ``` These structs are read-only, meaning that the code cannot change the evaluation time. Note that the `depsgraph` pointer itself is const, but it points to a non-const depsgraph. FCurves and Drivers can be evaluated at a different time than the current scene time, for example when evaluating NLA strips. This means that, even though the current time is stored in the dependency graph, we need an explicit evaluation time. There are two functions that allow creation of `AnimationEvalContext` objects: - `BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float eval_time)`, which creates a new context object from scratch, and - `BKE_animsys_eval_context_construct_at(AnimationEvalContext *anim_eval_context, float eval_time)`, which can be used to create a `AnimationEvalContext` with the same depsgraph, but at a different time. This makes it possible to later add fields without changing any of the code that just want to change the eval time. This also provides a fix for T75553, although it does require a change to the custom driver function. The driver should call `custom_function(depsgraph)`, and the function should use that depsgraph instead of information from `bpy.context`. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D8047
2020-07-03Cleanup: Editors, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors` module. No functional changes.
2020-06-29GPencil: Cleanup - Rename some functions from gp_ to gpencil_Antonio Vazquez
2020-06-19Fix T77997: GPencil insert keyframe on timeline doen't update viewportAntonio Vazquez
The reason was the datablock is changed but it was not tagged for depsgraph refresh. In some cases it could be possible to tag several times the same datablock, but as this is not the case all the times and the number of tags is always very small, it doesn't worth a complex code to keep a memory list of the datablocks to tag.
2020-06-05Code Cleanup: fcurve function namingJeroen Bakker
2020-06-01UI: use term current frame instead of playheadCampbell Barton
Avoid mixing different terminologies up, current frame is used in a majority of Blender.
2020-05-12UI: Rename 'View All' operator to 'Frame All'Pablo Vazquez
This change was done time ago but it was still missing in some operators.
2020-05-09Cleanup: doxy commentsCampbell Barton
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-10Fix T65076: Missing EasingType implementation on the DopesheetSybren A. Stüvel
EasingType was implemented rBdaccaa713b6e for the GraphEditor (but never made it to the Dopesheet). If you can select Easing Mode in the DopeSheet, then you should also be able to select the associated Easing Type. Thanks @lichtwerk for the initial implementation. Maniphest Tasks: T65076 Differential Revision: https://developer.blender.org/D6094
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-03-06Cleanup: keyframing return argumentsCampbell Barton
- Use 'int' for counters instead of short. - Use 'bool' instead of a counter when only a change is being detected. - Use typed enum for keying set flags. - Include in comments when a negate error code may be returned.
2020-03-04UI: rename View Selected" to "Frame Selected"Asad-ullah Khan
Addresses T74331
2020-01-23UI: Rename 'View Frame' to 'Go to Current Frame'William Reynish
In our animation editors, we have a feature called View Frame. Problem is, it is not self evident what this feature does. Does it show frame numbers? Does it show all frames? Does it frame the view? Does it frame the view? What this does, is it moves the view to where the playhead is. With clearer naming, we can communicate this much more clearly. This is just a simple patch that changes the name from 'View Frame' -> 'Go to Current Frame'. Differential Revision: https://developer.blender.org/D6437
2019-11-18WM: remove view operators from the undo stackAlessio Monti di Sopra
2019-09-20UI: Fix CapitalizationYevgeny Makarov
Differential Revision: https://developer.blender.org/D5716
2019-07-31Animation: Remove depsgraph argument from a lot of APISergey Sharybin
Use explicit boolean flag to indicate whether flush to original data is needed or not. Makes it possible to avoid confusion on whether an evaluated or any depsgraph can be passed to the API. Allows to remove depsgraph from bAnimContext as well. Reviewers: brecht Differential Revision: https://developer.blender.org/D5379
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-05-03Refactor: Support arbitrary y offset for channel listJacques Lucke
At first you could think that this refactor would not be necessary, because `ACHANNEL_FIRST` exists already. It contained the small y offset that all channels had. Unfortunately, a lot of code assumed that `ACHANNEL_FIRST = -ACHANNEL_HEIGHT`, making the define pretty much useless. This refactor fixes that for the action and nla editor. As a nice side effect, this patch fixes channel box select. Before there was always have a half-channel offset. Reviewers: brecht Differential Revision: https://developer.blender.org/D4783
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-29Cleanup: comments (long lines) in editorsCampbell Barton
2019-04-22Cleanup: style, use braces for editorsCampbell Barton
2019-04-21Cleanup: comments (long lines) in editorsCampbell Barton
2019-04-17Cleanup: line wrapping caused by commentsCampbell 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-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-01-15Cleanup: comment line length (editors)Campbell Barton
Prevents clang-format wrapping text before comments.
2018-12-14NLA: insert keyframes correctly for strips with non-Replace mode.Alexander Gavrilov
NLA strips support using the keyframe values in a variety of ways: adding, subtracting, multiplying, linearly mixing with the result of strips located below in the stack. This is intended for layering tweaks on top of a base animation. However, when inserting keyframes into such strips, it simply inserts the final value of the property, irrespective of these settings. This in fact makes the feature nearly useless. To fix this it is necessary to evaluate the NLA stack below the edited strip and correctly compute the raw key that would produce the intended final value, according to the mode and influence. Differential Revision: https://developer.blender.org/D3927
2018-11-14Merge branch 'master' into blender2.8Campbell Barton
2018-11-14Cleanup: comment block tabsCampbell Barton
2018-11-11NLA: fix frame mapping applied twice keyframing from graph/action editors.Alexander Gavrilov
The insert_keyframe function already applies NLA strip to action time remapping, so doing it in insert_graph_keys/insert_action_keys is redundant outside the code path that inserts directly into fcurve.
2018-11-07Cleanup: remove some useless BKE_library and BKE_main includes.Bastien Montagne
Makes it simpler to make some changes... Also fix order of some includes (use alphabetical please).
2018-07-02Merge branch 'master' into blender2.8Campbell Barton
2018-07-02Cleanup: use bool for poll functionsCampbell Barton
2018-06-07Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/editors/animation/anim_deps.c source/blender/editors/animation/keyframing.c source/blender/editors/animation/keyingsets.c source/blender/editors/armature/pose_edit.c source/blender/editors/armature/pose_transform.c source/blender/editors/gpencil/gpencil_convert.c source/blender/editors/include/ED_anim_api.h source/blender/editors/include/ED_keyframing.h source/blender/editors/interface/interface_anim.c source/blender/editors/space_action/action_edit.c source/blender/editors/space_graph/graph_edit.c source/blender/editors/space_outliner/outliner_draw.c source/blender/editors/transform/transform_conversions.c source/blender/makesrna/intern/rna_armature.c source/blender/makesrna/intern/rna_pose.c source/blender/python/intern/bpy_rna_anim.c source/blenderplayer/bad_level_call_stubs/stubs.c source/gameengine/Converter/KX_BlenderSceneConverter.cpp
2018-06-07Cleanup: remove moar G.main usages.Bastien Montagne
Notes: * Really need to address RNA setters case, end up adding way too much G.main here these days... :/ * Added Main pointer into bAnimContext, helps a lot in anim code ;)
2018-06-04Merge branch 'master' into blender2.8Campbell Barton
2018-06-04Cleanup: strip trailing space in editorsCampbell Barton
2018-05-31Fix: View All in Action Editor zoomed in far enough to enter "crazy mode" ↵Joshua Leung
with a single keyframe Now, when there's just a single keyframe, pressing HomeKey will instead just center the view instead of trying to do "frame range" + margin.
2018-05-19WIP COW Fix: Insert keyframe operators/api now queries depsgraph for ↵Joshua Leung
evaluated data When using copy on write, insert keyframe operators were reading from old bmain data instead of COW data. This meant that inserting keyframes would often read old/stale data, resulting in invalid keyframes getting created (e.g. from last transform operation, instead of actual current state). This commit makes it so that keyframing operators will ask depsgraph for the evaluated copy of the data, so that it can read values from that. It introduces a new function - `DEG_get_evaluated_rna_pointer()`, which when working correctly/fully, should work just like the other `DEG_get_evaluated_*()` functions, except it lets you pass in an RNA Pointer. However, currently, this is only done for Pose Bones (as a dirty hack, since this is an important/pivotal requirement for production) and/or datablock properties directly (since we can just use the DEG_get_evaluated_id() directly). on the datablock. Committing to a branch for now as this all needs more testing. More work to come later at a more sane time of day!
2018-04-03Cleanup: editor BKE_main includesCampbell Barton
2017-10-18Cleanup: Use const for RNA EnumPropertyItem argsCampbell Barton
Practically all access to enum data is read-only.
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-09-27Math Lib: Add non-clamped round_* functionsCampbell Barton
Replace iroundf with round_fl_to_int, add other types
2016-08-04Cleanup: Use BKE_gpencil prefixJulian Eisel
This is a good point to change this as grease-pencil-v2 branch was just merged, so I hope merge conflicts with other branches are minimal.
2016-07-07Dopesheet: Keyframe size can be adjusted as part of theme settingsJoshua Leung
This commit introduces a scale factor setting for scaling all keyframe indicators in the Dopesheet Editor up/down, in order to make them easier to select. It is perhaps most useful for keyframe types which are usually indicated using smaller keyframes (e.g. breakdown), which may get tricky to quickly select.